Enable Bluetooth after each reboot?

I recently did a fresh install of OSMC on a raspberry pi 3 and I can confirm that after reboot bluetooth is always off. Is this a known bug? Is there a temporary solution?

Bluetooth is enabled in /var/lib/connman/settings

[Bluetooth]
Enable=true
Tethering=false

@sam_nazarko, @DBMandrake
Using rpi 3, BT Dongle, latest version OSMC as of 2016.05.19.
every reboot requires me to go and check OSMC/Network/Enable Bluetooth.

I do not know if OSMC is trying to use the BT Dongle, or the RPI 3ā€™s internal adapter

Anything I can provide to help prevent the need to manually re-enabling BT upon each reboot, just ask :slight_smile:

Can you remove one and see?

Iā€™ll see if I can replicate this shortly.

Cheers

Sam

OSMC/Network/BT
Shows paired devices

With power left on Pull External BT dongle
OSMC/Network/BT (uncheck, and recheck, wait a minute)
No devices paired

Push External BT dongle back into the USB
OSMC/Network/BT (uncheck, and recheck, wait 5 seconds)
Shows paired devices

Relatively certain the RPI 3 is using the external BT dongle
ā€¦
So, back to how to ensure that BT Enabled survives reboots :slight_smile:

Iā€™m also using a rpi 3 B and after tweaking around a bit, the BT internal adapter is always on even after reboot.
Why do you need to use an external BT dongle ? For a mouse ?

Hey @Landspeeder !
Was thinking about it, could you give output of this cmd just after booting :
sudo hciconfig hci0 up

Hi,

Itā€™s:
192.168.2.63osmc@osmc:~$ sudo hciconfig hci0 up
Canā€™t init device hci0: Operation not possible due to RF-kill (132)

Should connmanctl enable bluetooth help here?

Thanks

Markus

Yes you should enable bluetooth via connmanctl or via the My OSMC->Network GUI. Both do the same thing.

Tried both, using ā€œconnmanctl enable bluetoothā€ and also My OSMC->Network GUI.
Both worked and I could connect my BT Logi Keyboard.
But after a reboot bluetooth is not longer ticked in My OSMC->Network GUI.
Always needs a re-checking. After checking it the Keyboard can immediately connect.

I have been using this installation on my older RPI2 with a USB BT dongle.
Now itā€™s in the RPI3 using the internal BT interface.
Maybe that is the reason for the disabled BT after Reboot:

osmc@osmc:~$ sudo journalctl | grep blue
May 23 10:40:20 osmc bluetoothd[419]: Bluetooth daemon 5.39
May 23 10:40:20 osmc bluetoothd[419]: Starting SDP server
May 23 10:40:20 osmc bluetoothd[419]: Bluetooth management interface 1.10 initialized
May 23 10:40:20 osmc bluetoothd[419]: Failed to obtain handles for ā€œService Changedā€ characteristic
May 23 10:40:20 osmc connmand[325]: Method ā€œListAdaptersā€ with signature ā€œā€ on interface ā€œorg.bluez.Managerā€ doesnā€™t exist

Are you running the very latest updates ? There was an issue a few weeks ago that caused Bluetooth to not automatically reconnect after a reboot but it has been fixed in the latest updates.

Yes,
updated manually in GUI, My OSMC and made an apt-get update & upgrade on the console:

osmc@osmc:~$ sudo apt-get upgrade
Reading package listsā€¦ Done
Building dependency tree
Reading state informationā€¦ Done
Calculating upgradeā€¦ Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
osmc@osmc:~$

You should not be running apt-get upgrade.

If he ran apt-get upgrade, he hasnā€™t dist-upgraded to our version of bluez I suspect

sure, I did too:

osmc@osmc:~$ sudo apt-get dist-upgrade
Reading package listsā€¦ Done
Building dependency tree
Reading state informationā€¦ Done
Calculating upgradeā€¦ Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

iā€™m a noob, just installed on Pi 3 yesterday. Got BT keyboard and mouse. Bluetooth function on OSMC needs to re-enabled after every reboot. I got latest updates via My OSMC and the 2 OS type updates methodsā€¦iā€™m on latest software.

Oh, love the concept of OSMC and thanks for the efforts. Much appreciated. Geoff.

@Cornellus

Sorry for the 9 day delayā€¦ I have been traveling for work.

I am running 2016.05-01

On using an external BT adapter (which has MUCH better range than the internal):
On a freshly rebooted pi, with a fresh SSH so that I see osmc@OSMC;~$ running sudo hciconfig hci0 up does not return any values

Going into MyOSMC GUI/Network/BT I again see it disabled. Re-enabled (and I see 2 red paired devices). running sudo hciconfig hci0 up does not return any values

Turning on one of the controllers I now see 1 blue paired device. running sudo hciconfig hci0 up does not return any values.

.

Soā€¦ what kid doesnā€™t want to hear: you gotta sit closer to that screen kiddoā€¦

Out with the External BT dongle. Reboot. Into MyOsmc/Network/BT. Enable BT. Turn on discovery. Pair the Controllers once their MAC is visible. Turn off discovery. Reboot

running sudo hciconfig hci0 up still does not return any values. BUT BT remains enabled after each reboot.

Issue with Internal BT. It does not maintain connected status with more than 1 8bitdo controller.

It appears that I can use the internal BT and 1 controller that survives reboots with limited rangeā€¦ OR I can use the external BT with 2+ controllers that does NOT survive reboots and allow the controller to work from the couch. Hmmm

@Landspeeder

I use the internal BT of the raspberry pi 3 B for a BT compact keyboard. Iā€™m 3 meters from rpi (on the couch) and I can use the keyboard without any issue. So I suppose you are more than 3-4 meters from the rpi.

I donā€™t think you can pair 2 devices simultaneously, you can have multiple devices registered with the bluetooth adapter but you can only use one at a time. I donā€™t think it supports concurrent connections. But maybe Iā€™m wrong.
It depends on the BT transmitter specs. Some can have up to 7 devices to connect to a master.

You can have a look at this file : /var/lib/connman/settings
and also at command line tool : connmanctl --help

Last thing, what output do you have when only typing : hciconfig ?

I have same issue after reboot Bluetooth is not active, /var/lib/connman/settings. Has Bluetooth true, I have a pi 3 osmc current to date. Have to recheck Bluetooth in osmc or do connmanctl enable Bluetooth from command line to get it back

@Cornellus

The couch is just over 6 meters back

Using the internal BT adapter it appears I can connect 1 controller in the main mode (Power) and 1 controller in joystick mode (Power + R2). Using the external adapter I can connect both controllers using both Power or Joystick mode.

Using the internal BT adapter with both controllers connected (1 power 1 joystick)
osmc@OSMC:~$ hciconfig
hci0: Type: BR/EDR Bus: UART
BD Address: B8:27:EB:46:41:BB ACL MTU: 1021:8 SCO MTU: 64:1
UP RUNNING PSCAN
RX bytes:2610 acl:51 sco:0 events:81 errors:0
TX bytes:1513 acl:20 sco:0 commands:53 errors:0

@sam_nazarko

External BT Adapters appear to have better range and fewer connected device limitations (number of simultaneous paired active devices, naming of multiple devices),etc. Perhaps this is due to driver support?

1 - Would it be possible to add a toggle under Network/BT to switch between using Internal and External BT adapters?

2 - Would it be possible to prevent having to re-enable BT upon every reboot when an external BT adapter is in use with the rpi3? Currently when using an rpi3 external adapter one must go into MyOsmc/Network/BT and re-enable BT upon every reboot.

Thanks!

Hi Chris

Iā€™ll see what I can do. This should be possible by disabling the firmware upload service.

I think this is a byproduct of having both the internal and external adapter enabled.

For now, Iā€™d expect

sudo systemctl disable brcm43xx.service

To disable the internal adapter (it will prevent hciattach and the HCD from being uploaded)