mqtt in esp32 example code

vinayakk28
Posts: 8
Joined: Wed Sep 19, 2018 10:21 am

mqtt in esp32 example code

Postby vinayakk28 » Sat Oct 27, 2018 4:26 am

Hi,
As per below commands, I am able to subscribe and publish message via mqtt to my cloud from my linux machine

mosquitto_sub -h 'host_name' -p 'port_number' -q 0 -t hello/240ac41673b4 -i 240ac41673b4 -d

mosquitto_pub -h 'host_name' -p 'port_number' -q 0 -t hello/240ac41673b4 -i 240ac41673b4 -m "hello_world" -d

I need to set -i (id of client) in my mqtt library of esp32. Without -i argument my publish messages are unsuccessful in esp32.
How can I achieve this?


Best Regards
Vinayak

Who is online

Users browsing this forum: No registered users and 95 guests