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.
+1 vote
433 views 3 comments
by anonymous
Hello

I'm trying to set up the MQTT broker with a password file containing username and password as such:

david:test

Then i turn off anonymous access and try to subscribe from my computer, but i am denied access.

In the legacy WebUI manual it says to create the password file with mosquitto_passwd, but when i access the router via SSH, the app doesn't exist.

Am i supposed to encrypt the password file by some other means, before i can use it?

Best Regards, David

1 Answer

+1 vote
by anonymous

Hello,

You can read more about mosquitto_passwd utility in the following link: https://mosquitto.org/man/mosquitto_passwd-1.html.

To be able to use it on the router, you first need to execute the following commands in the router via CLI/SSH:

  • opkg update
  • opkg install mosquitto-clients

You can also generate password file in a Linux PC or a virtual machine.

Password file creation example is described in the following site: http://www.steves-internet-guide.com/mqtt-username-password-example/

MQTT example configuration is provided in this page: https://wiki.teltonika-networks.com/view/Monitoring_via_MQTT.

Best regards,

Best answer
by anonymous
Hello,

Thanks for taking your time to respond.

mosquitto-clients doesn't exist in the repositories, but i can see mosquitto-client-ssl and ...-nossl, but neither of them contain mosquitto-passwd.

I can see that 1 update failed:
.../mips_24kc/vuci/Packages.gz

Best regards,
by anonymous

Try simply: 

  • opkg install mosquitto

It should download mosquitto-ssl and you should be able to configure passwords.

by anonymous

Hello again

I have a new problem, where after resetting to factory setting, i am unable to install mosquitto with the password utility.

I run 

  • opkg update
  • opkg install mosquitto

But the password utility is not included this time?

I am also unable to add the MQTT service from the WebUI.

Best regards