Line 1: |
Line 1: |
− | {{Template:Networking_rutos_manual_fw_disclosure | + | {{Template: Networking_device_manual_fw_disclosure |
− | | fw_version = {{{series}}}_R_00.02.05 | + | | series = {{{series}}} |
− | | series = {{{series}}} | + | | name = {{{name}}} |
| + | | fw_version ={{Template: Networking_device_manual_latest_fw |
| + | | series = {{{series}}} |
| + | | name = {{{name}}} |
| + | }} |
| }} | | }} |
| __TOC__ | | __TOC__ |
| ==Summary== | | ==Summary== |
| | | |
− | The Bluetooth page contains information and settings related to the connected BT accessories. This chapter is an overview of the Bluetooth window in {{{name}}} devices. | + | The Bluetooth page contains information and settings related to the connected BT accessories. This chapter is an overview of the Bluetooth window in {{{name}}} devices working with confirmed accessories and sensors, performance and displayed data may differ using other Bluetooth devices. |
| | | |
| {{Template:Networking_rutos_manual_basic_advanced_webui_disclaimer | | {{Template:Networking_rutos_manual_basic_advanced_webui_disclaimer |
Line 14: |
Line 18: |
| ==General Settings== | | ==General Settings== |
| | | |
− | The <b>General Settings</b> section is used to turn {{{name}}}'s Bluetooth device on or off. | + | The <b>General Settings</b> section is used to turn {{{name}}}'s Bluetooth on or off and scan for other nearby Bluetooth devices. Before you can scan and pair devices, you must first turn Bluetooth on (it is disabled by default): |
− | | |
− | [[File:Networking_rutos_manual_bluetooth_general_settings.png|border|class=tlt-border]]
| |
− | | |
− | Before you scan for and pair devices, you must first turn Bluetooth on (it is disabled by default): | |
| | | |
| [[File:Networking_rutos_manual_bluetooth_general_settings_on.png|border|class=tlt-border]] | | [[File:Networking_rutos_manual_bluetooth_general_settings_on.png|border|class=tlt-border]] |
Line 25: |
Line 25: |
| | | |
| The <b>Available Devices</b> section displays a list of Bluetooth devices that are within range of the {{{name}}}. In order to see available devices, please make sure that Bluetooth is enabled and click the 'Scan' button. | | The <b>Available Devices</b> section displays a list of Bluetooth devices that are within range of the {{{name}}}. In order to see available devices, please make sure that Bluetooth is enabled and click the 'Scan' button. |
− |
| |
− | [[File:Networking_rutos_manual_bluetooth_available_devices_scan_button.png|border|class=tlt-border]]
| |
| | | |
| In order to pair {{{name}}} with another Bluetooth device, place a checkmark under the 'Pair' column next to that device and click 'Pair'. | | In order to pair {{{name}}} with another Bluetooth device, place a checkmark under the 'Pair' column next to that device and click 'Pair'. |
| | | |
− | [[File:Networking_rutos_manual_bluetooth_available_devices_pair_button.png|border|class=tlt-border]] | + | [[File:Networking_rutos_manual_bluetooth_available_devices_pair_button_v1.png|border|class=tlt-border]] |
| | | |
| If the pairing was successful, you should see the Bluetooth device appear under [[#Paired_Devices|Paired Devices]]. | | If the pairing was successful, you should see the Bluetooth device appear under [[#Paired_Devices|Paired Devices]]. |
Line 40: |
Line 38: |
| To view the information of a paired Bluetooth device, click the 'Details' button. | | To view the information of a paired Bluetooth device, click the 'Details' button. |
| | | |
− | [[File:Networking_rutos_manual_bluetooth_paired_devices_details_button.png|borde|class=tlt-border]] | + | [[File:Networking_rutos_manual_bluetooth_paired_devices_details_button_v2.png|border|class=tlt-border]] |
| | | |
| The Data page for a device may look similar to this, but the contents depend on the type of the Bluetooth device: | | The Data page for a device may look similar to this, but the contents depend on the type of the Bluetooth device: |
| | | |
− | [[File:Networking_rutos_manual_bluetooth_paired_devices_device_data.png|border|class=tlt-border]] | + | [[File:Networking_rutos_manual_bluetooth_paired_devices_device_data_v1.png|border|class=tlt-border]] |
| + | ---- |
| + | If you wish to unpair a Bluetooth device, place a checkmark under the 'Unpair' column next to that device and click 'Unpair'. If you have more than one device you should press 'Unpair all' option it works without checking checkmarks. |
| + | |
| + | [[File:Networking_rutos_manual_bluetooth_paired_devices_unpair_button_v1.png|border|class=tlt-border]] |
| + | |
| + | ==ubus commands== |
| + | |
| + | This section contains instructions on how to use <b>ubus commands</b> in order scan and pair with Bluetooth devices. |
| + | |
| + | The <i>ubus</i> [[Command Line Interfaces|command line]] tool provides the possibility to interact with the <i>ubusd</i> server (with all currently registered services). It uses the JSON format for calling procedures with parameters and returning responses. |
| + | |
| + | Before you start using ubus commands to control Bluetooth, make sure that Bluetooth is turned on in the [[#General_Settings|General Settings]] section. |
| + | ---- |
| + | You must first initialize <i>blesemd</i>. You can do that by executing <b><i>blesemd -D</i></b> command. The output should look similar to this: |
| + | |
| + | ... |
| + | root@Teltonika-{{{name}}}:~# <b>blesemd -D</b> |
| + | Initializing blesemd... |
| + | Warning: debug messages will be shown! |
| + | Preparing bluetooth interface... |
| + | Reading config... |
| + | Devices loaded: 0 |
| + | Creating database... |
| + | modbus_data table already exists |
| + | SENT_ID_TABLE already exists |
| + | Create DB done |
| + | Initializing uloop... |
| + | Connecting to ubus... |
| + | Initializing BLE device... |
| + | Initializing BLE ubus interface... |
| + | Adding ubus object... |
| + | ... |
| + | ---- |
| + | Run <b><i>scan.start</b></i> to start Bluetooth scan: |
| + | |
| + | ... |
| + | ubus call blesem <b>scan.start</b> |
| + | ... |
| + | |
| + | To see scan results, use command <b><i>scan.result</b></i>: |
| + | |
| + | ... |
| + | ubus call blesem <b>scan.result</b> |
| + | ... |
| ---- | | ---- |
− | If you wish to unpair a Bluetooth device, place a checkmark under the 'Unpair' column next to that device and click 'Unpair'. | + | The scan process takes about 30 seconds. If you see <b><i>"scanning": 1</b></i> in the output it means that scanning is still in progress. Once the scanning has finished, the <i>scan.result</i> output should look similar to this: |
| + | |
| + | ... |
| + | { |
| + | <b>"scanning": 0,</b> |
| + | "devices": [ |
| + | { |
| + | "name": "RT_T", |
| + | "rssi": -72, |
| + | "address": "FF:CB:FF:6F:23:FB" |
| + | } |
| + | ] |
| + | } |
| + | ... |
| + | |
| + | The list of device parameters will always contain"rssi" and "address", while the existence of "name" will depend on whether the paired Bluetooth supports it or not. |
| + | |
| + | ... |
| + | { |
| + | "scanning": 0, |
| + | "devices": [ |
| + | { |
| + | "rssi": -42, |
| + | "address": "2F:2A:0A:0A:7A:AA" |
| + | }, |
| + | { |
| + | "name": "RT_T", |
| + | "rssi": -77, |
| + | "address": "CF:0A:52:5E:35:D7" |
| + | } |
| + | ] |
| + | } |
| + | ... |
| + | ---- |
| + | In order to pair devices use the <b><i>pair</b></i> command and specify the device's MAC address: |
| + | |
| + | ... |
| + | ubus call blesem <b>pair</b> '{<b>"address":"FF:CC:FF:6A:23:CB"</b>}' |
| + | ... |
| + | |
| + | If the pairing process was successful you should see an output similar to this: |
| + | |
| + | ... |
| + | { |
| + | "success": "device successfully paired" |
| + | } |
| + | ... |
| + | --- |
| + | To get the statistics from paired devices, use the <b><i>stat</b></i> command and specify the device's MAC address: |
| + | |
| + | ... |
| + | ubus call blesem <b>stat</b> '{<b>"address":"FF:CB:FA:6A:23:CB"</b>}' |
| + | ... |
| + | |
| + | The output should look similar to this: |
| + | |
| + | ... |
| + | { |
| + | "success": "successfully requested status", |
| + | "model": "3901", |
| + | "battery": 98, |
| + | "temperature": "20.34", |
| + | "humidity": 20, |
| + | "firmware": "23", |
| + | . |
| + | } |
| + | ... |
| | | |
− | [[File:Networking_rutos_manual_bluetooth_paired_devices_unpair_button.png|border|class=tlt-border]]
| |
| | | |
| [[Category:{{{name}}} Services section]] | | [[Category:{{{name}}} Services section]] |