Skip to content

Conversation

@zs39
Copy link
Contributor

@zs39 zs39 commented Dec 24, 2025

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>
Copy link
Contributor

@acassis acassis left a comment

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

Copy link
Contributor

@linguini1 linguini1 left a comment

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?

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.

3 participants