MQTT CLI configuration for websocket

Hello,

Trying to connect to “broker.mqttdashboard.com” using port 8000 from MQTT CLI i have the output “Server closed connection without DISCONNECT.” What should be the configuration in config.properties file to connect
NB: I don t have the same issue when i use “broker.hivemq.com” on port 1883

Hi @almalb,

You need to use the -ws flag, when connecting to the websocket listener.
Like this:

mqtt sh
con -ws -h broker.hivemq.com -p 8000 -i clientID

Kind regards,
Florian

Hi,

Thank you for your answer, after using the suggested command i receive the error : Unknown option: ‘-ws’.
Thanks in advance

Which version of the CLI are you using?
It works fine for me.


Please note that I went to shell mode first in my example above by typing mqtt sh

It worked after changing the mqtt-cli version. Than you,