Changes

Line 52: Line 52:  
===Getting router parameters===
 
===Getting router parameters===
 
----
 
----
Now that you have obtained a Session ID, you can issue commands to the router. Lets start with commands that return information about the router. For example, this is a command that returns the router's '''[[RSSI]]'''(signal strength) value:
+
Now that you have obtained a Session ID, you can issue commands to the router. Lets start with commands that return information about the router. For example, this is a command that returns the router's '''[[RSSI]]''' (signal strength) value:
    
  {
 
  {
 
     "jsonrpc": "2.0", "id": 1, "method": "call", "params":  
 
     "jsonrpc": "2.0", "id": 1, "method": "call", "params":  
 
     [
 
     [
         "<span style=color:red>a74c8e07646f0da2bfddce35bf3de1f3</span>", "file", "exec",
+
         "<span style=color:red>'''bde01a2da4a6f4a515bb9466f90bc58a'''</span>", "file", "exec",
 
         {
 
         {
             "command":"<span style="color:orange">gsmctl</span>",
+
             "command":"<span style="color:orange">'''gsmctl'''</span>",
 
             "params":
 
             "params":
 
             [
 
             [
                 "<span style="color:orange">-q</span>"
+
                 "<span style="color:orange">'''-q'''</span>"
 
             ]
 
             ]
 
         }
 
         }
Line 68: Line 68:  
  }
 
  }
   −
The section highlighted in red is your Session ID, and the sections highlighted in orange are the command and the parameter. In this example we're using a '''gsmctl -q''' SSH command that returns the router's RSSI value:
+
The test highlighted in red is your Session ID, and highlighted in orange are the command and the parameter. In this example we're using a '''gsmctl -q''' SSH command that returns the router's RSSI value:
 
      
[[Image:Configuration examples json-rpc firefox poster get gsmctl q.PNG]]
 
[[Image:Configuration examples json-rpc firefox poster get gsmctl q.PNG]]
      
The Response  '''{"jsonrpc":"2.0","id":1,"result":[0,{"code":0,"stdout":"<span style="color:green">-59</span>\n"}]}''' tells us that the router's current signal strength is <span style="color:green">-59 dBm </span>.
 
The Response  '''{"jsonrpc":"2.0","id":1,"result":[0,{"code":0,"stdout":"<span style="color:green">-59</span>\n"}]}''' tells us that the router's current signal strength is <span style="color:green">-59 dBm </span>.

Navigation menu