-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't connect to an MQTT server that has a username and password #56
Comments
Your client id in the example above is .withClientIdentifier('Mqtt_MyClientUniqueId'), however in the picture it seems to be a user generated string, you may need to check the broker docs about how to generate the client id. |
Thanks for the reply Steve. As long as the client identifier string is unique there is no problem with the broker. MQTT.fx has a feature to generate a unique string though I could use any. |
OK, found the bug, for now add this to your connection message setup .authenticateAs(username, password); The username/password passed in to the connect method id not being reflected into the connect method correctly. |
Thanks Steve! The Here's the updated code:
|
Hello! I am trying to make a flutter app that connects to the MQTT server of meeo.xyz. I verified that I am able to connect to it by setting the credentials using MQTT.fx
When I try with mqtt_client, I get this error:
Here's my code:
I don't get it as to why I am getting a badUsernameOrPassword error but it is fine in MQTT.fx. Am I missing something for the setup? I've tried setting the
useWebsocket
as well but I am still having a problem connecting to the MQTT server.Any help would be deeply appreciated
The text was updated successfully, but these errors were encountered: