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:45]
dodenhoeft [Step 2 Run Script]
configuration:bluetooth-low-energy-ble [2021/08/04 09:14]
Line 1: Line 1:
-====== Bluetooth Low Energy ====== 
-Bluetooth is a standardized protocol for sending and receiving data via a 2.4GHz wireless link. It's a secure protocol, and it's perfect for short-range,​ low-power, low-cost, wireless transmissions between electronic devices. 
- 
-{{:​configuration:​ble1.png?​600|}} 
- 
-Since Software version 4.4.0.100 all netmodule device support 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 ===== 
- 
-For using bluetooth via SDK you need to enable the interface for the SDK environment via the WEB GUI: 
- 
-{{:​configuration:​ble.png|}} 
-===== Step 2. Run Script ===== 
- 
-Afterwards you can run the following BLE Script. 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. 
-<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>​ 
- 
-For more BLE SDK functionality,​ please check our [[ftp://​share.netmodule.com/​router/​public/​system-software/​latest/​NB_SDK_API_Manual.pdf|SDK API]]