Changes

Line 451: Line 451:     
'''Linux:'''
 
'''Linux:'''
  curl -d "{"\jsonrpc\":\"2.0\", \"id\":1, \"method\":\"call\", \"params\":[\"558a9b03c940e52f373f8c02498952e3\", \"uci\", \"set\", {\"config\":\"simcard\", \"type\":\"sim1\", \"match\":{\"service\":\"auto\", \"mtu\":\"1500\"},  
+
  curl -d "{"\jsonrpc\":\"2.0\", \"id\":1, \"method\":\"call\", \"params\":[\"558a9b03c940e52f373f8c02498952e3\", \"<span style=color:red>uci</span>\", \"<span style=color:red>set</span>\", {\"config\":\"<span style=color:orange>simcard</span>\", \"type\":\"<span style=color:orange>sim1</span>\", \"match\":{\"service\":\"<span style=color:orange>auto</span>\", \"mtu\":\"<span style=color:orange>1500</span>\"},  
  \"values\":{\"service\":\"lte-only\", \"mtu\":\"1476\"} } ] }
+
  \"values\":{\"service\":\"<span style=color:orange>lte-only</span>\", \"mtu\":\"<span style=color:orange>1476</span>\"} } ] }" http://<span style=color:black>192.168.1.1</span>/ubus
    
'''Response:'''
 
'''Response:'''
 
  {"jsonrpc":"2.0","id":1,"result":[<span style=color:blue>0</span>]}
 
  {"jsonrpc":"2.0","id":1,"result":[<span style=color:blue>0</span>]}
   −
The command used is '''uci set''' (highlighted in red). The config file name is '''simcard''', section '''sim1''', options '''mtu''' and '''service''' (configs and options highlighted in orange). The response shown above is a positive response, but don't forget to '''uci commit''' and '''luci-reload''' afterwards or else your changes will not take place.
+
The command used is '''uci set''' (highlighted in red). The config file name is '''simcard''', section '''sim1''', options '''mtu''' and '''service''' (configs and options highlighted in orange). The response shown above is a positive response, but don't forget to '''uci commit''' and '''luci-reload''' afterwards or else your changes will not take place. uci commit and luci reload commands are described '''[[Monitoring_via_JSON-RPC#Setting_router_parameters|here]]''' (for Windows) and '''[[Monitoring_via_JSON-RPC#Setting_router_parameters_2|here]]''' (for Linux).

Navigation menu