Ivan Grokhotkov 05a28ef4e7 Merge branch 'bugfix/aws_iot_examples_cmake_build' into 'master' 7 年 前
..
main 05a28ef4e7 Merge branch 'bugfix/aws_iot_examples_cmake_build' into 'master' 7 年 前
CMakeLists.txt d9939cedd9 cmake: make main a component again 7 年 前
Makefile 9784df1c3a asio: examples renamed to have consistent binary names when build in make and CMake 7 年 前
README.md da660b234c AWS IoT Device SDK Support 9 年 前
sdkconfig.ci 1286b93c81 examples: aws_iot: fix cmake build issue which used to pick dummy certificates 7 年 前
sdkconfig.defaults 5585f699d1 aws_iot: optimize dynamic memory by tweaking tls out buf content length 7 年 前

README.md

Amazon Web Services IoT MQTT Subscribe/Publish Example

This is an adaptation of the AWS IoT C SDK "subscribe_publish" example for ESP-IDF.

Configuration

See the README.md in the parent directory for information about configuring the AWS IoT examples.

Monitoring MQTT Data from the device

After flashing the example to your ESP32, it should connect to Amazon and start subscribing/publishing MQTT data.

The example code publishes MQTT data to the topic test_topic/esp32. Amazon provides a web interface to subscribe to MQTT topics for testing:

  • On the AWS IoT console, click "MQTT Client" near the top-right.
  • Click "Generate Client ID" to generate a random client ID.
  • Click "Connect"

One connection succeeds, you can subscribe to the data published by the ESP32:

  • Click "Subscribe to Topic"
  • Enter "Subscription Topic" test_topic/esp32
  • Click "Subscribe"

... you should see MQTT data published from the running example.

To publish data back to the device:

  • Click "Publish to Topic"
  • Enter "Publish Topic" test_topic/esp32
  • Enter a message in the payload field
  • Click Publish