Enable Bluetooth after each reboot?

Thanks for this @sam_nazarko

When external BT adapter is set to be re-enabled upon each boot:
OR
When internal BT is used, which automatically re-enables upon each boot:

The paired devices do not attempt to re-connect (red circle vs blue circle)

Feature request 3 - Would it be possible to add a toggle to attempt a reconnect of paired devices upon reboot?

Feature request 4 - Would it be possible to add a value field that attempts to reconnect a paired device every X seconds?

Cheers

+1

OSMC 2016.06-02 on RPi3, internal bluetooth module, Amazon Fire TV Stick remote paired, but bluetooth is disabled after every reboot/restart. /var/lib/connman/settings has bluetooth enabled as well.

Any ideas?

same here. Still. Have you migrated the SD-Card from a RPi2 to the RPi3? Or did you make a clean install on RPi3?

I think that is the reason: I migrated the SD-card from a RPi2 to the RPi3 and on the RPi2 there was an external USB-BT Adapter connected.
Think this leaves traces… But dunno where … so it’s messed up…

Any ideas ?

I did a fresh install of OSMC (2016.05) for my brand new RPi3, so this might not be the reason…

Hi,
any new development here?
I can report the same problem… have to re-enable my bluetooth keyboard with each boot on my latest OSMC/RPi3[

My bluetooth keyboard survived one reboot yesterday after I trusted the device manually…
$ sudo bluetoothctl [bluetooth]# agent on [bluetooth]# default-agent [bluetooth]# scan on [bluetooth]# pair xx:xx:xx:xx:xx:xx [bluetooth]# trust xx:xx:xx:xx:xx:xx [bluetooth]# exit
Will test some more in the next days.

1 Like

I had the same issue with my new install of OSMC on the RPi3. The problem was systemd-rfkill was blocking it on every boot.

Steps I took to solve:

  1. apt-get install rfkill
  2. rfkill list (my bluetooth device was device 1)
  3. systemctl stop systemd-rfkill@rfkill1.service
  4. rfkill unblock 1
  5. systemctl disable systemd-rfkill@rfkill1.service

So far seems like the bluetooth is coming back on after every boot.

ConnMan hooks rfkill. You should use connmanctl enable Bluetooth. I think with rfkill now installed on your system you will experience some issues

Maybe the trick was disabling systemd-rfkill@rfkill1.service? Possibly I could have removed the rfkill soft block with connmanctl.

This did the trick for me. My bluetooth survived the reboot. It took a few moments but my bluetooth keyboard connected. Thanks

Hi folks,

I had this problem using the internal bluetooth adapter in the Pi 3. Out of all the stuff I have done with OSMC, every single thing has worked out of the box which has impressed me no end - except this :slight_smile:

I signed up to share this embarrassingly simple hack that fixes it for me until it is fixed in OSMC.

Edit /etc/rc.local and add the following before the exit 0

(sleep 10 ; connmanctl enable bluetooth) &

Enjoy!

Kent.

1 Like

I just installed the latest version of OSMC on a R Pi 3 and I am also experiencing the issue with Bluetooth not connecting to my Bluetooth mouse on a reboot. I always have to manually reconnect. I tried the Scan for Updates fix but there are no updates available so that means I have the latest of everything.

I have seen a couple of suggestions of command line fixes or editing configuration files.
How do I do that when there is no command line available from OSMC?

Are there any new ways or idea on how to fix this?

@jackcf Accessing the command line, direct link to the OSMC wiki.

I tried what you suggested and it did not work for me.

Any suggestions?

@jackcf You’re going to need to be a little more specific.

Could you access the command line? If not, there will be a lot of other threads about this, so, better to ask there and not send this bluetooth issues thread off topic.

If you edited /etc/rc.local and it still isn’t working, then please do reply on this thread and we’ll try to help.

Yes, I was able to access the command line and I edited the /etc/local.rc file and it did not work for me.

Any suggestions?

Sorry I missed this.

The most obvious thing is that you have the filename wrong. The file you want is /etc/rc.local.
It is important that you add the line I said before above the exit 0. You need to include everything I wrote - that means the _()_s as well as the &.

When you do this, the bluetooth ‘checkbox’ in OSMC won’t be marked as on, but it will be on anyway.

Does that help?

If not, please type the following on the command line and paste the output here cat /etc/rc.local

That was a typo in my post.

Every time I reboot I have to go into settings and manually reconnect the mouse and it works fine. It looks like OSMC is not trusting the device to me.

Here is the contents of the rc file:


#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

(sleep 10 ; connmanctl enable bluetooth) ;

exit 0

How do you format in this thing. It’s taking the pound signs a making the test larger…

Use the </> in the post editor.