Skip to content

Commit d725313

Browse files
committed
Add Quick Connect V2 Demo
1 parent 5694f12 commit d725313

File tree

7 files changed

+690
-3
lines changed

7 files changed

+690
-3
lines changed

main/CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ if(CONFIG_GRI_ENABLE_SUB_PUB_UNSUB_DEMO)
1313
list(APPEND MAIN_SRCS "demo_tasks/sub_pub_unsub_demo/sub_pub_unsub_demo.c")
1414
endif()
1515

16+
# QuickConnect V2 demo
17+
if(CONFIG_GRI_ENABLE_QUICKCONNECT_V2_DEMO)
18+
list(APPEND MAIN_SRCS
19+
"demo_tasks/quickconnect_v2_demo/quickconnect_v2_demo.c"
20+
"demo_tasks/temp_sub_pub_and_led_control_demo/hardware_drivers/app_driver.c"
21+
)
22+
endif()
23+
1624
# Temperature Sub Pub and LED control demo
1725
if(CONFIG_GRI_ENABLE_TEMPERATURE_PUB_SUB_AND_LED_CONTROL_DEMO)
1826
list(APPEND MAIN_SRCS
@@ -37,6 +45,7 @@ set(MAIN_INCLUDE_DIRS
3745
"."
3846
"demo_tasks/ota_over_mqtt_demo"
3947
"demo_tasks/sub_pub_unsub_demo"
48+
"demo_tasks/quickconnect_v2_demo"
4049
"demo_tasks/temp_sub_pub_and_led_control_demo"
4150
"demo_tasks/temp_sub_pub_and_led_control_demo/hardware_drivers"
4251
"networking/wifi"

main/Kconfig.projbuild

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,9 +253,14 @@ menu "Featured FreeRTOS IoT Integration"
253253

254254
endmenu # coreMQTT-Agent Manager Configurations
255255

256+
config GRI_ENABLE_QUICKCONNECT_V2_DEMO
257+
bool "Enable QuickConnect V2 demo"
258+
depends on !GRI_RUN_QUALIFICATION_TEST
259+
default n
260+
256261
config GRI_ENABLE_SUB_PUB_UNSUB_DEMO
257262
bool "Enable pub sub unsub demo"
258-
depends on !GRI_RUN_QUALIFICATION_TEST
263+
depends on !GRI_RUN_QUALIFICATION_TEST && !GRI_ENABLE_QUICKCONNECT_V2_DEMO
259264
default y
260265

261266
menu "Sub pub unsub demo configurations"
@@ -308,7 +313,7 @@ menu "Featured FreeRTOS IoT Integration"
308313

309314
config GRI_ENABLE_TEMPERATURE_PUB_SUB_AND_LED_CONTROL_DEMO
310315
bool "Enable temperature sensor pub sub and LED control demo"
311-
depends on !GRI_RUN_QUALIFICATION_TEST
316+
depends on !GRI_RUN_QUALIFICATION_TEST && !GRI_ENABLE_QUICKCONNECT_V2_DEMO
312317
default y
313318

314319
menu "Temperature pub sub and LED control demo configurations"
@@ -378,7 +383,7 @@ menu "Featured FreeRTOS IoT Integration"
378383

379384
config GRI_ENABLE_OTA_DEMO
380385
bool "Enable OTA demo"
381-
depends on !GRI_RUN_QUALIFICATION_TEST
386+
depends on !GRI_RUN_QUALIFICATION_TEST && !GRI_ENABLE_QUICKCONNECT_V2_DEMO
382387
default y
383388

384389
menu "OTA demo configurations"
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Getting Started With Quick Connect V2 Guide
2+
3+
**_NOTE:_** This guide covers only Quick Connect V2. For all other demos, please refer to the [Getting Started Guide](../../../GettingStartedGuide.md).
4+
5+
This guide contains instructions on how to setup, build and run only the Quick Connect V2 demo
6+
without use of the security features of the ESP32-C3 i.e. without enabling the
7+
DS peripheral, flash encryption and Secure Boot. The guide is meant to provide the
8+
user with a friendly first-use experience.
9+
10+
[1 Pre-requisites](#1-pre-requisites)<br>
11+
12+
[2 Demo setup](#2-demo-setup)<br>
13+
14+
[3 Build and flash the demo project](#3-build-and-flash-the-demo-project)<br>
15+
16+
[4 Monitoring the demo](#4-monitoring-the-demo)<br>
17+
18+
19+
## 1 Pre-requisites
20+
21+
For hardware and software requirements, refer to sections [1.1 Hardware Requirements](../../../GettingStartedGuide.md#11-hardware-requirements) and [1.2 Software Requirements](../../../GettingStartedGuide.md#12-software-requirements) in the [Getting Started Guide](../../../GettingStartedGuide.md)
22+
23+
## 2 Demo setup
24+
25+
### 2.1 Get credentials from Quick Connect V2
26+
27+
To get credentials for your device (Thing), visit [Quick Connect Credentials](https://quickconnect.iot.aws.dev/credentials) page and enter a desired device name (Thing Name) in the `Vend Credentials` section, and click the Vend button. Download both the `.crt` and `.key` files. These are your **PEM-encoded device certificate** and **PEM-encoded private key**. (An explanation of these entities is given in the [AWS IoT Core Setup Guide](AWSSetup.md).)
28+
29+
### 2.2 Configure the project with the AWS IoT Thing Name and AWS device Endpoint
30+
31+
The **AWS device Endpoint** is provided on the [Quick Connect Examples](https://quickconnect.iot.aws.dev) page.
32+
33+
Follow the [2.2 Configure the project](../../../GettingStartedGuide.md#22-configure-the-project-with-the-aws-iot-thing-name-and-aws-device-endpoint) section in the [Getting Started Guide](../../../GettingStartedGuide.md) to configure your project.
34+
35+
36+
### 2.3 Provision the ESP32-C3 with the private key, device certificate and CA certificate in Development Mode
37+
38+
For Quick Connect, use the following specific values:
39+
40+
- `CA_CERT_FILEPATH`: Use the file in the `main/certs` directory, or download the AWS Root CA certificate from [here](https://www.amazontrust.com/repository/AmazonRootCA1.pem).
41+
- `DEVICE_CERT_FILEPATH`: The file path to the PEM-encoded device certificate (`.crt` file downloaded from the Quick Connect Website)
42+
- `PRIVATE_KEY_FILEPATH`: The file path to the PEM-encoded private key (`.key` file downloaded from the Quick Connect Website)
43+
- `KEY_ALG_INFO`: Use `RSA 2048`
44+
45+
For complete provisioning instructions, follow the [2.3 Provision the ESP32-C3](../../../GettingStartedGuide.md#23-provision-the-esp32-c3-with-the-private-key-device-certificate-and-ca-certificate-in-development-mode) section in the [Getting Started Guide](../../../GettingStartedGuide.md).
46+
47+
48+
## 3 Build and flash the demo project
49+
50+
For build and flash instructions, follow [3 Build and flash](../../../GettingStartedGuide.md#3-build-and-flash-the-demo-project) section of the [Getting Started Guide](../../../GettingStartedGuide.md).
51+
52+
## 4 Monitoring the demo
53+
54+
1. On the serial terminal console, confirm that the TLS connection was
55+
successful and that MQTT messages are published.
56+
57+
```c
58+
I (4115) core_mqtt_agent_manager: WiFi connected.
59+
I (4115) app_wifi: Connected with IP Address:10.0.0.9
60+
I (4115) esp_netif_handlers: sta ip: 10.0.0.9, mask: 255.255.255.0, gw: 10.0.0.1
61+
I (4115) main_task: Returned from app_main()
62+
I (4685) core_mqtt_agent_manager: TLS connection established.
63+
I (5025) coreMQTT: MQTT connection established with the broker.
64+
I (5025) core_mqtt_agent_manager: Session present: 0
65+
66+
I (5025) quickconnect_v2_demo: coreMQTT-Agent connected.
67+
I (5025) core_mqtt_agent_manager: coreMQTT-Agent connected.
68+
I (5025) quickconnect_v2_demo: Task "DemoTask" sending publish request to coreMQTT-Agent with message [{"label":"ESP32-S3 MCU Temperature","display_type":"line_graph","unit":"C","values":[{"value":0.0,"label":"temp"}]}] on topic "Thing-name" with ID 1.
69+
I (5055) quickconnect_v2_demo: Task "DemoTask" waiting for publish 1 to complete.
70+
I (5175) coreMQTT: Ack packet deserialized with result: MQTTSuccess.
71+
I (5175) coreMQTT: State record updated. New state=MQTTPublishDone.
72+
73+
```
74+
75+
2. On the [Quick Connect Visualizer](https://quickconnect.iot.aws.dev/visualizer) page, enter your device name (Thing name) in the `Visualizing device data` section, then confirm that the MQTT messages from the device are being received and a graph is being displayed.
76+
77+
**Note**: This demo sends data in line graph format only. For other data visualization formats, refer to the [Quick Connect](https://quickconnect.iot.aws.dev/) documentation.

0 commit comments

Comments
 (0)