mqtt-over-ws-client with user and password doesn't work #2489
-
Hi forum In order to achieve that I've filled user/pass before to call mg_mqtt_login. Running a mosquitto eclipse MQTT broker container (localhost) I can't establish the connection. Basically, the websocket connection is established but it mg_mqtt_login doesn't return anything from broker.
I've try HIVEMQ and works as expected.
If anybody has experience with mqtt over webosocket + login, I've created a zip file attached containing the modified source code + Wireshark captures (one for hivemq and one with mosquito localhost broker). Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
#2488 #2490 |
Beta Was this translation helpful? Give feedback.
-
I can't guess with no network captures. I've seen your capture where Mongoose sends and Mosquitto does not answer... |
Beta Was this translation helpful? Give feedback.
Given that HiveMQ works, I don't see this as a Mongoose issue.
In your capture I see the websocket communication seems to establish, but your broker does not answer, it is not listening for MQTT in that port. Frame 13 is the login attempt, it is the very same 35-byte content that is sent to HiveMQ as frame 8 in the other capture file:
10: MQTT connect control message, no flags
21: 33, remaining length
00 04: Protocol Name length
MQTT
04: v3.1.1
etc. https://docs.oasis-open.org/mqtt/…