Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:iot-open:practical:hardware:sut:esp32:iot_4 [2024/04/21 19:15] – [Steps] pczekalskien:iot-open:practical:hardware:sut:esp32:iot_4 [2024/04/21 19:18] (current) – [Steps] pczekalski
Line 73: Line 73:
 void callback(char* topic, byte* payload, unsigned int length) { void callback(char* topic, byte* payload, unsigned int length) {
   //prepare a code to display the message (payload) to the display   //prepare a code to display the message (payload) to the display
- 
 } }
 </code> </code>
Line 122: Line 121:
 </code> </code>
  
 +=== Step 8 ===
 +Run client handling routine in the loop to receive messages:
 +<code c>
 +void loop()
 +{
 +  if (!client.connected()) {
 +    //reconnect the client (and eventually the WiFi if gone)
 +  }
 +  client.loop();  //process incoming MQTT messages
 +}
 +</code>
 ==== Result validation ==== ==== Result validation ====
 You should be able to connect to the WiFi and MQTT broker (verified by the status present on the selected display) and then subscribe to the message (identified by topic). Depending on whether you're fully remote or able to access our networks with an additional device, you need to implement a publisher on another laboratory node (as present in the scenario [[[en:iot-open:practical:hardware:sut:esp32:iot_3|]]) or use MQTT Explorer (or any other application capable of connecting to our MQTT Broker) to send messages that you subscribe to. You should be able to connect to the WiFi and MQTT broker (verified by the status present on the selected display) and then subscribe to the message (identified by topic). Depending on whether you're fully remote or able to access our networks with an additional device, you need to implement a publisher on another laboratory node (as present in the scenario [[[en:iot-open:practical:hardware:sut:esp32:iot_3|]]) or use MQTT Explorer (or any other application capable of connecting to our MQTT Broker) to send messages that you subscribe to.
en/iot-open/practical/hardware/sut/esp32/iot_4.1713726947.txt.gz · Last modified: 2024/04/21 19:15 by pczekalski
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0