Enable Bluetooth after each reboot?

Maybe you can help me. I like osmc a lot, but i need bluetooth. The problem i face with the latest osmc on a raspberry pi2 is, that i have to manually enable bluetooth after EACH reboot (through Programs>Settings>Network>Bluetooth). It just doesnt remain active or actives automatically. The consequences for me are dramatic: i cant use osmc because i have a bluetooth keyboard only. Please help!!

p.s. i tried via terminal, enables fine there too. but i still have to enable in Programs>Settings>Network>Bluetooth for proper connecting the keyboard to osmcā€¦

Hi

We are aware of this, and one of our developers actually brought it to my attention again today to jog my memory.

Sam

1 Like

Hi

Iā€™ve taken a stab at this:

If you head to My OSMC ā†’ Updater ā†’ Manual Control and run ā€˜Scan for updates nowā€™ and install them and report back, Iā€™d appreciate it.

Sam

he, i updated and tested. still it is not enabled after reboot. :frowning:

i will give it another try and completely resetup

Nope, the fix does not seem to fix it. I installed osmc RC3 fresh, updated, activated BT, paired and connected the keyboard, rebooted, went to BT in settings -> not enabled ā€¦ please recheck if possible. having this fixed would be great!

Jenkins did not build properly, this is why it made no difference. If you update again you should hopefully see the issue resolved now.

S

1 Like

Okidoki, works now! Great job :smile: love it!!

Thank you for confirming

S

I am having a similar problem. After most reboots, Bluetooth is in the Network menu. But after a period of being idle, it is no longer there (all thatā€™s there is Wired, Wireless and Tethering), and my Apple wireless keyboard stops working.

Straight after a reboot the keyboard works ok. They keyboard also works just fine with two other Mac laptops. What I noticed thatā€™s strange, is that when the wireless keyboard is working via Bluetooth, it is not listed under My OSMC >> Network >> Bluetooth >> Enable Bluetooth >> Paired Devices.

Iā€™ve uploaded all logs and config using the OSMC Log Uploader. Itā€™s reported theyā€™ve uploaded to http://paste.osmc.io/fetecobije

One thing in the logs I noticed relating to bluetooth that doesnā€™t look good:

Aug 30 21:02:52 osmc systemd[1]: brcm43xx-firmware.service start operation timed out. Terminating.
Aug 30 21:02:52 osmc systemd[1]: Failed to start Broadcom 43xx firmware update.
Aug 30 21:02:52 osmc systemd[1]: Dependency failed for Broadcom 43xx bluetooth HCI.
Aug 30 21:02:52 osmc systemd[1]: Unit brcm43xx-firmware.service entered failed state.

Iā€™m running ā€œOSMC August 2015 2015.08-1ā€, and when I go to do the Manual update, it says there are no more updates available.

Running Kernel Linux 4.1.5-2-osmc
Kodi 15.1 (Compiled: Aug 30 2015)

Also, from SSH:

osmc@osmc:~/.kodi/temp$ systemctl is-active bluetooth
inactive
osmc@osmc:~/.kodi/temp$

When I start the service, using systemctl, even though it then says the service is active, it still doesnā€™t show up in the on-screen menu. And only a reboot fixes it.

What else can I try? What logs or debugs do you need?

This problem is happening on my RPI3 using April 2016 update.

I have to enable bluetooth on every reboot & shutdown again.

To get a better understanding of the problem you are experiencing we need more information from you. Please see How to submit a useful support request - General - OSMC for advice on how to help us.

1 Like

I will post some logs and test when I get back from work.

Beginning with starting a new topic in the support forums.

I also have a Rpi3 running OSMC v2016.05-1 with Kodi 16.1 ā€œJarvisā€, and I had the same issue as you.
Impossible to start manually the device with hciconfig :
sudo hciconfig hci0 up

Canā€™t init device hci0: Operation not possible due to RF-kill (132)

As suggested by Theetjuh in another thread on bluetooth, you have to install rfkill in order to be able to start the bluetooth manually with hciconfig.
sudo apt-get install rfkill
then test if manual start is possible :
if bluetooth already enabled :
sudo hciconfig hci0 down
else
sudo hciconfig hci0 up

After all, all you have to do to enable bluetooth at startup is to use crontab job scheduler :

crontab -e

Append this line at the end of the file (donā€™t forget do add an empty line at EOF, otherwise crontab wonā€™t work).

@reboot /usr/bin/hciconfig hci0 up

Voila

You do not need to install rfkill in OSMC.

rfkill functionality is built into connman - the network manager we use in OSMC.

Did you try enabling Bluetooth in MyOSMC ā†’ Network, or with the connmanctl command ??

If you enable Bluetooth properly like this rfkill will be dealt with automatically without installing any additional software. :wink:

Hi @DBMandrake,

Many thanks for the quick reply. [Off Topic] I would also like to thanks all the OSMC team for the great work youā€™ve done so far. :slight_smile:

First Iā€™ve enabled Bluetooth in MyOSMC ā†’ Network but unfortunately at every reboot, it was turned off, so the keyboard wasnā€™t able to connect.
I did not use connmanctl but instead, modified /var/lib/connman/settings file to enable bluetooth.
Iā€™ll revert these modifications and try do everything with connmanctl as you suggested and let you know if itā€™s working properly.

I would also like to change the idle timeout of the keyboard because itā€™s going into sleep quite quickly, I think but Iā€™m not sure, that itā€™s going into sleep each time OSMC launches the screen saver. So my question is : is there a conf file where I can edit this Idle Timeout ? Do you want me to open a new thread for this question ?

Many thanks in advance.

Have a great day :sunny:

Iā€™ve reverted all modifications concerning rfkill :

sudo apt-get remove --purge rfkill

I had to disable bluetooth from MyOSMC > Network because it was already enabled at startup.
Then Iā€™ve tried

connmanctl enable bluetooth and rebooted.

Guess what ? Everythingā€™s working just fine. Many thanks @DBMandrake :smile:

P.S : When I first enabled bluetooth in My OSMC > Network and rebooted, back in the system the bluetooth was disabled, so I guess it is mandatory to enable it with connmanctl.

No, enabling it in My OSMC does the exact same thing as enabling it via connmanctl. If it doesnā€™t work via My OSMC then that means there is a bug in My OSMC.

If I disable Bluetooth from My OSMC and reboot, at startup Bluetooth is enabled in My OSMC.
Same with sudo connmanctl disable bluetooth.
But in the file ā€œ/var/lib/connman/settingsā€ I have this :

[Bluetooth]
Enable=false
Tethering=false

while Bluetooth is enabled in My OSMCā€¦

Iā€™ve also noticed another weird thing, if I stay in My OSMC, the bluetooth keyboard never goes to sleep.
However when Iā€™m browsing OSMC categories (VIDEO, MOVIES, etcā€¦) the idle timeout is very short, even before the screen saver shows (Black - 5min), the keyboard goes to sleep when I donā€™t press any key for approx 30 sec.
When Iā€™m in My OSMC and the keyboard is into sleep mode, when I press a key it takes 2 or 3 sec to wake up. When Iā€™m browsing OSMC and the keyboard is into sleep mode, when I press a key it takes longer than 3 sec to wake up.

Is there anyway to change this behaviour ?

Thanks in advance

Cc @gezb @sam_nazarko