Template:Networking rutxxx configuration example JSON RPC: Difference between revisions
Appearance
Oscar.morao (talk | contribs) No edit summary |
Oscar.morao (talk | contribs) No edit summary |
||
| Line 13: | Line 13: | ||
* One RUTxxx series router.<br> | * One RUTxxx series router.<br> | ||
'''Configuration scheme:''' | '''Configuration scheme:''' | ||
[[File:{{{file_scheme}}}|border|class=tlt-border| | [[File:{{{file_scheme}}}|border|class=tlt-border|center]] | ||
==Enabling JSON-RPC== | ==Enabling JSON-RPC== | ||
Before anything else, you'll need to make sure JSON-RPC is enabled on your router. JSON-RPC is enabled by default, so if you haven't made any changes to the router's access settings, everything should be in order. Otherwise you can check JSON-RPC status by logging into your router's WebUI and navigating to '''System → Administration → Access Control'''. Look for the ''WebUI'' section; there will be an '''Enable JSON RPC''' field. Make sure it is checked: | Before anything else, you'll need to make sure JSON-RPC is enabled on your router. JSON-RPC is enabled by default, so if you haven't made any changes to the router's access settings, everything should be in order. Otherwise you can check JSON-RPC status by logging into your router's WebUI and navigating to '''System → Administration → Access Control'''. Look for the ''WebUI'' section; there will be an '''Enable JSON RPC''' field. Make sure it is checked: | ||
[[File:WEBUI JSON.jpg|border|class=tlt-border| | [[File:WEBUI JSON.jpg|border|class=tlt-border|center]] | ||
==Using JSON-RPC (Windows)== | ==Using JSON-RPC (Windows)== | ||
| Line 52: | Line 52: | ||
<li>Once you have everything in order, click '''Send''':</li> | <li>Once you have everything in order, click '''Send''':</li> | ||
</ul> | </ul> | ||
[[File:GETTING ID.jpg|border|class=tlt-border| | [[File:GETTING ID.jpg|border|class=tlt-border|center]] | ||
<br> | <br> | ||
<ul> | <ul> | ||
| Line 93: | Line 93: | ||
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''' command that returns the router's RSSI (signal strength) 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''' command that returns the router's RSSI (signal strength) value. | ||
[[File:GETTING | [[File:GETTING RSSI3.jpg|border|class=tlt-border|center]] | ||
Look for '''stdout''' in the post response: <span style="color:green">'''"stdout":"-69\n'''</span>". This tells us that the router's current signal strength is <span style="color:green">'''-69 dBm'''</span>. | Look for '''stdout''' in the post response: <span style="color:green">'''"stdout":"-69\n'''</span>". This tells us that the router's current signal strength is <span style="color:green">'''-69 dBm'''</span>. | ||
| Line 117: | Line 117: | ||
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: | 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: | ||
[[File: | [[File:GETTING NETWORK.jpg|border|class=tlt-border|center]] | ||
===Setting router parameters=== | ===Setting router parameters=== | ||
| Line 163: | Line 163: | ||
</ul> | </ul> | ||
If the issued command was a success, you should see a Response like this:<br> | If the issued command was a success, you should see a Response like this:<br> | ||
[[File: | |||
[[File:CHANGING SSID.jpg|border|class=tlt-border|center]] | |||
====UCI COMMIT==== | ====UCI COMMIT==== | ||
| Line 182: | Line 183: | ||
If the commit was successful, you should see the same message as before: | If the commit was successful, you should see the same message as before: | ||
[[File: | [[File:COMMIT.jpg|border|class=tlt-border|center]] | ||
====LUCI-RELOAD==== | ====LUCI-RELOAD==== | ||
| Line 198: | Line 199: | ||
} | } | ||
The command itself is highlighted in orange.<br> | The command itself is highlighted in orange.<br> | ||
[[File: | [[File:LUCI RELOAD.jpg|border|class=tlt-border|center]]<br> | ||
====Setting Multiple Parameters==== | ====Setting Multiple Parameters==== | ||