Bluetooth audio auto connect

I guess I’ll need to check @vevs 's script then…

?? It works for me.

I meant, I’ll try it :slight_smile:

1 Like

Thanks, works perfectly :ok_hand:

Can you tell me which one method was used? Thanks.

Well, I’m replying to vevs, so this:

Tanks! I copy it on nightly 9.1, but it didn’t work on my bluetooth speaker. When i turnon my bluetooth speaker, the bluetooth show concted in CoreELEC, but the bluetooth speaker didn’t show concted status, when i refresh in CoreELEC, it show disconect。I think maybe becouse I have two bluetooth speaker make a wireless stereo. I will try my bluetooth headphone toningt. @vevs @GunterO

Hi guys! I just tried again the bluetooth-audio addon, and now with CE 9.2.0 it works like a charm!

1 Like

which device?

H96pro+, 3GB RAM. Before, it showed the behaviour described, that is, when the addon was configured, it froze scanning for BT devices. Now, it works as expected (ie. switch automatically between PULSE and ALSA audio when a BT device is (dis)connected.

this solution doesn’t work for me on vorke z6.any other solution please?

Please, has anyone tried the latest nightly if the script is still necessary?

edit: no, the script is no longer necessary :slight_smile:

just auto connect still does not work

edit: no, the script is no longer necessary

I told you so ;). It works for me with the stable release, no need to use the nightly build.

just auto connect still does not work

Does it work with the script? I was thinking about working out a simple systemd unit that tried bluetoothctl connect MACADDR. But not sure it’s worth the effort.

Wow thank you so much !! Thats work perfectly with my coreelec 9xx / TX8 box !!! THANKS

Any news here?can someone give me a solution for auto connect Bluetooth on latest 9.2.0 build please?

The Bluetooth Audio Switcher default setting only works if you are using the default audio output when NOT using Bluetooth. My ODroid N2 has 6 audio options, and I’m using the 6th one (HDMI) - not the default. Had to get help figuring out what to enter in the setting. Found I had to do “aplay -L” from the terminal to get the correct text to enter for the setting. This is very poorly documented.

Unfortunately this only addresses switching to Bluetooth once it’s connected or back to other audio if BT disconnected. Neither of my BT headsets will auto-connect to CoreElec, I have to do it manually through Settings-CoreElec-Bluetooth. These BT headsets auto-connect to everything else I own w/o issue.

Update - I’m not a CE or code guru, but after looking closely at this I think it’s an equivalent to the BT audio switcher, it appears it’s waiting for an event that adds the BT audio device (the auto-connect we are all looking for). So this assumes the BT device has already auto-connected, which mine don’t. That’s the part I need.

Old:
I believe this is the udev rules and script others have referred to with regard to auto-connecting bluetooth, but doesn’t work for me. The script actually broke (overrides) the BT audio switcher add-on which I just got working as it does not appear to accept the same text for the non-BT audio device that the BT audio switcher add-on does. https://gist.github.com/witokondoria/8f61143136dd15d0c7d72c47867dc859#file-bluetoothhandler-sh

Hi! I have contacted vevs and he was kind enough to provide a really working solution for surround sound system users!!
I have a 5.1 surround sound and I have Passthough acivated to let the AVR the encoding of the audio signal. If the passthrough is activated the sound comes still from the 5.1 system. I have asked vevs to ehance the script to automatically disable audio passthrough once the bluetooth headphones are connected. It is working perfectly!! Just place the two files in your configfiles here \YOURIP\Configfiles\udev.rules.d
It works immediately! Dont forget to enable HTTP control under services. It is working like a charm. Maybe CoreELEC team will implement this in the future releases? This script is better than Bluetooth Audio Changer. It also disables passthrough when Headphones are connected.
Here are the files:https://www.mediafire.com/file/5tgvle9trsv4quw/bluetooth_audio_autoswitch.7z/file

1 Like

I think bluetooth sucks in geneal. I tested with Redmi Airdots and my results:

  • on Android: as soon as I power on headphones, Android immediately connects and audio is automatically switched to Bluetooth. When power off headphones, audio is again on speaker
  • on Coreelec: tried to connect/pair. After 10th attempt, with various error messages like “no response from device”, “function not implemented” and some others I don’t remember, finally it connected. But, unfortunately, only right earphobe. So, again a few attempts and it finally worked. However, with 2 seconds sound lag. Of course, when power off device, Coreelec never switch to hdmi audio, as well as it never connect automatically when device appears. It also never connect to available device after boot. It sticks to bt audio output setting, without even any attempt to auto connect to device and there’s no sound. If audio output is set to hdmi, it never attempts to connect to bluetooth and switch to bluetooth audio as Android do

In my case, it’s useless. Maybe it only exists for fun. But not for use. If somebody thinks about BT audio on Coreelec, forget it. Nothing more than waste of time, unless you have nerves of steel

1 Like

Bluetooth audio automatic connection and automatic switch to bluetooth audio when connected got reworked in CE-19 already. I will try to backport it for CE-9.2

In general bluetooth is a bit complicated about connect/reconnect. Some devices have no issues, some need manual interaction, some do not work at all.

EDIT:
the bluetooth changes should be also in tomorrow 9.2 nightly

3 Likes