| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-S2 | ESP32-S3 |
|---|
Based on the ESP32 MQTT5 example.
- Open the project configuration menu (
idf.py menuconfig) - Configure Wi-Fi or Ethernet under "Example Connection Configuration" menu.
- MQTT v5 protocol (
CONFIG_MQTT_PROTOCOL_5) under "ESP-MQTT Configurations" menu is enabled bysdkconfig.defaults.
Build the project and flash it to the board, then run monitor tool to view serial output:
idf.py -p PORT flash monitor
(To exit the serial monitor, type Ctrl-].)
See the Getting Started Guide for full steps to configure and use ESP-IDF to build projects.