Module esp_ward::connectivity::mqtt
source · Expand description
this module was written based on a basis of an analysis of an existing project from an esp-rs team member Juraj Sadel, that was shown at Espressif DevCon 2023. Available on: https://github.com/JurajSadel/esp32c3-no-std-async-mqtt-demo
Macros§
- Macro to create a network stack for WiFi communication.
- Macro to retrieve the IP configuration from the network stack.
- Macro to prepare buffers with fixed sizes for MQTT communication.
- Macro to wait until WiFi is connected in async variation Typically used after
net_task
async task call.
Constants§
- Represents the IP address for the HiveMQ MQTT broker.
- Represents the port number for the HiveMQ MQTT broker.
Functions§
- Establishes a custom MQTT connection with the specified parameters.
- Establishes a default MQTT connection with predefined settings: HiveMQ broker
- Waits for and receives a message from the subscribed MQTT topics. It handles reconnection in case of network errors.
- This function attempts to send the message to a specific MQTT topic and retries in case of network errors.
- Subscribes to an MQTT topic.