You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -44,20 +44,25 @@ Once completed, one can progress to the
44
44
### 1.1 Hardware Requirements
45
45
46
46
- Micro USB cable.
47
-
- ESP32-C3, ESP32-C3, or a, ESP32-S3 board (e.g [ESP32-C3-DevKitC-02](https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/hw-reference/esp32c3/user-guide-devkitc-02.html)).
for information about finding what value this should be.
135
143
136
144
-`CA_CERT_FILEPATH`: The file path to the PEM-encoded root CA certificate,
137
145
@@ -171,10 +179,13 @@ for iOS. Download the appropriate app to your phone before proceeding.
171
179
Run the following command to build and flash the demo project:
172
180
173
181
**NOTE** The list of chip types can be found by running `idf.py list-targets`
174
-
The directly supported chips are the `esp32c3`, `esp32s3`, and `esp32c2`
182
+
The directly supported chips are the ones listed in
183
+
[build.yml](./.github/workflows/build.yml#L27)
184
+
185
+
- Please do not submit a bug report due to build errors or demo failures
186
+
when using an unsupported ESP chip.
175
187
176
188
```sh
177
-
idf.py set-target CHIP_TYPE;
178
189
idf.py -p PORT flash monitor;
179
190
```
180
191
@@ -614,67 +625,83 @@ disabled when running the qualification test. You can change the log level by
614
625
### 6.2 Steps for each test case
615
626
616
627
1. Device Advisor Test
617
-
- Create a [Device Advisor test suite](https://docs.aws.amazon.com/iot/latest/developerguide/device-advisor.html) in the console.
618
-
- Find the Device Advisor test endpoint for your account
619
-
- Under `Featured FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Execution Test Configurations`, choose `Device Advisor Test`.
620
-
- Under `FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Parameter Configurations`
621
-
- Set `Endpoint for MQTT Broker to use` to Device Advisor test endpoint
622
-
- Set `Thing Name for Device Advisor Test/OTA end-to-end Test` to AWS IoT Thing under test.
623
-
- Build and run.
624
-
- See Device Advisor test result in the console.
628
+
- Create a [Device Advisor test suite](https://docs.aws.amazon.com/iot/latest/developerguide/device-advisor.html)
629
+
in the console.
630
+
- Find the Device Advisor test endpoint for your account
631
+
- Under `Featured FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Execution Test Configurations`,
632
+
choose `Device Advisor Test`.
633
+
- Under `FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Parameter Configurations`
634
+
- Set `Endpoint for MQTT Broker to use` to Device Advisor test endpoint
635
+
- Set `Thing Name for Device Advisor Test/OTA end-to-end Test` to AWS IoT Thing under test.
636
+
- Build and run.
637
+
- See Device Advisor test result in the console.
625
638
2. MQTT Test
626
-
- Under `Featured FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Execution Test Configurations`, choose `MQTT Test`.
639
+
- Under `Featured FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Execution Test Configurations`,
640
+
choose `MQTT Test`.
627
641
- Under `FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Parameter Configurations`
628
642
- Set `Endpoint for MQTT Broker to use` to your AWS IoT endpoint
629
643
- Set `Client Identifier for MQTT Test`
630
644
- Build and run.
631
645
- See test result on target output.
632
646
- Example output
633
-
```
647
+
648
+
```c
634
649
I (821) qual_main: Run qualification test.
635
650
...
636
651
-----------------------
637
652
8 Tests 0 Failures 0 Ignored
638
653
OK
639
654
I (84381) qual_main: End qualification test.
640
655
```
656
+
641
657
3. Transport Interface Test
642
-
- Follow [Run The Transport Interface Test](https://github.com/FreeRTOS/FreeRTOS-Libraries-Integration-Tests/tree/main/src/transport_interface#6-run-the-transport-interface-test) to start an echo server.
643
-
- Under `Featured FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Execution Test Configurations`, choose `Transport Interface Test`.
644
-
- Under `FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Parameter Configurations`
645
-
- Set `Echo Server Domain Name/IP for Transport Interface Test`
646
-
- Set `Port for Echo Server to use`
647
-
- Set ECHO_SERVER_ROOT_CA / TRANSPORT_CLIENT_CERTIFICATE and TRANSPORT_CLIENT_PRIVATE_KEY in [test_param_config.h](./components/FreeRTOS-Libraries-Integration-Tests/config/test_param_config.h).
648
-
- Build and run.
649
-
- See test result on target output.
650
-
- Example output
651
-
```
658
+
- Follow
659
+
[Run The Transport Interface Test](https://github.com/FreeRTOS/FreeRTOS-Libraries-Integration-Tests/tree/main/src/transport_interface#6-run-the-transport-interface-test)
660
+
to start an echo server.
661
+
- Under `Featured FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Execution Test Configurations`,
662
+
choose `Transport Interface Test`.
663
+
- Under `FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Parameter Configurations`
664
+
- Set `Echo Server Domain Name/IP for Transport Interface Test`
665
+
- Set `Port for Echo Server to use`
666
+
- Set ECHO_SERVER_ROOT_CA / TRANSPORT_CLIENT_CERTIFICATE and TRANSPORT_CLIENT_PRIVATE_KEY
667
+
in [test_param_config.h](./components/FreeRTOS-Libraries-Integration-Tests/config/test_param_config.h).
668
+
- Build and run.
669
+
- See test result on target output.
670
+
- Example output
671
+
672
+
```c
652
673
I (855) qual_main: Run qualification test.
653
674
...
654
675
-----------------------
655
676
14 Tests 0 Failures 0 Ignored
656
677
OK
657
678
I (612755) qual_main: End qualification test.
658
679
```
680
+
659
681
4. OTA PAL Test
660
-
- Under `Featured FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Execution Test Configurations`, choose `OTA PAL Test`.
661
-
- Build and run.
662
-
- See test result on target output.
663
-
- Example output
664
-
```
682
+
- Under `Featured FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Execution Test Configurations`,
683
+
choose `OTA PAL Test`.
684
+
- Build and run.
685
+
- See test result on target output.
686
+
- Example output
687
+
688
+
```c
665
689
I (905) qual_main: Run qualification test.
666
690
...
667
691
-----------------------
668
692
15 Tests 0 Failures 0 Ignored
669
693
OK
670
694
I (113755) qual_main: End qualification test.
671
695
```
696
+
672
697
5. Core PKCS11 Test
673
-
- Under `Featured FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Execution Test Configurations`, choose `CorePKCS#11 Test`.
674
-
- Build and run.
675
-
- See test result on target output.
676
-
- Example output
677
-
```
698
+
- Under `Featured FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Execution Test Configurations`,
699
+
choose `CorePKCS#11 Test`.
700
+
- Build and run.
701
+
- See test result on target output.
702
+
- Example output
703
+
704
+
```c
678
705
I (858) qual_main: Run qualification test.
679
706
...
680
707
-----------------------
@@ -685,82 +712,121 @@ disabled when running the qualification test. You can change the log level by
685
712
686
713
## 7 Run AWS IoT Device Tester
687
714
688
-
This repository can be tested using [AWS IoT Device Tester for FreeRTOS (IDT)](https://aws.amazon.com/freertos/device-tester/). IDT is a downloadable tool that can be used to exercise a device integration with FreeRTOS to validate functionality and compatibility with Amazon IoT cloud. Passing the test suite provided by IDT is also required to qualify a device for the [Amazon Partner Device Catalogue](https://devices.amazonaws.com/).
715
+
This repository can be tested using
716
+
[AWS IoT Device Tester for FreeRTOS (IDT)](https://aws.amazon.com/freertos/device-tester/).
717
+
IDT is a downloadable tool that can be used to exercise a device integration with
718
+
FreeRTOS to validate functionality and compatibility with Amazon IoT cloud.
719
+
Passing the test suite provided by IDT is also required to qualify a device for
720
+
the [Amazon Partner Device Catalogue](https://devices.amazonaws.com/).
689
721
690
-
IDT runs a suite of tests that include testing the device's transport interface layer implementation, PKCS11 functionality, and OTA capabilities. In IDT test cases, the IDT binary will make a copy of the source code, update the header files in the project, then compile the project and flash the resulting image to your board. Finally, IDT will read serial output from the board and communicate with the AWS IoT cloud to ensure that test cases are passing.
722
+
IDT runs a suite of tests that include testing the device's transport interface
723
+
layer implementation, PKCS11 functionality, and OTA capabilities. In IDT test
724
+
cases, the IDT binary will make a copy of the source code, update the header files
725
+
in the project, then compile the project and flash the resulting image to your
726
+
board. Finally, IDT will read serial output from the board and communicate with
727
+
the AWS IoT cloud to ensure that test cases are passing.
691
728
692
729
### 7.1 Prerequisite
693
730
694
-
- Follow the [OTA update with AWS IoT Guide](#5-perform-firmware-over-the-air-updates-with-aws-iot) to create an OTA update and verify the digital signature, checksum and version number of the new image. If firmware update is verified, you can run the tests on your device.
731
+
- Follow the
732
+
[OTA update with AWS IoT Guide](#5-perform-firmware-over-the-air-updates-with-aws-iot)
733
+
to create an OTA update and verify the digital signature, checksum and version
734
+
number of the new image. If firmware update is verified, you can run the tests
735
+
on your device.
695
736
- Run `idf.py menuconfig`.
696
737
- Under `Featured FreeRTOS IoT Integration`, choose `Run qualification test`.
697
738
- Under `Component config -> Unity unit testing library`, choose `Include Unity test fixture`.
698
-
- Under `Featured FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Execution Test Configurations`, **DISABLE** all the tests.
739
+
- Under `Featured FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Execution Test Configurations`,
740
+
**DISABLE** all the tests.
699
741
- Run `idf.py fullclean` to clear local CMAKE cache.
700
742
701
-
_Note: The log of module `esp_ota_ops`, `AWS_OTA` and `esp-tls-mbedtls` will be disabled when running the qualification test. You can change the log level by `esp_log_level_set` in [main.c](./main/main.c)._
743
+
_Note: The log of module `esp_ota_ops`, `AWS_OTA` and `esp-tls-mbedtls` will be
744
+
disabled when running the qualification test. You can change the log level by
745
+
`esp_log_level_set` in [main.c](./main/main.c)._
702
746
703
747
### 7.2 Download AWS IoT Device Tester
704
748
705
-
The latest version of IDT can be downloaded from the [here](https://docs.aws.amazon.com/freertos/latest/userguide/dev-test-versions-afr.html). This repository has been qualified by IDT v4.6.0 and test suite version 2.3.0 for FreeRTOS 202210-LTS.
749
+
The latest version of IDT can be downloaded from the
Follow [the instructions to setup your AWS account](https://docs.aws.amazon.com/freertos/latest/userguide/lts-idt-dev-tester-prereqs.html#lts-config-aws-account).
710
757
711
758
Extract IDT for FreeRTOS to a location on the file system
712
759
713
-
- The `devicetester-extract-location/bin` directory holds the IDT binary, which is the entry point used to run IDT
714
-
- The `devicetester-extract-location/results` directory holds logs that are generated every time you run IDT.
715
-
- The `devicetester-extract-location/configs` directory holds configuration files that are required to setup IDT
760
+
- The `devicetester-extract-location/bin` directory holds the IDT binary, which
761
+
is the entry point used to run IDT
762
+
- The `devicetester-extract-location/results` directory holds logs that are
763
+
generated every time you run IDT.
764
+
- The `devicetester-extract-location/configs` directory holds configuration files
765
+
that are required to setup IDT
716
766
717
-
Before running IDT, the files in `devicetester-extract-location/configs` need to be updated. We have pre-defined configures available in the [idt_config](https://github.com/FreeRTOS/iot-reference-esp32c3/tree/main/idt_config). Copy these templates to `devicetester-extract-location/configs`, and the rest of this section will walk through the remaining values that need to be filled in.
767
+
Before running IDT, the files in `devicetester-extract-location/configs` need
768
+
to be updated. We have pre-defined configures available in the
Copy these templates to `devicetester-extract-location/configs`, and the rest of
771
+
this section will walk through the remaining values that need to be filled in.
718
772
719
773
You need to configure your AWS credentials for IDT.
720
774
721
775
- In `config.json`, update the `profile` and `awsRegion` fields
722
776
723
777
You need to specify the device details for IDT.
724
778
725
-
- In `device.json`, update `serialPort` to the serial port of your board as from [PORT](./GettingStartedGuide.md#23-provision-the-esp32-c3-with-the-private-key-device-certificate-and-ca-certificate-in-development-mode). Update `publicKeyAsciiHexFilePath` to the absolute path to `dummyPublicKeyAsciiHex.txt`. Update `publicDeviceCertificateArn` to the ARN of the certificate uploaded when [Setup AWS IoT Core](./GettingStartedGuide.md#21-setup-aws-iot-core).
779
+
- In `device.json`, update `serialPort` to the serial port of your board as from
- Run all the steps to create a [second code signing certificate](./GettingStartedGuide.md#51-setup-pre-requisites-for-ota-cloud-resources) but do NOT provision the key onto your board. Copy the ARN for this certificate in `userdata.json` for the field `untrustedSignerCertificate`.
790
+
- In `userdata.json`, update `signerCertificate` with the ARN of the
791
+
[Setup pre-requisites for OTA cloud resources](./GettingStartedGuide.md#51-setup-pre-requisites-for-ota-cloud-resources)
For more information, `.\devicetester_win_x86-64.exe help` will show all available commands.
765
828
766
-
When IDT is run, it generates the `results/uuid` directory that contains the logs and other information associated with your test run. See [Understanding results and logs](https://docs.aws.amazon.com/freertos/latest/userguide/lts-results-logs.html) for more details.
829
+
When IDT is run, it generates the `results/uuid` directory that contains the
830
+
logs and other information associated with your test run. See
831
+
[Understanding results and logs](https://docs.aws.amazon.com/freertos/latest/userguide/lts-results-logs.html)
0 commit comments