This is a only version

Found at: raymii.org:70/Make_Openelec_Kodi_work_with_the_Sitecom_CN-524_Cambridge_Silicon_Radio_CSR_8510_A10_Bluetooth_USB_adapter_on_the_Raspberry_Pi.txt

This is a text-only version of the following page on https://raymii.org:
Title       : 	Make OpenELEC/Kodi work with the Sitecom CN-524/ Cambridge Silicon Radio (CSR) 8510 A10 Bluetooth USB adapter on the Raspberry Pi.
Author      : 	Remy van Elst
Date        : 	01-10-2015
URL         : 	https://raymii.org/s/tutorials/Make_Openelec_Kodi_work_with_the_Sitecom_CN-524_Cambridge_Silicon_Radio_CSR_8510_A10_Bluetooth_USB_adapter_on_the_Raspberry_Pi.html
Format      : 	Markdown/HTML

Recently I set up a Kodi (XMBC) media center on a Raspberry Pi. The setup is
mounted on a flatscreen TV and uses a small Wifi dongle for network access and a
small Bluetooth dongle for a Rapoo E6700 wireless bluetooth keyboard/touchpad.

I'm developing an open source monitoring app called Leaf Node Monitoring, for windows, linux & android. Go check it out!

Consider sponsoring me on Github. It means the world to me if you show your appreciation and you'll help pay the server costs.

You can also sponsor me by getting a Digital Ocean VPS. With this referral link you'll get $100 credit for 60 days.

![rapoo e6700][2]

This is a nice bluetooth keyboard/mouse combo for a media center, it charges via
micro USB. That saves a lot of battery hassle. The bluetooth adapter is a
Sitecom CN-524, which was the only one my local electronic store had available.

### Bluetooth boot mode

It however does not work with linux/Kodi by default. This is because the device
boots in a wrong mode, HID, instead of HCI. On my Linux Mint and Ubuntu machines
it wasn't recognized as well, and the usb_modeswitch tools didn't help. [This
website][3] has a fix for that in the comments which is posted here as well.

You do sadly need a Windows machine for it. I used Windows 7 in a Virtualbox VM
with USB passthrough.

  * Don't plug in the bluetooth dongle yet (or enable passthrough in the VM)
  * Download the BlueSuite to modifiy "BlueCore Persistent Store": [http://www.kcwirefree.com/docs/BlueSuite _2_ 5.zip][4]
  * Install the BlueSuite Software (default options)
  * Plug the bluetooth dongle in (enable passthrough in the VM)
  * Run CSR BlueSuite 2.5.0 / PSTool as Administrator
  * In the first window choose "Transport" = `USB` and "Port" = `\\.\csr0` and click OK
  * In the filter box, type "bootmode" then click on the item `Initial device bootmode`
  * Note the hex number in case something goes wrong (mine was empty), then change it to `0000`.
  * Click on the Set button then click on the Close button
  * Wait a few seconds then unplug the bluetooth dongle.

After I did this the bluetooth dongle worked without issues on Ubuntu and my
Linux Mint machine. The Raspberry Pi / Kodi setup required some more steps.

### Kodi / OpenELEC configuration


Make sure you enable SSH via the OpenELEC settings. The default username /
password is `root` / `openelec`. Login via SSH and make sure the bluetooth
adapter is listed in the output of `lsusb`:



    Bus 001 Device 005: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)

If that is the case, continue on.

The bluetooth adapter is down by default. Check it with the `hciconfig` command:



    hci0: Type: BR/EDR Bus: USB
    BD Address: 00:09:DD:50:29:EF ACL MTU: 310:10 SCO MTU: 64:8
    RX bytes:108 acl:0 sco:0 events:0 errors:0
    TX bytes:104 acl:0 sco:0 commands:0 errors:0

Turn it on with the following command, and check the status again with

    hciconfig hci0 up




    hci0: Type: BR/EDR Bus: USB
    BD Address: 00:09:DD:50:29:EF ACL MTU: 310:10 SCO MTU: 64:8
    RX bytes:1008 acl:0 sco:0 events:42 errors:0
    TX bytes:164 acl:0 sco:0 commands:40 errors:0

Now turn on the bluetooth daemon, otherwise OpelELEC doens't pick it up:

     /usr/lib/bluetooth/bluetoothd &

There is no output of this command.

Now try to pair the bluetooth keyboard via the OpenELEC settings program, it
should work. You enter a code from the screen in the keyboard and after that it
works every time you turn the keyboard on by default.

To make these settings permanent, add the following to the file

    nano /storage/.config/autostart.sh
     hciconfig hci0 up;
    ) &

Test it by rebooting the Pi. The keyboard should work by default again.c

   [1]: https://www.digitalocean.com/?refcode=7435ae6b8212
   [2]: https://raymii.org/s/inc/img/rapoo-E6700.png
   [3]: http://blog.ruecker.fi/2013/10/06/adventures-in-bluetooth-4-0-part-i/
   [4]: http://www.kcwirefree.com/docs/BlueSuite_2_5.zip
   [5]: https://raymii.org/s/inc/img/openelec_raspberry.jpg


All the text on this website is free as in freedom unless stated otherwise. 
This means you can use it in any way you want, you can copy it, change it 
the way you like and republish it, as long as you release the (modified) 
content under the same license to give others the same freedoms you've got 
and place my name and a link to this site with the article as source.

This site uses Google Analytics for statistics and Google Adwords for 
advertisements. You are tracked and Google knows everything about you. 
Use an adblocker like ublock-origin if you don't want it.

All the code on this website is licensed under the GNU GPL v3 license 
unless already licensed under a license which does not allows this form 
of licensing or if another license is stated on that page / in that software:

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see .

Just to be clear, the information on this website is for meant for educational 
purposes and you use it at your own risk. I do not take responsibility if you 
screw something up. Use common sense, do not 'rm -rf /' as root for example. 
If you have any questions then do not hesitate to contact me.

See https://raymii.org/s/static/About.html for details.