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:
Abdelatif Guettouche 2021-03-30 16:43:14 +02:00 committed by Xiang Xiao
parent 8ee22db3d9
commit c7c4f0b44c

View File

@ -50,3 +50,36 @@ wapi
----
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.