Changes

Line 74: Line 74:  
Look for '''stdout'''; what follows after is the direct response to our query: ''{"jsonrpc":"2.0","id":1,"result":[0,{"code":0,"stdout":"<span style="color:green">'''-59'''</span>\n"}]}''. This tells us that the router's current signal strength is <span style="color:green">'''-59 dBm'''</span>.
 
Look for '''stdout'''; what follows after is the direct response to our query: ''{"jsonrpc":"2.0","id":1,"result":[0,{"code":0,"stdout":"<span style="color:green">'''-59'''</span>\n"}]}''. This tells us that the router's current signal strength is <span style="color:green">'''-59 dBm'''</span>.
 
----
 
----
You can issue many SSH commands in a similar manner. For example, if you wish to check the ''network'' config file, the SSH command to do so would be '''cat /etc/config/network''', which, translated to JSON-RPC, would be:
+
You can issue many SSH commands in a similar manner. For example, if you wish to check the ''network'' the command to do so would be:
    
  {
 
  {
Line 81: Line 81:  
         "a74c8e07646f0da2bfddce35bf3de1f3", "file", "exec",
 
         "a74c8e07646f0da2bfddce35bf3de1f3", "file", "exec",
 
         {
 
         {
             "command":"<span style="color:orange">cat</span>",
+
             "command":"<span style="color:orange">'''cat'''</span>",
 
             "params":
 
             "params":
 
             [
 
             [
                 "<span style="color:orange">/etc/config/network</span>"
+
                 "<span style="color:orange">'''/etc/config/network'''</span>"
 
             ]
 
             ]
 
         }
 
         }
 
     ]
 
     ]
 
  }
 
  }
Again the command and the parameter are highlighted in orange. In this case the Linux '''cat'''(short for “concatenate“) command is used to view the contents of the  '''/etc/config/network''' file. The Response is:
+
 
 +
Again the command and the parameter are highlighted in orange. In this case the '''cat''' command is used to view the contents of the  '''/etc/config/network''' file. The Response is:
     

Navigation menu