Ubuntu – Autoconnect to a bluetooth speaker in Ubuntu 16.04


BT is enabled at startup. This is nice. But it will not autopair/connect to a device, even if it is once paired and get status "trusted".
I can connect to a Speaker with the tool by selecting device, and "connect to audio output".
How can this done automatically on boot?
I can do this also with "bluetoothctl" and than "connect ", but this is interactive, seems not scriptable.

And second step is, that BT becomes default audio sink.
Isn't that all an ordinary use case?

(I found some pages here, most are outdated.)
Autoconnecting Bluetooth Devices:
load-module module-switch-on-connect doesn't work for me.

I also installed bt-autoconnect. But several issues:
– it didn't foun the BT-Adapter
– Button Audio-Setting does just nothing
– Save and quit doesn't just nothing

Best Answer

Try bluetoothctl command.

If you then enter help, you'll see the commands to be used.

  • 'list' (devices)
  • 'trust 78:44:aa:bb:cc:dd' (MAC address of device)
  • 'info 78:44:aa:bb:cc:dd' (MAC address of device)
  • 'paired-devices'

Try, it worked for me.