Changes

no edit summary
Line 1: Line 1: −
<p style="color:red">The information on this page is updated in accordance with the [https://wiki.teltonika-networks.com/view/FW_%26_SDK_Downloads'''00.07.4'''] firmware version .</p>
+
<p style="color:red">The information on this page is updated in accordance with the [https://wiki.teltonika-networks.com/view/FW_%26_SDK_Downloads'''00.07.08'''] firmware version .</p>
 
==Introduction==
 
==Introduction==
   Line 86: Line 86:  
The command itself is highlighted in orange.
 
The command itself is highlighted in orange.
   −
====Setting Multiple Parameters====
+
==Some Additional Commands==
----
  −
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):
  −
 
  −
curl -d "{\"jsonrpc\":\"2.0\", \"id\":1, \"method\":\"call\", \"params\":[\"558a9b03c940e52f373f8c02498952e3\", \"uci\", \"set\", {\"config\":\"ping_reboot\", \"match\":{\"enable\":\"<span style=color:orange>0</span>\", \"host\":\"<span style=color:orange>8.8.8.8</span>\", \"packet_size\":\<span style=color:orange>"56</span>\"}, \"values\":{\"enable\":\"<span style=color:green>1</span>\", \"host\":\"<span style=color:green>8.8.4.4</span>\", \"packet_size\":\"<span style=color:green>64</span>\"} } ] }" http://<span style=color:black>192.168.1.1</span>/ubus
  −
 
  −
The command above will '''enable''' the Ping Reboot function, set the host to ping to '''8.8.4.4''' and ping packet size to '''64'''. The default values are highlighted in orange and the new ones are highlighted in green.
  −
 
  −
'''Note: Remember always to use the commands in the order (set, commit, reload_config)'''
     −
==Some Additional Commands==
   
If the commands found in the guide above did not suffice your needs, this section provides a list of additional ones. The commands presented in this section will be for both Linux and Windows operating systems. They should be used as syntax examples for your own purposes.
 
If the commands found in the guide above did not suffice your needs, this section provides a list of additional ones. The commands presented in this section will be for both Linux and Windows operating systems. They should be used as syntax examples for your own purposes.
===WiFi clients list===
  −
----
  −
This command returns a list of devices connected to your WLAN and some additional information about the connection.
  −
  −
'''Windows:'''
  −
{
  −
    "jsonrpc": "2.0", "id": 1, "method": "call", "params":
  −
    [
  −
        "86fc586fa1471622473434ff0176fd66", "<span style=color:red>iwinfo</span>", "<span style=color:red>assoclist</span>",
  −
        {
  −
            "device":"wlan0"
  −
        }
  −
    ]
  −
}
  −
  −
'''Linux:'''
  −
curl -d "{ \"jsonrpc\": \"2.0\", \"id\": 1, \"method\": \"call\", \"params\": [ \"86fc586fa1471622473434ff0176fd66\", \"<span style=color:red>iwinfo</span>\", \"<span style=color:red>assoclist</span>\", {\"device\":\"wlan0\"} ] }" http://<span style=color:black>192.168.1.1</span>/ubus
  −
  −
'''The response''' should look something like this:
  −
{"jsonrpc":"2.0","id":1,"result":[0,{"results":
  −
[{"mac":"<span style=color:green>E4:02:9B:XX:XX:XX</span>","signal":<span style=color:blue>-32</span>,"noise":<span style=color:blue>-88</span>,"inactive":<span style=color:blue>10</span>,"rx":
  −
{"rate":<span style=color:blue>1000</span>,"mcs":<span style=color:blue>0</span>,"40mhz":<span style=color:blue>false</span>,"short_gi":<span style=color:blue>false</span>},"tx":
  −
{"rate":<span style=color:blue>72200</span>,"mcs":<span style=color:blue>7</span>,"40mhz":<span style=color:blue>false</span>,"short_gi":<span style=color:blue>true</span>}},
  −
{"mac":"<span style=color:green>D8:C7:71:XX:XX:XX</span>","signal":<span style=color:blue>-12</span>,"noise":<span style=color:blue>-88</span>,"inactive":<span style=color:blue>400</span>,"rx":
  −
{"rate":<span style=color:blue>1000</span>,"mcs":<span style=color:blue>0</span>,"40mhz":<span style=color:blue>false</span>,"short_gi":<span style=color:blue>false</span>},"tx":
  −
{"rate":<span style=color:blue>72200</span>,"mcs":<span style=color:blue>7</span>,"40mhz":<span style=color:blue>false</span>,"short_gi":<span style=color:blue>true</span>}}]}]}
  −
  −
To obtain these values, the Linux '''iwinfo''' command and '''assoclist''' parameter (red) are used. Highlighted in green are the devices connected to the router via WiFi as identified by their MAC addresses. The response information about the connection with the device, such as signal strength, noise, time of inactivity (idle time), rx, tx rate, etc., is highlighted in blue.
   
===WiFi information===
 
===WiFi information===
 
----
 
----
Line 136: Line 99:  
         "a70ceeba344b6046625d8bcec132796c", "<span style=color:red>iwinfo</span>", "<span style=color:red>info</span>",  
 
         "a70ceeba344b6046625d8bcec132796c", "<span style=color:red>iwinfo</span>", "<span style=color:red>info</span>",  
 
         {
 
         {
             "device":"wlan0"
+
             "device":"radio0"
 
         }
 
         }
 
     ]
 
     ]
Line 142: Line 105:     
'''Linux:'''
 
'''Linux:'''
  curl -d "{ \"jsonrpc\": \"2.0\", \"id\": 1, \"method\": \"call\", \"params\": [ \"a70ceeba344b6046625d8bcec132796c\", \"<span style=color:red>iwinfo</span>\", \"<span style=color:red>info</span>\", {\"device\":\"wlan0\"} ] }" http://<span style=color:black>192.168.1.1</span>/ubus
+
  curl -d "{ \"jsonrpc\": \"2.0\", \"id\": 1, \"method\": \"call\", \"params\": [ \"a70ceeba344b6046625d8bcec132796c\", \"<span style=color:red>iwinfo</span>\", \"<span style=color:red>info</span>\", {\"device\":\"radio0\"} ] }" http://<span style=color:black>192.168.1.1</span>/ubus
    
'''Response:'''
 
'''Response:'''
Line 204: Line 167:  
  {"jsonrpc":"2.0","id":1,"result":[0,{"code":0,"stdout":"<span style=color:blue>-23.612625\n-46.626355\</span>n"}]}
 
  {"jsonrpc":"2.0","id":1,"result":[0,{"code":0,"stdout":"<span style=color:blue>-23.612625\n-46.626355\</span>n"}]}
 
The blue part in the code are the Latitude and Longitude.
 
The blue part in the code are the Latitude and Longitude.
<br>
   
===Firmware number===
 
===Firmware number===
 
----
 
----
Line 224: Line 186:     
'''Response:'''
 
'''Response:'''
  {"jsonrpc":"2.0","id":1,"result":[0,{"data":"<span style=color:blue>RUTXXX_R_00.07.02.0</span>\n"}]}
+
  {"jsonrpc":"2.0","id":1,"result":[0,{"data":"<span style=color:blue>RUTXXX_R_00.07.08</span>\n"}]}
    
This command ('''file''', '''read''', highlighted in red) is an alternative to the Linux '''cat''' command. All you need is to specify the path (in this case '''/etc/version''', highlighted in red) to the file that you wish to read.
 
This command ('''file''', '''read''', highlighted in red) is an alternative to the Linux '''cat''' command. All you need is to specify the path (in this case '''/etc/version''', highlighted in red) to the file that you wish to read.
 +
<br>
 
===Reboot===
 
===Reboot===
 
----
 
----
Line 244: Line 207:     
'''Response:'''
 
'''Response:'''
 +
 
The success response for this command is an empty message. If the response contains no data, the command was executed successfully.  
 
The success response for this command is an empty message. If the response contains no data, the command was executed successfully.  
===Set SIM card information===
  −
----
  −
In this last example we'll try to change the mobile connection's MTU and Service mode values.
  −
  −
'''Windows:'''
  −
{
  −
    "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":"<span style=color:orange>lte-only</span>",
  −
                "mtu":"<span style=color:orange>1476</span>"
  −
            }
  −
        }
  −
    ]
  −
}
  −
  −
'''Linux:'''
  −
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\":\"<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:'''
  −
{"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, sections and options highlighted in orange). The response shown above is a positive response, but don't forget to execute ''uci commit'' and ''reload_config'' afterwards or else your changes will not take effect.
      
==See Also==
 
==See Also==