subscribe to our Youtube


13364 questions

15889 answers


50434 members

0 votes
61 views 0 comments
I have a mobile unit which has a RUT240 which provides internet access. I would like for the mobile unit to communicate with my main backend about its connection, so I need to gather some information about the router from the mobile unit. What's the best way to do this? Also, how do I gather information such as current connection type (wifi or mobile), latency to some target, signal strength, last time it used a fallback. If it is possible to force a change in connection type or to give it connection details to a wifi network, that would also be useful to have done from the mobile unit rather than the web GUI. Mobile unit is a computer so any communication must be CLI-based.

1 Answer

0 votes


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:

  • ip route get
or simply evaluate routing table metrics
  • ip route

To get mobile signal levels you can use the following command (firmware 7.3 and above):

  • gsmctl -q

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:

  • ubus list

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::

  • ubus -v mwan3

It gives: 


To use this data, I need to enter the following command

  • ubus call mwan3 status

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:

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 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:

  • uci show

Since the list is extensive, to target failover configuration use:

  • uci show mwan3 

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:
  • uci commit

Best regards,