mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 03:45:50 +08:00
Documentation: Describe how the use the MQTT-C config and the expected
output. Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
This commit is contained in:
committed by
Xiang Xiao
parent
8ee22db3d9
commit
c7c4f0b44c
@@ -50,3 +50,36 @@ wapi
|
|||||||
----
|
----
|
||||||
|
|
||||||
Enables WiFi support
|
Enables WiFi support
|
||||||
|
|
||||||
|
mqttc
|
||||||
|
-----
|
||||||
|
|
||||||
|
This configuration tests the MQTT-C publisher example.
|
||||||
|
|
||||||
|
From the host, start the broker and subscribe to the :code:`test` topic. Using
|
||||||
|
`mosquitto` this should be::
|
||||||
|
|
||||||
|
mosquitto&
|
||||||
|
mosquitto_sub -t test
|
||||||
|
|
||||||
|
From the NSH, connect to an access point::
|
||||||
|
|
||||||
|
wapi psk wlan0 mypasswd 1
|
||||||
|
wapi essid wlan0 myssid 1
|
||||||
|
renew wlan0
|
||||||
|
|
||||||
|
Publish to the broker::
|
||||||
|
|
||||||
|
nsh> mqttc_pub -h 192.168.1.11
|
||||||
|
|
||||||
|
The default behavior is to publish the message :code:`test`. The following should be
|
||||||
|
outputted::
|
||||||
|
|
||||||
|
nsh> mqttc_pub -h 192.168.1.11
|
||||||
|
Success: Connected to broker!
|
||||||
|
Success: Published to broker!
|
||||||
|
|
||||||
|
Disconnecting from 192.168.1.11
|
||||||
|
|
||||||
|
From the host the message :code:`test` should be outputted.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user