FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
730 views 3 comments
by anonymous
Hi Team,

I have connected an external device(as publisher) to teltonika router, in order to give internet to device. I am using test.mosquitto.org as my test broker. And MQTT Lens as my Subscriber but I cannot see any the messages on the subscriber. I was wondering is teltonika router blocking the messages? I have changed the Triffice rules for "Enable MQTT WAN" as ON. Is there any other changes that needs to be done? Could you please assist?

1 Answer

0 votes
by anonymous

Hi,

By default, all traffic from LAN is allowed to WAN.

The rule you have mentioned allows TCP packets on port 1883 to the device (router). If you want to allow traffic on port 1883 to LAN, you will need to edit this rule or create a new one that would allow TCP traffic on port 1883 from WAN to LAN. (MQTT default port, if you are using default port).

You can also use TCP dump to check if you are receiving traffic on MQTT port (1883 by default).

You can download TCPdump from CLI/SSH via following commands:

  • opkg update
  • opkg install tcpdump

Check for packets on port 1883:

  • tcpdump port 1883

Are you getting packets?

If you are still having issues, could you please attach a troubleshoot file? Troubleshoot file can be downloaded from System -> Administration -> Troubleshoot.

Kind Regards,

Andzej

Best answer
by anonymous
Thanks for your reply. Appreciate it. But just to understand here the Teltonika Router is configured as a switch to provide internet to the thirdy party device (publisher) on port 1883. So my question can the router block it from sending those topics to subscriber? How will the tests that you mentioned will help please?
by anonymous

Hi,

The MQTT communication between publisher and subscriber happens through an MQTT broker. MQTT publisher sends (publishes) some information to MQTT broker on a specific topic. Subscribes then asks for information on that topic from MQTT broker. 

Your MQTT publisher is connected to the LAN network of the router. So it can send any traffic to the internet, as the router allows all LAN packets to WAN. Hence, your publisher device can send topics to the broker. 

The commands I have provided would let us know if there is any communication on port 1883. When you start 'tcpdump port 1883', you will see if MQTT packets are coming in/out of the device and the IP addresses associated. After you start the command, please, try to publish some topic from the publisher to generate some packets. Do you see any packets? You can take a screenshot and send it to me via private message.

If you are having problems, please, generate a troubleshoot file. Troubleshoot file can be downloaded from System -> Administration -> Troubleshoot. Attach the troubleshoot to your question or send it to me via private message.

Kind Regards,

Andzej

by anonymous

Hi Andzej,

Thanks for the details it was helpful. I tried the commands and below is the reply. Could you please check it. I tired accessing private message. Could not work it out.