Skip to content

paho_mqtt: Add mqtt compilation files - #3276

Merged
xiaoxiang781216 merged 1 commit into
apache:masterfrom
zs39:master3
Dec 25, 2025
Merged

xiaoxiang781216 merged 1 commit into
apache:masterfrom
zs39:master3

Conversation

@zs39

@zs39 zs39 commented Dec 24, 2025

Copy link
Copy Markdown
Contributor

Summary

It provides the necessary compilation files and configuration management files, and offers a publish demo and a subscribe demo

Impact

Adding a new library has no impact.

Testing

The publish/subscribe functionality was tested locally.

First, start an agent using mosqutto.

Then subscribe to a topic on your PC. The steps are as follows:
mosquitto_sub -h 10.189.144.129 -t "zs39" -v
Then publish it on the Nuttx platform. mqtt_pub -h 10.189.144.129 -t "zs39" -m "your message"

On the PC, you can see the following printout.

zs@zs-ThinkStation-P368 > mosquitto_sub -h 10.189.144.129 -t "zs39" -v
zs39 your message

Then subscribe on the Nuttx client. mqtt_sub -h 10.189.144.129 -t "zs39"

Publish on PC mosquitto_pub -h 10.189.144.129 -t "zs39" -m "hello world" twice

The following can be seen in the NuttX output:

nsh> mqtt_sub -h 10.189.144.129 -t "zs39"
hello world
hello world

It provides the necessary compilation files and configuration management files, and offers a publish demo and a subscribe demo

Signed-off-by: zhangshuai39 <zhangshuai39@xiaomi.com>

@acassis acassis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zs39 nice! Please don't forget to add the Documentation at nuttx/Documentation

@linguini1 linguini1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Can you also open a PR to the NuttX main repository for some documentation about this?

@zs39

zs39 commented Dec 25, 2025 •

Copy link
Copy Markdown
Contributor Author

@zs39 nice! Please don't forget to add the Documentation at nuttx/Documentation

@acassis @linguini1 The document has been added here.
apache/nuttx#17665

@xiaoxiang781216
xiaoxiang781216 merged commit 532a055 into apache:master Dec 25, 2025
63 of 77 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants