Hello,
There is no unified way to gather data of the points you have you have mentioned, thus, it really depends on what you specifically require.
You could enquire current main WAN connection by querying the interface to reach some remote host. For example:
or simply evaluate routing table metrics
To get mobile signal levels you can use the following command (firmware 7.3 and above):
Generally, in terms of device data monitoring and management you could use ubus calls. There is no documentation on this, at least from Teltonika side, but it is similar to what OpenWRT provides in this link.
Below I will provide some generalized instructions on how to use/navigate ubus.
to list all of the available services enter the command below:
Next, to find the details on possible procedures in regards to a specific service from the list, use the following syntax. For example I want to get failover configuration details and currently used WAN interface, I need procedures related tomwan3 application, responsible for failover::
It gives:
"status":{"section":"String","interface":"String","policies":"String"}
To use this data, I need to enter the following command
The idea is to replace -v list with call and add one of the listed procedures after the process. The output will list many details about failover interfaces and configuration.
For another example, I want details about wireless interface procedures:
- ubus -v list network.wireless
This outputs the following:
"up":{}
"down":{}
"reconf":{}
"status":{}
"notify":{}
"get_validate":{}
Let's say I'm interested in wireless interface details, the command would be:
- ubus call network.wireless status
Another command below will return wireless interface details too, as well as results of wireless client details:
- ubus call vuci.network.wireless wifi_interface_status
Following a similar logic, you can find details and statistics for wireless clients with the command:
- ubus call hostapd.wlan0 get_clients
Mobile data usage statistics for a day:
- ubus call mdcollect get '{"period":"day","iface_name":"wwan0","sim":1,"modem":1,"current":True}'
Mobile signal metrics:
- ubus call gsm.modem0 get_signal_query
To change main interface, you could use uci commands to configure failover interface metrics:
To list all available currently configured settings simply enter:
Since the list is extensive, to target failover configuration use:
Change metrics by (actual option names might differ based on your configuration):
- uci set mwan3.mob1s1a1_member_mwan.metric='<integer>'
- uci set mwan3.Wi_Fi_member_mwan.metric='<integer>'
To execute changes enter:
Best regards,