Changes

Line 255: Line 255:  
===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 LAN ip address. The command to do so looks like this:
+
====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:
      Line 263: Line 265:     
</font>
 
</font>
 +
 +
====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:
 +
 +
  curl -d "{\"jsonrpc\":\"2.0\", \"id\":1, \"method\":\"call\", \"params\":[\"9704f676709d9dedc98d7718c4e3e7d2\", \"uci\", \"commit\", {\"config\":\"<span style=color=orange>network</span>\"} ] }" http://<span style=color:black>192.168.1.1</span>/ubus
 +
 +
When committing changes, you will need to specify the name of the file where the changes took place (in this case, network, which is highlighted in orange). If the commit was successful, you should see the same message as before:
 +
 +
'''{"jsonrpc":"2.0","id":1,"result":[0]}'''