Connect via terminal to a bluetooth device
I'm using mint 15 w/ cinnamon.
I've bought a pair of bluetooth speakers and i'm trying to connect to them via a terminal I can see them normally and am connected to them via the gui I want to make a small script to connect to them automatically every time they are visible
I'm trying to scan them
hcitool scan
But I get
Scanning...
and after a few seconds the process dies.
The same thing with hidd --search
.
If I run hciconfig scan
I get.
hci0: Type: BR/EDR Bus: USB
BD Address: 40:2C:F4:78:E8:69 ACL MTU: 1021:8 SCO MTU: 64:1
UP RUNNING PSCAN ISCAN
RX bytes:130700 acl:22 sco:0 events:18527 errors:0
TX bytes:31875398 acl:36784 sco:0 commands:75 errors:0
I guess it's just saying my bluetooth address and turning it on
As i said already, via the normal user interface, i can see the speakers and i am connected to them, but through terminal i get nothing.
Actually it is quite funny that hcitool scan
isn't finding anything since my speakers are connected and every time I run the command the sound from the speakers breaks for a couple of seconds.
I managed to do so via bluez-tools .
sudo apt-get install bluez-tools
List of devices to get the mac address of my device.
bt-device -l
and successfully connect to it.
bt-audio -c 01:02:03:04:05:06
Keep in mind that the bt-audio
feature has been reimplemented probably some time in 2016, so bt-audio
is likely no longer available as such.