Created
November 2, 2021 09:06
-
-
Save marisancans/a8e61ccc8251ddd6191638e06438f0ec to your computer and use it in GitHub Desktop.
Automatic bluetooth connecting and pairing on linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install bluez tools | |
# sudo apt-get install -y bluez-tools | |
# timeout 10 means it will scan the devices for 10 seconds | |
BT_DEVICE=08:07:20:73:63:2A | |
bt-device -l | |
bt-device -r ${BT_DEVICE} | |
timeout 10 bt-adapter -d | |
bt-device --set ${BT_DEVICE} Trusted true | |
bt-device -c ${BT_DEVICE} | |
bluetoothctl connect ${BT_DEVICE} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment