Skip to content

Instantly share code, notes, and snippets.

@TwanoO67
Created February 7, 2019 16:51
Show Gist options
  • Save TwanoO67/20159c571670bf9c648d5e7bf3d223b3 to your computer and use it in GitHub Desktop.
Save TwanoO67/20159c571670bf9c648d5e7bf3d223b3 to your computer and use it in GitHub Desktop.
reconnect your bluetooth handset (when problem with AD2P profile)
#!/usr/bin/expect -f
#sudo apt-get install expect
#
#get your decide address with bluetoothctl
spawn service bluetooth restart
sleep 3
set prompt "#"
spawn bluetoothctl
send "connect 12:34:AD:DR:FA:KE\r"
send_user "\nShould be paired now.\r"
send "quit\r"
expect eof
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment