MQTT Client on RB
Last updated
Was this helpful?
Last updated
Was this helpful?
This guide describes the testing method of mqtt client for the .
Rugged Board i.MX6UL
ubuntu pc
Not Require
Step 1: Add the below additional packages in yocto and use compiled rootfs.
mosquitto
tcpdump
Step 2: Download the source from below link and cross compile it.
Step 3: Edit the publish and subscribe files of mqtt applications as below
→ Here give the ip address of board as below and save the file.
→ Same for subscribe file too
→ Here give the ip address of board as below
Step 4: Save and compile using below commands
Step 5: After compilation, copy the libraries from below path to usr/lib in the board
→ Copy the these two applications with name of "MQTTClient_subscribe", "MQTTClient_publish" from below path to "home/root" of the board.
Step 6: Edit the mosquitto configuration file as below in the board
→ Add below lines in and save the file.
Step 7: Run the below command in the board.
→ And run the below binary to get the data
→ Then run the below binary to sent the data in other terminal(do ssh to the board)
Output logs of ./MQTTClient_subscribe:
Output logs for ./MQTTClient_publish:
→ Run the to cross compile the application source.
→ ssh to the board ip address as "ssh " from your PC.