Changes

no edit summary
Line 33: Line 33:     
===Obtaining a session ID===
 
===Obtaining a session ID===
 
+
----
 
To login to the router via JSON-RPC you will need software capable of sending HTTP POST requests to the router. The simplest solution is to install an add-on similar to Firefox’s '''“Poster”''': '''https://addons.mozilla.org/en-US/firefox/addon/poster/'''.  
 
To login to the router via JSON-RPC you will need software capable of sending HTTP POST requests to the router. The simplest solution is to install an add-on similar to Firefox’s '''“Poster”''': '''https://addons.mozilla.org/en-US/firefox/addon/poster/'''.  
   Line 82: Line 82:     
===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:
   Line 128: Line 128:     
===Setting router parameters===
 
===Setting router parameters===
 
+
----
 
The '''uci set''' command is used to set router parameters. As an example, lets try to change the router's WiFi SSID. The command to do so looks like this:
 
The '''uci set''' command is used to set router parameters. As an example, lets try to change the router's WiFi SSID. The command to do so looks like this:
    
====uci set====
 
====uci set====
 
+
----
 
  {
 
  {
 
     "jsonrpc":"2.0", "id":1, "method":"call", "params":
 
     "jsonrpc":"2.0", "id":1, "method":"call", "params":
Line 157: Line 157:     
====uci commit====
 
====uci commit====
 
+
----
 
When you set changes using '''uci commit''', you're only changing a copy of the file that is located in the router's RAM memory. In order for the changes to take place you'll need to issue a '''uci commit''' command that will commit the changes from RAM to flash memory. Continuing from the example above, lets commit the Wireless SSID changes. The command to do so looks like this:
 
When you set changes using '''uci commit''', you're only changing a copy of the file that is located in the router's RAM memory. In order for the changes to take place you'll need to issue a '''uci commit''' command that will commit the changes from RAM to flash memory. Continuing from the example above, lets commit the Wireless SSID changes. The command to do so looks like this:
   Line 174: Line 174:     
====luci-reload====
 
====luci-reload====
 
+
----
 
The last step to take in order for the changes to take effect is the '''luci-reload''' command which restarts all the services relevant to our configuration. The '''luci-reload''' command looks like this:
 
The last step to take in order for the changes to take effect is the '''luci-reload''' command which restarts all the services relevant to our configuration. The '''luci-reload''' command looks like this:
   Line 219: Line 219:     
===Obtaining a session ID===
 
===Obtaining a session ID===
 
+
----
 
To login to the router via JSON-RPC you must first obtain a Session ID. To do so, open the '''Terminal''' app and execute this command:
 
To login to the router via JSON-RPC you must first obtain a Session ID. To do so, open the '''Terminal''' app and execute this command:
   Line 232: Line 232:     
===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:
   Line 252: Line 252:     
===Setting router parameters===
 
===Setting router parameters===
 +
----
 +
This section will describe how to use '''uci set''' commands via JSON-RPC
    
====uci set====
 
====uci set====
 
+
----
 
The uci set command is used to set router parameters. As an example, lets try to change the router's LAN ip address. The command to do so looks like this:
 
The uci set command is used to set router parameters. As an example, lets try to change the router's LAN ip address. The command to do so looks like this:
   Line 267: Line 269:     
====uci commit====
 
====uci commit====
 
+
----
 
In order to commit the changes from RAM to flash memory, you must first send a UCI commit command. Continuing from the example above, lets commit the network changes. The command to do so looks like this:
 
In order to commit the changes from RAM to flash memory, you must first send a UCI commit command. Continuing from the example above, lets commit the network changes. The command to do so looks like this:
   Line 277: Line 279:     
====luci-reload====
 
====luci-reload====
 
+
----
 
The last step to take in order for the changes to take effect is the luci-reload command which restarts all the services relevant to our configuration. The luci-reload command looks like this:
 
The last step to take in order for the changes to take effect is the luci-reload command which restarts all the services relevant to our configuration. The luci-reload command looks like this:
   Line 285: Line 287:     
====Setting Multiple Parameters====
 
====Setting Multiple Parameters====
 
+
----
 
This next example describes how to set multiple parameters in a single config file with one command. Lets change the default configuration of the Ping Reboot function (ping_reboot config file):
 
This next example describes how to set multiple parameters in a single config file with one command. Lets change the default configuration of the Ping Reboot function (ping_reboot config file):
   Line 297: Line 299:     
===Wi-Fi clients list===
 
===Wi-Fi clients list===
 
+
----
 
This command returns a list of devices connected to your WLAN and some additional information about the connection.
 
This command returns a list of devices connected to your WLAN and some additional information about the connection.
   Line 326: Line 328:     
===Wi-Fi information===
 
===Wi-Fi information===
 
+
----
 
This command returns information on your Wi-Fi Access Point.
 
This command returns information on your Wi-Fi Access Point.
   Line 351: Line 353:     
===Manufacturing information===
 
===Manufacturing information===
 
+
----
 
This command returns information about the device's manufacturing details like device's Product Code, Serial Number MAC Address, etc.
 
This command returns information about the device's manufacturing details like device's Product Code, Serial Number MAC Address, etc.
   Line 384: Line 386:     
===Firmware number===
 
===Firmware number===
 
+
----
 
This command returns the device's Firmware version number.
 
This command returns the device's Firmware version number.
   Line 407: Line 409:     
===Reboot===
 
===Reboot===
 
+
----
 
'''Windows:'''
 
'''Windows:'''
 
  {
 
  {
Line 427: Line 429:     
===Set SIM card information===
 
===Set SIM card information===
 
+
----
 
In this last example we'll try to change the mobile connection's MTU and Service mode.  
 
In this last example we'll try to change the mobile connection's MTU and Service mode.  
  

Navigation menu