How to use UBUS commands for Bluetooth device scanning / pairing

From Teltonika Networks Wiki
Revision as of 09:59, 24 April 2020 by SarunasKa (talk | contribs) (Created page with "Bluetooth skanavimas vyksta siunčiant ubus komandą: ubus call blesem scan.start Skanavimo rezultatų gavimas siunčiant ubus komandą: ubus call blesem scan.result Kur...")

(diff) ← Older revision | Approved revision (diff) | Latest revision (diff) | Newer revision → (diff)
Main Page > General Information > Configuration Examples > Hardware application > How to use UBUS commands for Bluetooth device scanning / pairing

Bluetooth skanavimas vyksta siunčiant ubus komandą:

ubus call blesem scan.start

Skanavimo rezultatų gavimas siunčiant ubus komandą:

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.