Differences

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

Link to this comparison view

configuration:bluetooth-low-energy-ble [2020/06/04 11:22]
dodenhoeft [Step 1 Change Bluetooth Mode]
configuration:bluetooth-low-energy-ble [2021/08/04 09:14]
Line 1: Line 1:
-====== Bluetooth Low Energy ====== 
  
-Since Software version 4.4.0.100 all netmodule device supports Bluetooth Low Energy via SDK. The following step by step description will guide you to configure a BLE Scanner on a NB800. 
- 
-===== Step 1 Change Bluetooth Mode ===== 
- 
-Since software version 4.4.0.100 all netmodule devices provide a bluetooth Interface on the WEB - GUI. For using bluetooth via SDK you need to enable the interface for the SDK environment:​ 
- 
-{{:​configuration:​ble.png|}} 
-===== Step 2 Run Script ===== 
- 
-Afterwards you can run the following BLE Script, ​ which is scanning available BLE Tags in the surroundings. 
- 
-<code - BLE_Scan.are>​ 
- 
-nb_bt_mode(BT1,​ BT_MODE_SCAN);​ 
-for (i = 0; i < 20; i++) { 
-    ​ 
-    devices = nb_bt_dev_list(BT1);​ 
-    printf("​%d:​ %d\n", i, length(devices));​ 
-    for (d = 0; d < length(devices);​ d++) { 
-        dev_info = nb_bt_dev_info(BT1,​ devices[d]);​ 
-      ​ 
-    } 
-    sleep(1); 
-} 
-nb_bt_mode(BT1,​ BT_MODE_OFF);​ 
-</​code>​ 
- 
-The script is scanning the surrounded available BLE device/tags and will show you the bluetooth advertising data. It will stop automatically after 20 detected devices/​tags.