Changes

Line 428: Line 428:  
===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.
    "jsonrpc":"2.0", "id":1, "method":"call", "params":  
+
 
    [
+
'''Windows:'''
        "558a9b03c940e52f373f8c02498952e3", "uci", "set",
+
{
        {
+
    "jsonrpc":"2.0", "id":1, "method":"call", "params":  
            "config":"simcard", "type":"sim1", "match":
+
    [
            {
+
        "558a9b03c940e52f373f8c02498952e3", "uci", "set",
                "service":"auto",
+
        {
                "mtu":"1500"
+
            "config":"simcard", "type":"sim1", "match":
            },
+
            {
            "values":
+
                "service":"auto",
            {
+
                "mtu":"1500"
                "service":"lte-only",
+
            },
                "mtu":"1476"
+
            "values":
            }
+
            {
        }
+
                "service":"lte-only",
    ]
+
                "mtu":"1476"
}
+
            }
 +
        }
 +
    ]
 +
}
 +
 
 +
'''Linux:'''
 +
curl -d "{"\jsonrpc\":\"2.0\", \"id\":1, \"method\":\"call\", \"params\":[\"558a9b03c940e52f373f8c02498952e3\", \"uci\", \"set\", {\"config\":\"simcard\", \"type\":\"sim1\", \"match\":{\"service\":\"auto\", \"mtu\":\"1500\"},
 +
\"values\":{\"service\":\"lte-only\", \"mtu\":\"1476\"} } ] }
 +
 
 +
'''Response:'''
 +
{"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.

Navigation menu