Skip to content

Instantly share code, notes, and snippets.

@vazgen6
Last active March 2, 2022 17:57
Show Gist options
  • Save vazgen6/5b0efb89faa910f3a6a30b86aae5a053 to your computer and use it in GitHub Desktop.
Save vazgen6/5b0efb89faa910f3a6a30b86aae5a053 to your computer and use it in GitHub Desktop.
Bluetooth pairing my headphoe is sometimes difficult, the following steps fixes the problems most of the times.
#!/bin/bash
rfkill unblock all
echo -e "power on\nexit\n" | bluetoothctl
sleep 2s
echo -e "disconnect\nexit" | bluetoothctl
sleep 3s
echo -e "connect REPLACE_WITH_MAC_ADDRESS\n" | bluetoothctl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment