Changes

Line 237: Line 237:  
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:
   −
   curl -d "{ \"jsonrpc\": \"2.0\", \"id\": 1, \"method\": \"call\", \"params\": [\"<span style=color:red>a74c8e07646f0da2bfddce35bf3de1f3</span>\", \"file\", \"exec\", { \"command\":\"<span style=color:orange>gsmctl</span>\", \"params\": [\"<span style=color:green>-q</span>\"] } ] }" http://192.168.1.1
+
   curl -d "{ \"jsonrpc\": \"2.0\", \"id\": 1, \"method\": \"call\", \"params\": [\"<span style=color:red>a74c8e07646f0da2bfddce35bf3de1f3</span>\", \"file\", \"exec\", { \"command\":\"<span style=color:orange>gsmctl</span>\", \"params\": [\"<span style=color:green>-q</span>\"] } ] }" http://192.168.1.1/ubus
 +
Highlighted in red is the '''Session ID'''. Replace this with your own Session ID. Highlighted in orange is the command that we used and highlighted in green is the parameter for the command - '''gsmctl -q'''. Shortly put, you can replace the Session ID, command and parameter with your needed values.
 +
 
 +
The picture bellow is visual representation of this example. Encapsulated in a blue rectangle is the answer to the gsmctl -q query: -73 dBm.
 +
 
 +
 
 +
[[Image:Configuration examples json-rpc terminal gsmctl.png]]
 +
 
    
</font>
 
</font>

Navigation menu