Changes

no edit summary
Line 3: Line 3:  
----
 
----
 
The '''ubus''' command line tool allows to interact with the '''ubusd''' server (with all currently registered services). It's useful for investigating/debugging registered namespaces as well as writing shell scripts. For calling procedures with parameters and returning responses it uses the user-friendly JSON format. Below is an '''Help output''' of this command:
 
The '''ubus''' command line tool allows to interact with the '''ubusd''' server (with all currently registered services). It's useful for investigating/debugging registered namespaces as well as writing shell scripts. For calling procedures with parameters and returning responses it uses the user-friendly JSON format. Below is an '''Help output''' of this command:
 
+
...
 
  root@Teltonika-RUTX11:~# ubus
 
  root@Teltonika-RUTX11:~# ubus
 
  Usage: ubus [<options>] <command> [arguments...]
 
  Usage: ubus [<options>] <command> [arguments...]
Line 21: Line 21:  
  - wait_for <object> [<object>...]      Wait for multiple objects to appear on ubus
 
  - wait_for <object> [<object>...]      Wait for multiple objects to appear on ubus
 
  - monitor                              Monitor ubus traffic
 
  - monitor                              Monitor ubus traffic
 
+
...
 
----
 
----
 
Steps to use '''UBUS''' for Bluetooth on RUTX:
 
Steps to use '''UBUS''' for Bluetooth on RUTX:
Line 29: Line 29:  
* Login using [[CLI]] and run '''scan.start''' command to start Bluetooth scan:
 
* 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
  ---
+
  ...
    
You should see similar results format like this:
 
You should see similar results format like this:
   −
   
+
  ...
 
  {  
 
  {  
 
       "scanning": 0,  
 
       "scanning": 0,  
Line 52: Line 52:  
       ]  
 
       ]  
 
  }
 
  }
   
+
  ...
    
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.
 
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.

Navigation menu