Bluetooth reconnect at startup

Hi I’ using a iPhone 6s, paired with osmc to stream music to osmc. All working fine.
But when restarting osmc the phone is not connected anymore and no reconnect is happening.

When using the phone’s BT menu to connect or “osmc tool” reconnect, the iPhone is connected again.

how can I configure osmc that when available, the BT connection does a auto reconnect?
Is it possible to configure it via bluetoothctl?

regards

OSMC does not support re-initiating the connection to a bluetooth device automatically on boot at this time.

It’s up to the bluetooth device to re-initiate a connection from its end. For example if you were using a bluetooth keyboard you would have to press a key on the keyboard after the system had booted to cause the keyboard to connect again.

thank you for answering, that is ok, when using a keyboard / mouse.
But when streaming from a phone, its a bit circuitous to do a manual reconnect from phone or osmc after restart.

I found a workaround and will try if that is working (put that in autostart or a script that checks if the device is connected)

echo -e "connect FC:58:FA:A0:4D:E7\nquit" | bluetoothctl

will you think about to implement a BT re-connect function in osmc in the future?

regards

It’s a limitation that we’re aware of, like so many other things that need doing its just a matter of trying to find the time to work on it.

perfect, when you are aware of that fine for me, I know osmc is a lot of work, I’m looking forward to see the function in one of the next update.

thanks

have you been able to implement this into a script? i’ve tried to add to my rc.local but can’t get it to work. if i run my script line by line in putty after booting up; it works fine. i’ve added a trust line in mine. tia and thanks for the line of code!

trying to get my 8bitdo BT controller to be connected upon bootup vs having to connect a kb or another device to reconnect. this is OSMC as of 11/12/17 and Raspberry Pi 3 rev b. Clean install. I do also have Retropie installed via retrosmc github script.

echo -e “trust E4:17:D8:40:08:68\nquit” | bluetoothctl
echo -e “connect E4:17:D8:40:08:68\nquit” | bluetoothctl

Hi,

Try adding a

sleep 10

before you additions to rc.local.

Thanks Tom.

1 Like

actually found an updated guide on making service over https://github.com/retropie/retropie-setup/wiki/Bluetooth-Controller

however, you were spot on w/the sleep 10. i had to add that to the .sh i made and then the service works flawlessly!! thanks all for the help and direction!!! :slight_smile:

1 Like