This is an old revision of the document!


LXC Bluetooth Image

This Article decribes the usage of the Bluetooth BLE 4.2 Inteface on a NB800 Router insinde of a LXC Virtualisation Container

Requirements

Beside of a NB800 Router, you will need the correct LXC Container file to run Bluetooth on your router. This file can be downloaded here (debian-jessie-bluetooth.tar.gz; Size 87.4MB; Checksum 5bd2becf74753171f893ccccab5213b8).

Beside that, you will need a virtualization licence. Contact support for further informations.

Configuration

  • If you are using Windows to set up your router, use f.e. WinSCP to connect to your routers file system.
  • The standard IP is 192.168.1.1, the user name is root, for password just hit enter as you didn't set up a password yet. On your router, navigate to /mnt/storage0/lxc.
  • Take the Debian-Jessie-bluetooth.tar-file you downloaded and copy it in this folder.
  • Open a SSH or Telnet program or use your root shell and connect to your router. Again, the IP is 192.168.1.1, the user is root, for password just press enter.
  • Enter
cd /mnt/storage0/lxc

to navigate to the folder where you uploaded your image file to.

  • Enter
mkdir guest0

to create a new guest folder for your new LXC container.

  • Enter
tar -xzvf debian-jessie-bluetooth.tar.gz -C /mnt/storage0/lxc/guest0

to extract the tar file to the guest0 folder.

  • In your web browser, enter 192.168.1.1 to get access to the web gui of your NB800 router. At first access, you will have to set a password for the user admin. Now set up your router to your needs. Under System - Virtualization, enable the Administrative Status and add a new guest for LXC Containers

  • Set up this LXC config for your needs, just make sure that you enable the BLUEZ1 module in the Devices menu.

  • Switch back to your shell and reconnect to your router. The user name is still root, but when asked for the password, use the one you set when configuring your router in your web browser.
  • Go back to your LXC folder and enter
chmod 755 -R guest0

to give the guest0-container the correct right to function properly.

Container

  • Enter
/etc/init.d/virt start

to start the LXC container and

lxc-attach -n guest0

to enter the container.

USER
~ $ lxc-attach -n guest0 root@jessie:~#

  • Enter
cd

to change to the containers root folder and enter

/.start-bluetooth.sh

USER
root@jessie:~# ./start-bluetooth.sh Found a Texas Instruments' chip! Firmware file : /lib/firmware/ti-connectivity/TIInit_11.8.32.bts Loaded BTS script version 1 texas: changing baud rate to 3000000, flow control to 1 Device setup complete

to start the bluetooth starting script. If everything works correctly, you will get a confirmation like in the picture.

Testing

  • When everything is set up correctly, for example, you can use commands like
hcitool scan

to scan your surrounding for active bluetooth devices.

USER
root@jessie:~# hcitool scan Scanning …

      6C:4D:73:D3:41:CC       r00ti8P