Autoconnecting to bluetooth device on startup and autochanging audio output
Important note: due to changes in the d-bus protocol introduced with Bluez5 bt-autoconnect <= 0.2.2 will at present only work with Bluez4.
bt-autoconnect
There is a python tool bt-autoconnect designed to connect to an existing audio headset as soon as it becomes available. This is useful in case we do not want to load the pulseaudio module-switch-on-connect
in our default.pa
(see this question).
It will also connect a known device with the Bluetooth adapter (disable this if you want to connect manually), and it will be able to switch the audio sink to the Bluetooth sink without interrupting playback of an audio stream.
In case only one Bluetooth audio device is registered in Bluez settings we can choose "Auto" to autodetect this device. If we had paired more than one device we may need to specify the device by its MAC. If we do not specify the MAC bt-autoconnect will take the first device in the list which may not be the one we want.
If we choose to add bt-autoconnect to the Startup Applications it will start at login minimized to its Application Indicator only
In the Application Indicator menu we are able to switch between HSP (low quality telephony) profile with headset microphone enabled, or A2DP high quality audio profile where the microphone will not be available, provided this is supported by our headset.
ezpn
Experienced Node.js and PHP developer. Huge blockchain technology fan. Ubuntu user.
Updated on September 18, 2022Comments
-
ezpn over 1 year
I use ubuntu 12.10 64 bit. Every time I turn my computer on, I have to manually connect to my bluetooth speakers and change audio output to bluetooth device.
I've found this question: Autoconnecting Bluetooth Devices.
Adding a following line to
/etc/pulse/default.pa
doesn't help.load-module module-switch-on-connect
I also installed stream2ip, but it says I don't have a bluetooth device.
Is there a way to accomplish this automatization?
-
Arno almost 7 yearsDoesn't work in ubuntu 16.04. Check: askubuntu.com/questions/922072/…
-
-
Capy over 10 yearsWoorrrksssssssss
-
Suzana over 7 yearsdoes not work on Linux Mint 17
-
Takkat over 7 years@Suzana_K: thanks for the notice. See edit for reason.
-
Suzana about 7 yearsIn case you didn't know, Mint is based on Ubuntu and even has a tag on this site.
-
Pilot6 about 7 yearsIn case you don't know Mint is off-topic at this site. askubuntu.com/help/on-topic
-
Pilot6 about 7 yearsThe Mint tag is a warning that this type of questions should NOT be asked here.
-
Suzana about 7 yearsBluez is not Linux Mint specific.