mqttClient-for-Legato with mosquitto setup?

I am trying to get mqttClient-for-Legato on a WP7700 / mangOH Red talking to a mosquitto server running on an Ubuntu host.

I have used mqtt config set to set the host IP in the config to and port to 1883 (used by mosquitto), then enter mqtt session start, however it doesn’t seem to be attempting to connect. On the other hand I can connect using nc 1883 on the WP7700, mosquitto reports the new connection on the Ubuntu side.

Has anyone made this work?

It appears that the le_data routines do not work over the ECM interface with the host. Marked solved to close the question. Looks similar to this problem:

can i have the sample code how to work in mosquitto mqqt , Since am new to this platform i would like to know basic step how to publish and subscribe through mosquitto mqtt
Provide Interface binding in the code

1 Like

I ended up using the Paho MQTT library which has a straightforward interface and works with any internet connection. You can use the sample programs as a model.

Hi @piinst, sorry fot the answer: where is mqtt config set? And how do you enter in the mqtt session start? In the app start? I have the following folder in the mangOH project and I’ave already installed mosquitto on ubuntu:

Hi, I am not using the MqttClient app. The paho MQTT library which I use resides inside my main application and has its own api.

I didn’t understand how to build it. Did you follow this guide?

Not using that app. I am using the paho MQTT library as downloaded from

1 Like

ah ok I understand: paho is another way for the client side. Do you think is simpliest to use mqttClient folder or paho? (As broker I want to use Mosquitto)