Enabling bluetooth

I just purchased an IOGear Bluetooth dongle for usage with an PS3 controller for RetroPie

I plugged in the device and it was immediately detected and drivers loaded.
After installing the necessary packages, I saw the device, but couldn’t bring it UP.

root@osmc:~$ hciconfig
hci0:	Type: BR/EDR  Bus: USB
	BD Address: 5C:B3:70:6E:6D:A7  ACL MTU: 1021:8  SCO MTU: 64:1
	DOWN 
	RX bytes:1604 acl:0 sco:0 events:199 errors:0
	TX bytes:35076 acl:0 sco:0 commands:198 errors:0

root@osmc:~$ hcitool dev
Devices:

root@osmc:/home/osmc# hciconfig device up
Can't init device hci0: Operation not possible due to RF-kill (132)

I read here that it could be an software block, so I installed rfkill

root@osmc:/home/osmc# apt-get install rfkill

After that I could look at the setting…

root@osmc:/home/osmc# rfkill list
0: hci0: Bluetooth
	Soft blocked: yes
	Hard blocked: no
root@osmc:/home/osmc# rfkill unblock all
root@osmc:/home/osmc# rfkill list
0: hci0: Bluetooth
	Soft blocked: no
	Hard blocked: no

Now that the software block is lifted

root@osmc:/home/osmc# hciconfig hci0 up
root@osmc:/home/osmc# hcitool dev
Devices:
	hci0	5C:B3:70:6E:6D:A7
root@osmc:/home/osmc# hciconfig
hci0:	Type: BR/EDR  Bus: USB
	BD Address: 5C:B3:70:6E:6D:A7  ACL MTU: 1021:8  SCO MTU: 64:1
	UP RUNNING 
	RX bytes:2168 acl:0 sco:0 events:228 errors:0
	TX bytes:35434 acl:0 sco:0 commands:227 errors:0

Now that problem is out of the way … I can connect the PS3 controller!

1 Like

After a reboot …

root@osmc:~$ rfkill list
0: hci0: Bluetooth
	Soft blocked: yes
	Hard blocked: no

I found it’s in connman:

root@osmc:~$ cat /var/lib/connman/settings 
[global]
OfflineMode=false

[Wired]
Enable=true
Tethering=false

[Bluetooth]
Enable=false
Tethering=false

Setting Enabled=true under the Bluetooth tag fixed the soft block

root@osmc:~$ rfkill list
0: hci0: Bluetooth
	Soft blocked: no
	Hard blocked: no

Our addon for Bluetooth is not fully complete yet, but you will be able to enable Bluetooth via it. We disable Bluetooth initially as its not commonly used

Sam

1 Like

It’s for you to enable within osmc if you want or for other people in the main time, till there is another solution.

Still haven’t fixed it completely, still need to do ‘hciconfig device up’ and the PS3 controller doesn’t connect … I still need to debug that :smile:

2 Likes

Why remove bleutooth i was using it with my apple mini wireless keyboard :frowning: i cannot use it anymore

i agree why remove it plenty of people will use it for some purpose or another remotes etc

There is a big difference in removed and disabled. Must we be so dramatic here? Obviously this didn’t ruffle many feathers between Feb 12 and today?

It’s not removed lol? At no point was it said that bluetooth was removed, it’s OFF by default. If you walk into a room without a lightswitch on do you cry because the bulbs are removed?

1 Like

Have you finally managed to connect your device? If so how?

I am trying to connect a Bluetooth Keyboard (and Mouse) as input device on a Raspberry 2 with OSMC RC.

Thanks to your post I’m already able to discover it, but can’t connect with it. I enabled Bluetooth in:

osmc@osmc:~$ sudo nano /var/lib/connman/settings

and a scan yields:

osmc@osmc:~$ hcitool scan
Scanning …
AA:BB:CC:DD:EE:FF Keyboardname

However, I can’t figure out how to connect to the device. Most tutorials point to bluez-simple-agent or passkey-agent, but I can’t install bluez-utils.

I have just found out that is actually quite easy over the Kodi GUI. By going to:

Programs → OSMC Settings → Network → Bluetooth

and configuring there the devices. My Apple Wireless Keyboard and Logitech M557 connect flawlessly and reconnect after reboot. :smiley:

Having no USB Keyboard available, I have tried first to connect the bluetooth devices using SSH. This was why I posted here.
But after installing iOS Remote I was able to use the GUI. So for me the problem is solved and maybe this post helps others, too.

@Theetjuh hi mate have you got you ps3 remote to work with osmc as ive tried lots of guides and none of the things I try are working if I had hair id pull it out lol I have a csr 4.0 I bought off ebay I can pair it with my phone ok but every Bluetooth package I try to wont let me install the software any help would be appreciated thanks

Why I wanted the PS3 remote connected was to use it within RetroPie.
I got all working perfectly … with the standard image from RetroPie was even easier.

The issue I had with the connection troubles before I solved with a few udev scripts

pi@retropie ~ $ cat /etc/udev/rules.d/10-hci0.rules 
# Set bluetooth power up
ACTION=="add", KERNEL=="js[0-9]*", SUBSYSTEM=="input", SUBSYSTEMS=="bluetooth", RUN+="/usr/sbin/hciconfig hci0 pscan"

# Run pairing command when a joystick is connected through USB
ACTION=="add", KERNEL=="js[0-9]*", SUBSYSTEM=="input", SUBSYSTEMS=="usb", RUN+="/opt/retropie/supplementary/ps3controller/sixpair"

works for me.

I just edited connman/settings, setting Enable=true for Bluetooth

rebooted and I’m good to go

hciconfig
hci0: Type: BR/EDR Bus: USB
BD Address: 00:1A:7D:DA:71:13 ACL MTU: 310:10 SCO MTU: 64:8
UP RUNNING
RX bytes:1158 acl:0 sco:0 events:63 errors:0
TX bytes:1046 acl:0 sco:0 commands:63 errors:0

Do you not have Bluetooth in the OSMC network settings ? You can enable it there. It’s not recommended to edit connman configuration files directly.

If you prefer to use the command line the proper way is to use connmanctl.

Let me start by saying I’m mostly a Linux novice, so please pardon any dumb comments. I’m not having trouble with the Bluetooth being enabled, but I am having trouble enabling PSCAN on boot. Basically, I’m seeing the same results from hciconfig as BitRacer. Sure, I can run ‘hciconfig hci0 pscan’ every time I boot and everything works as it should, but I’d like to avoid that. I’ve tried everything I could find on the net, including the creation of an additional udev/rules.d file as suggested above, but nothing has worked. Any suggestions?

I’m not sure if my problem is related, however i’m using a firetv remote via bluetooth as my remote, and when I reboot the pi bluetooth is disabled under the osmc network settings causing my remote to stop functioning. I have to connect a keyboard to the pi and head over to enable bluetooth in osmc settings after each reboot to regain remote functionality. Hopefully this is a known issue that will eventually be resolved? I look forward to recommending osmc + pi + fire tv remote to friends/family when this is resolved :smile:

Yes, quite soon
Sam

Hi, any update on this issue?

you can solve this by doing the following:

sudo apt-get install rfkill
rfkill list
sudo rfkill unblock all
rfkill list
sudo nano /var/lib/connman/settings

make your file look like this:

[global]
OfflineMode=false

[Bluetooth]
Enable=true
Tethering=false

[Wired]
Enable=true
Tethering=false

now enable your Bluetooth dongle:

sudo hciconfig hci0 up
hciconfig

you should see something like “UP RUNNING” among other information