From 7aaed493fc5ba9319f6a6fb6e2b0204240955a60 Mon Sep 17 00:00:00 2001 From: Mahavir Jain Date: Fri, 10 Feb 2023 10:30:45 +0530 Subject: [PATCH] mqtt/ssl_ds: enable the example for ESP32-H2 target --- examples/protocols/mqtt/ssl_ds/README.md | 8 ++++---- examples/protocols/mqtt/ssl_ds/main/app_main.c | 1 - examples/protocols/mqtt/ssl_ds/sdkconfig.defaults.esp32h2 | 2 ++ 3 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 examples/protocols/mqtt/ssl_ds/sdkconfig.defaults.esp32h2 diff --git a/examples/protocols/mqtt/ssl_ds/README.md b/examples/protocols/mqtt/ssl_ds/README.md index 7658f5b..cd0486b 100644 --- a/examples/protocols/mqtt/ssl_ds/README.md +++ b/examples/protocols/mqtt/ssl_ds/README.md @@ -1,10 +1,10 @@ -| Supported Targets | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 | -| ----------------- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-S2 | ESP32-S3 | +| ----------------- | -------- | -------- | -------- | -------- | -------- | # ESP-MQTT SSL Mutual Authentication with Digital Signature (See the README.md file in the upper level 'examples' directory for more information about examples.) -Espressif's ESP32-S2, ESP32-S3, ESP32-C3 and ESP32-C6 MCU have a built-in Digital Signature (DS) Peripheral, which provides hardware acceleration for RSA signature. More details can be found at [Digital Signature with ESP-TLS](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/api-reference/protocols/esp_tls.html#digital-signature-with-esp-tls). +Espressif's ESP32-S2, ESP32-S3, ESP32-C3, ESP32-C6 and ESP32-H2 MCU have a built-in Digital Signature (DS) Peripheral, which provides hardware acceleration for RSA signature. More details can be found at [Digital Signature with ESP-TLS](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/api-reference/protocols/esp_tls.html#digital-signature-with-esp-tls). This example connects to the broker test.mosquitto.org using ssl transport with client certificate(RSA) and as a demonstration subscribes/unsubscribes and sends a message on certain topic.The RSA signature operation required in the ssl connection is performed with help of the Digital Signature (DS) peripheral. (Please note that the public broker is maintained by the community so may not be always available, for details please visit http://test.mosquitto.org) @@ -19,7 +19,7 @@ This example can be executed on any ESP32-S2, ESP32-S3, ESP32-C3 or ESP32-C6 boa ### Configure the project #### 1) Selecting the target -As the project is to be built for the target ESP32-S2, ESP32-S3, ESP32-C3 or ESP32-C6 it should be selected with the following command +As the project is to be built for the target ESP32-S2, ESP32-S3, ESP32-C3, ESP32-C6 or ESP32-H2 it should be selected with the following command ``` idf.py set-target /* target */ ``` diff --git a/examples/protocols/mqtt/ssl_ds/main/app_main.c b/examples/protocols/mqtt/ssl_ds/main/app_main.c index ba94cf0..709143c 100644 --- a/examples/protocols/mqtt/ssl_ds/main/app_main.c +++ b/examples/protocols/mqtt/ssl_ds/main/app_main.c @@ -10,7 +10,6 @@ #include #include #include -#include "esp_wifi.h" #include "esp_system.h" #include "nvs_flash.h" #include "esp_event.h" diff --git a/examples/protocols/mqtt/ssl_ds/sdkconfig.defaults.esp32h2 b/examples/protocols/mqtt/ssl_ds/sdkconfig.defaults.esp32h2 new file mode 100644 index 0000000..dcbc3a5 --- /dev/null +++ b/examples/protocols/mqtt/ssl_ds/sdkconfig.defaults.esp32h2 @@ -0,0 +1,2 @@ +CONFIG_EXAMPLE_CONNECT_WIFI=n +CONFIG_EXAMPLE_CONNECT_ETHERNET=y