generated from amazon-archives/__template_MIT-0
-
Notifications
You must be signed in to change notification settings - Fork 58
Add Quick Connect V2 Demo #137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
rauthsuj
wants to merge
4
commits into
FreeRTOS:main
Choose a base branch
from
rauthsuj:AddQuickConnectDemo
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
d725313
Add Quick Connect V2 Demo
rauthsuj 138a08a
simplified Quick Connect demo by removing semaphores and adding tempe…
rauthsuj e256c69
decreased topic buffer to 1D and commenting changes
rauthsuj c98dbc1
Fixed the AWSsetup.md link in Quick connect GettingStarted.md
rauthsuj File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rauthsuj marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| # Getting Started With Quick Connect V2 Guide | ||
|
|
||
| **_NOTE:_** This guide covers only Quick Connect V2. For all other demos, please refer to the [Getting Started Guide](../../../GettingStartedGuide.md). | ||
|
|
||
| This guide contains instructions on how to setup, build and run only the Quick Connect V2 demo | ||
| without use of the security features of the ESP32-C3 i.e. without enabling the | ||
| DS peripheral, flash encryption and Secure Boot. The guide is meant to provide the | ||
| user with a friendly first-use experience. | ||
|
|
||
| [1 Pre-requisites](#1-pre-requisites)<br> | ||
|
|
||
| [2 Demo setup](#2-demo-setup)<br> | ||
|
|
||
| [3 Build and flash the demo project](#3-build-and-flash-the-demo-project)<br> | ||
|
|
||
| [4 Monitoring the demo](#4-monitoring-the-demo)<br> | ||
|
|
||
|
|
||
| ## 1 Pre-requisites | ||
|
|
||
| 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) | ||
|
|
||
| ## 2 Demo setup | ||
|
|
||
| ### 2.1 Get credentials from Quick Connect V2 | ||
|
|
||
| To get credentials for your device (Thing), visit [Quick Connect Credentials](https://quickconnect.freertos.aws.com/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).) | ||
|
|
||
| ### 2.2 Configure the project with the AWS IoT Thing Name and AWS device Endpoint | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we also mention enabling the quick connect v2 demo? |
||
|
|
||
| The **AWS device Endpoint** is provided on the [Quick Connect Examples](https://quickconnect.freertos.aws.com/examples) page. | ||
|
|
||
| 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. | ||
|
|
||
|
|
||
| ### 2.3 Provision the ESP32-C3 with the private key, device certificate and CA certificate in Development Mode | ||
|
|
||
| For Quick Connect, use the following specific values: | ||
|
|
||
| - `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). | ||
| - `DEVICE_CERT_FILEPATH`: The file path to the PEM-encoded device certificate (`.crt` file downloaded from the Quick Connect Website) | ||
| - `PRIVATE_KEY_FILEPATH`: The file path to the PEM-encoded private key (`.key` file downloaded from the Quick Connect Website) | ||
| - `KEY_ALG_INFO`: Use `RSA 2048` | ||
|
|
||
| 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). | ||
|
|
||
|
|
||
| ## 3 Build and flash the demo project | ||
|
|
||
| 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). | ||
|
|
||
| **NOTE:** If you encounter a ***stack overflow in task CoreMqttAgentCo has been detected*** <br> | ||
| run `idf.py menuconfig`. navigate to Featured FreeRTOS IoT Integration → coreMQTT-Agent Manager Configurations, and increse the `coreMQTT-Agent task stack size` and `Connection handling task stack size` from their default values. | ||
|
|
||
| ## 4 Monitoring the demo | ||
|
|
||
| 1. On the serial terminal console, confirm that the TLS connection was | ||
| successful and that MQTT messages are published. | ||
|
|
||
| ```c | ||
| I (4115) core_mqtt_agent_manager: WiFi connected. | ||
| I (4115) app_wifi: Connected with IP Address:10.0.0.9 | ||
| I (4115) esp_netif_handlers: sta ip: 10.0.0.9, mask: 255.255.255.0, gw: 10.0.0.1 | ||
| I (4115) main_task: Returned from app_main() | ||
| I (4685) core_mqtt_agent_manager: TLS connection established. | ||
| I (5025) coreMQTT: MQTT connection established with the broker. | ||
| I (5025) core_mqtt_agent_manager: Session present: 0 | ||
|
|
||
| I (5025) quickconnect_v2_demo: coreMQTT-Agent connected. | ||
| I (5025) core_mqtt_agent_manager: coreMQTT-Agent connected. | ||
| 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. | ||
| I (5055) quickconnect_v2_demo: Task "DemoTask" waiting for publish 1 to complete. | ||
| I (5175) coreMQTT: Ack packet deserialized with result: MQTTSuccess. | ||
| I (5175) coreMQTT: State record updated. New state=MQTTPublishDone. | ||
|
|
||
| ``` | ||
| 2. On the [Quick Connect Visualizer](https://quickconnect.freertos.aws.com/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. | ||
| **Note**: This demo sends data in line graph format only. For other data visualization formats, refer to the [Quick Connect](https://quickconnect.freertos.aws.com/examples) documentation. | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.