For blue-man haters

cat ../bin/btspeaker
#!/bin/bash

expect -c ”
spawn sudo bluetoothctl
expect #
send power\ on\ \n
expect Changing\ power\ on\ succeeded
expect #
send connect\ BLUETOOTH PHYSICAL ADDRESS\ \n
expect Connection\ successful
expect #
send quit\n
interact

exit

cat ../bin/disbtspeaker
#!/bin/bash

expect -c "
spawn sudo bluetoothctl
expect #
send power\ on\ \n
expect #
send disconnect\ MAC\ \n
expect #
send quit\n
interact
"

exit

Advertisements
Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: