WAN in use (WAN,Wifi, LTE) to modbus or mqtt

Hi Guys,

I have the RUTX50 and i have WAN’s setup to use the failover function.

My WAN’s in use are MultiAP SSID, WAN Port and LTE (Sim 1).

I have all that working fine, however, i would like to be able to monitor which WAN interface the RUT is using at any given time.

I can see how to use Event Reporting for this function, but its not really ideal as my WAN interface can often change every 5 minutes as the RUT is in a vehicle.

Is there a way for either Modbus or the MQTT Broker to monitor which WAN interface is in use so that i can use this value elsewhere?

Thanks in advance :slight_smile:

Hello, @tenacioustech! Hope you’re doing good

It is possible to achieve this through Modbus, although it will require additional effort. Modbus parameters are stored within registers; however, there are no predefined registers for WAN interface status.
The predefined register numbers and their corresponding system values are detailed in the table available at the following link: RUTX50 Modbus - Teltonika Networks Wiki

You can develop a script to load the desired interface status, create a custom register for the WAN interface card, and then read the register using your client. For guidance on creating a custom register, please refer to this link:

Hope this fits your needs.

Best Regards.

Thanks Leonardo,

Is there any documentation on where to get the information to put into the script? ie how to reference the WAN port in use inside the script?

Hi, @tenacioustech

You may refer to UCI command usage to become familiar with the command structure and possibilities. Please refer to this link: UCI command usage - Teltonika Networks Wiki

Additionally, remember to include to include your script in the startup script. Please, refer to the following link: Template:Networking rutos manual custom scripts - Teltonika Networks Wiki

Here are some script examples that you may find useful: User Scripts examples - Teltonika Networks Wiki

Please feel free to reach out if you need any further assistance.

Best Regards.

Thank you, from looking through all the UCI show lists, i cannot see any listings for which WAN is currently in use. From a quick search through this forum, others have not been able to find this in UCI either as the UCI is referring to config files which are static.

This topic was automatically closed after 15 days. New replies are no longer allowed.