Skip to content

QoS Agent — Teltonika modems

Install and run the LatenceTech QoS monitor on a Teltonika RUTX50 (RutOS) using the provided .ipk package.

You need:

  • SSH access as root to the router
  • Site values: agent id, customer id, reflector, analyzer, names

Replace 192.168.1.1 with your router’s LAN IP where shown.


1. Download and upload the package

On your laptop, download the release from LatenceTech:

wget https://api.latence.ca/software/lti-qos-agent.ipk

Then copy it to the router:

scp lti-qos-agent.ipk root@192.168.1.1:/tmp/

2. Install system packages

ssh root@192.168.1.1
opkg update

opkg install python3
opkg install iperf3

You can also install those 2 packages from the Web UI: System → Package Manager


Mobile / SIM must be registered for radio metrics:

gsmctl -q

If you see N/A, enable the SIM and APN in the WebUI (Status → Network → Mobile), then retry.

GPS (optional): WebUI → Services → GPS → Enabled, antenna with sky view. Until there is a fix, position can use the static value in config (LTI_agent_gps_pos if set).


4. Install the QoS agent

opkg install /tmp/lti-qos-agent.ipk

An “unsigned package” warning is normal for a local file.

On RutOS the files typically land under /usr/local/… (for example /usr/local/usr/lib/lti-qos/). The service is available as /etc/init.d/lti-qos.


5. Configure the site

vi /etc/lti-qos.env

If that path is missing, try:

vi /usr/local/etc/lti-qos.env

Quote values that contain spaces. Example (adjust for your site):

LTI_reflector="REFLECTOR_IP"
LTI_analyzer="ANALYZER_IP"
LTI_agent_id="1"
LTI_customer_id="0"
LTI_agent_verbose="INFO"
LTI_startup_delay="0"
LTI_agent_name="RUTX50 Office"
LTI_agent_hardware="RUTX50"
LTI_agent_net_type="5G"
LTI_agent_net_name="RUT_A923"
LTI_agent_address="Teltonika"
LTI_agent_details="Teltonika RUTX50"
LTI_icmp_interval="2"
LTI_tcp_interval="2"
LTI_udp_interval="2"
LTI_http_interval="2"
LTI_https_interval="2"
LTI_twamp_session_interval="5"
LTI_packetlossudp_interval="5"
LTI_iperf3_first_interval="30"
LTI_iperf3_session_interval="7200"
LTI_iperf3_exec="iperf3"
LTI_device_interval="20"
LTI_radio_interval="10"
LTI_gps_interval="30"

On start, the service writes LTI_analyzer into /etc/hosts as msgbus.latence.ca (and restarts dnsmasq only if that mapping changed). You do not need to edit /etc/hosts by hand in order to reach the analyzer.


6. Start the service

/etc/init.d/lti-qos enable
/etc/init.d/lti-qos start

Everyday commands

/etc/init.d/lti-qos status
/etc/init.d/lti-qos start
/etc/init.d/lti-qos stop
/etc/init.d/lti-qos restart
/etc/init.d/lti-qos enable     # start on boot
/etc/init.d/lti-qos disable    # do not start on boot

Logs

logread -f
# or:
logread | grep -i "LT QoS"

Healthy startup (example)

Starting LatenceTech QoS_Monitor-…
Starting ICMP probe with interval 2.0s
Starting TCP probe with interval 2.0s
…
Starting TWAMP probe with interval 10.0s
Starting Iperf3 probe with interval 30.0s
Starting PacketLossUDP probe with interval 5.0s

Update (new package version)

  1. On your laptop, download the new package and upload it (wget + scp as in step 1).
  2. On the router:
opkg install /tmp/lti-qos-agent.ipk
/etc/init.d/lti-qos restart

Your edited /etc/lti-qos.env is kept. You usually do not need to remove the package first.

If the upgrade fails, then:

opkg remove lti-qos
opkg install /tmp/lti-qos-agent.ipk
vi /etc/lti-qos.env
/etc/init.d/lti-qos start

Stop / uninstall

/etc/init.d/lti-qos stop
/etc/init.d/lti-qos disable
# full remove (keeps a modified env file unless you delete it):
opkg remove lti-qos
rm -f /etc/lti-qos.env /usr/local/etc/lti-qos.env

Troubleshooting

Symptom What to do
gsmctl -q → N/A Insert/enable SIM; set APN; WebUI Status → Network → Mobile
GPS always 0,0 / gpsd … Not found Enable Services → GPS; antenna outdoors; or set static LTI_agent_gps_pos
python3: not found / service respawns opkg install python3, then /etc/init.d/lti-qos restart
No lines in a log file Use logread -f (logs go to system log)
PacketLoss … Connection refused From the router: nc -vz <reflector> 12555 — check carrier/firewall/ACL
iperf never runs opkg install iperf3 and set LTI_iperf3_exec=iperf3
Two agents running Remove any old python3 main.py block from /etc/rc.local
Dashboard radio looks empty / odd Confirm SIM is registered (gsmctl -q); restart the service

For support, contact LatenceTech with your agent id and a short logread excerpt after startup.