Changes

no edit summary
Line 77: Line 77:  
<font size="+1">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:
 
<font size="+1">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": [ "bde01a2da4a6f4a515bb9466f90bc58a", "file", "exec", { "command": "<span style="color:orange">gsmctl</span>", "params":["<span style="color:orange">-q</span>"] } ] }"
+
{"jsonrpc": "2.0", "id": 1, "method": "call", "params": [ "<span style="color:red">bde01a2da4a6f4a515bb9466f90bc58a</span>", "file", "exec", { "command": "<span style="color:orange">gsmctl</span>", "params":["<span style="color:orange">-q</span>"] } ] }"
 +
 
 +
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''' command that returns the router's '''[[RSSI]]''' value:
 +
 
 +
 
 +
[[Image:Configuration examples json-rpc firefox poster gsmctl q.PNG]]
 +
 
 +
The Response was {"jsonrpc":"2.0","id":1,"result":[0,{"code":0,"stdout":"<span style="color:green">-59</span>\n"}]} </font>

Navigation menu