Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
virtualisation:bluetooth [2018/01/12 13:46]
buettner
virtualisation:bluetooth [2023/04/03 09:33] (current)
fricker
Line 1: Line 1:
 +<WRAP round alert 100%>
 +[[configuration/​bluetooth-low-energy-ble|This Page is deprecated please visit our Bluetooth low energy page]]
 +</​WRAP>​
 +
 +
 ====== LXC Bluetooth Image ====== ====== 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+This article ​decribes the usage of the Bluetooth BLE 4.2 interface ​on a NB800 router ​insinde of a LXC virtualisation container.
  
 ===== Requirements ===== ===== 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 [[ftp://public:​public@share.netmodule.com/​virt/​debian-jessie-bluetooth.tar.gz|here]] (debian-jessie-bluetooth.tar.gz; Size 87.4MB; Checksum ​5bd2becf74753171f893ccccab5213b8). +Beside of a NB800 Router, you will need the correct LXC Container file to run Bluetooth on your router. This file can be downloaded [[https://​share.netmodule.com/​router/​public/virt/debian_jessie_bluetooth.tar.xz|here]] (debian-jessie-bluetooth.tar.xz; Size 54.6MB; Checksum ​b3907135c41721a70cfbd72cc2873cda). 
  
-Beside that, you will need a virtualization licence. [[http://​wiki.netmodule.com/​faq/​support|Contact support]] for further informations.+Beside that, you will need a virtualization licence ​to run LXC containerYou can [[http://​wiki.netmodule.com/​faq/​support|Contact support]] for further informations.
 ===== Configuration ===== ===== Configuration =====
   * If you are using Windows to set up your router, use f.e. WinSCP to connect to your routers file system.   * If you are using Windows to set up your router, use f.e. WinSCP to connect to your routers file system.
Line 25: Line 30:
  
 <​code>​ <​code>​
-tar -xzvf debian-jessie-bluetooth.tar.gz -C /​mnt/​storage0/​lxc/​guest0+tar -xJvf debian-jessie-bluetooth.tar.gz -C /​mnt/​storage0/​lxc/​guest0
 </​code>​ </​code>​
   * Extract the tar file to the guest0 folder.   * Extract the tar file to the guest0 folder.
  
-  * Under System - Virtualization,​ enable the Administrative Status and add a new guest for LXC Containers+  * To add a new virtualization profile in the router GUI, go to System - Virtualization
  
  
-{{ :​virtualisation:​virt_config_overview.png |}}+{{ :​virtualisation:​virt_config_leer.png |}}
  
 +  * Enable the Administrative Status and click on the Plus button to 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.+{{ :​virtualisation:​virt_config_overview.png |}}
  
-{{ :​virtualisation:​virt_config_devices.jpg |}} 
  
-  * 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+  * Set up this LXC config for your needs, make sure that you enable the BLUEZ1 module in the Devices menu.
  
-<​code>​ +{{ :​virtualisation:​virt_config_bluetooth.png |}}
-chmod 755 -R guest0 +
-</​code>​+
  
-to give the guest0-container the correct right to function properly. 
  
 ===== Container ===== ===== Container =====
-  * Enter+  * Normally, the LXC container is started automaticly when you create a new guest in the router GUI. To check this up, enter 
 +<​code>​ 
 +lxc-info -n guest0 
 +</​code>​ 
 +<​konsole>​ 
 +~ $ lxc-info -n guest0 
 +Name:           ​guest0 
 +State: ​         RUNNING 
 +PID:            3072 
 +IP:             ​192.168.240.1 
 +CPU use:        48.65 seconds 
 +Memory use:     8.51 MiB 
 +Link:           ​virt0 
 + TX bytes: ​     1.42 KiB 
 + RX bytes: ​     1.37 KiB 
 + Total bytes: ​  2.79 KiB 
 +~ $ 
 +</​konsole>​
  
 +  * If the container is not running, enter
 <​code>​ <​code>​
 /​etc/​init.d/​virt start /​etc/​init.d/​virt start
 </​code>​ </​code>​
-to start the LXC container ​and+to start it manually. 
 + 
 +  * To enter the LXC container ​type
 <​code>​ <​code>​
 lxc-attach -n guest0 lxc-attach -n guest0
 </​code>​ </​code>​
-to enter the container.+ 
 <​konsole>​ <​konsole>​
 ~ $ lxc-attach -n guest0 ~ $ lxc-attach -n guest0
Line 67: Line 89:
  
  
-  ​Enter+ 
 +===== Testing ===== 
 +  ​In the container, enter
 <​code>​ <​code>​
 cd cd
 </​code>​ </​code>​
-to change to the containers root folder and enter+to change to the containers root folder and
 <​code>​ <​code>​
-/.start-bluetooth.sh+./start-bluetooth.sh
 </​code>​ </​code>​
  
Line 87: Line 111:
 to start the bluetooth starting script. to start the bluetooth starting script.
 If everything works correctly, you will get a confirmation like in the picture. 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   * When everything is set up correctly, for example, you can use commands like
 <​code>​ <​code>​
 hcitool scan hcitool scan
 </​code>​ </​code>​
-to scan your surrounding for active bluetooth devices. 
 <​konsole>​ <​konsole>​
 root@jessie:​~#​ hcitool scan root@jessie:​~#​ hcitool scan
 Scanning ... Scanning ...
-        6C:4D:73:D3:41:CC       ​r00ti8P +        6C:4D:73:E3:31:AA       ​Phone 
 +      
 </​konsole>​ </​konsole>​
 +
 +to scan your surrounding for active bluetooth devices.
 +