Difference between revisions of "How to use UBUS commands for Bluetooth device scanning / pairing"
From Teltonika Networks Wiki
PauliusRug (talk | contribs) |
|||
(39 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | + | This page contains instructions on how to use CLI / SSH command '''UBUS''' for scanning and pairing new Bluetooth devices on RUTX. | |
− | This page contains instructions on how to use | ||
---- | ---- | ||
− | + | * Enable Bluetooth in Web UI menu '''Network -> Bluetooth -> General'''. Click ''"Save&Apply"''. | |
− | |||
− | |||
− | |||
− | + | * Login using [[CLI]] and run '''scan.start''' command to start Bluetooth scan: | |
− | |||
− | * | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | --- | |
ubus call blesem scan.start | ubus call blesem scan.start | ||
− | + | --- | |
− | *To see scan results, use command '''scan.result''': | + | * To see scan results, use command '''scan.result''': |
− | + | --- | |
ubus call blesem scan.result | ubus call blesem scan.result | ||
− | + | --- | |
− | + | Kuri parodys sąrašą tokiu formatu: | |
− | + | { | |
− | |||
"scanning": 0, | "scanning": 0, | ||
"devices": [ | "devices": [ | ||
Line 52: | Line 25: | ||
"name": "RT_T", | "name": "RT_T", | ||
"rssi": -72, | "rssi": -72, | ||
− | "address": "FF:CB: | + | "address": "FF:CB:FA:6A:23:CB" |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
} | } | ||
] | ] | ||
− | + | } | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | Skanavimas vyksta apie 30sek., todėl su „scanning“ rodoma ar vis dar yra vykdomas skanavimas. Šiuo atveju, galima užklausinėti „scan.result“ kol „scanning“ = 1. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Revision as of 11:51, 24 April 2020
Main Page > General Information > Configuration Examples > Hardware application > How to use UBUS commands for Bluetooth device scanning / pairingThis page contains instructions on how to use CLI / SSH command UBUS for scanning and pairing new Bluetooth devices on RUTX.
- Enable Bluetooth in Web UI menu Network -> Bluetooth -> General. Click "Save&Apply".
- Login using CLI and run scan.start command to start Bluetooth scan:
--- ubus call blesem scan.start ---
- To see scan results, use command scan.result:
--- ubus call blesem scan.result ---
Kuri parodys sąrašą tokiu formatu:
{
"scanning": 0, "devices": [ { "name": "RT_T", "rssi": -72, "address": "FF:CB:FA:6A:23:CB" } ]
}
Skanavimas vyksta apie 30sek., todėl su „scanning“ rodoma ar vis dar yra vykdomas skanavimas. Šiuo atveju, galima užklausinėti „scan.result“ kol „scanning“ = 1.