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
-[#5](https://github.com/FreeRTOS/iot-reference-esp32c3/pull/5) and [#10](https://github.com/FreeRTOS/iot-reference-esp32c3/pull/10) Documentation updates
Copy file name to clipboardExpand all lines: GettingStartedGuide.md
+60-54
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,7 @@ Once completed, one can progress to the [Use Security Features](UseSecurityFeatu
46
46
47
47
### 1.2 Software Requirements
48
48
49
-
* ESP-IDF 4.4.2 or higher to configure, build, and flash the project. To setup for the ESP32-C3, follow Espressif's [Getting Started Guide for the ESP32-C3](https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/get-started/index.html).
49
+
* ESP-IDF 4.4.3 or higher to configure, build, and flash the project. To setup for the ESP32-C3, follow Espressif's [Getting Started Guide for the ESP32-C3](https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/get-started/index.html).
50
50
*[Python3](https://www.python.org/downloads/)
51
51
and the Package Installer for Python [pip](https://pip.pypa.io/en/stable/installation/) to use the AWS CLI to import certificates and perform OTA Job set up. Pip is included when you install
52
52
from Python 3.10.
@@ -452,43 +452,49 @@ I (3444) coreMQTT: Packet received. ReceivedBytes=3.
452
452
I (3444) ota_over_mqtt_demo: Subscribed to topic $aws/things/thing_esp32c3_nonOta/jobs/notify-next.
453
453
```
454
454
455
-
## 6 Run AWS IoT Qualification Test
455
+
## 6 Run FreeRTOS Integration Test
456
456
457
457
### 6.1 Prerequisite
458
-
- Run [OTA](#5-perform-firmware-over-the-air-updates-with-aws-iot) once manually.
459
-
- Enable "Run qualification test" by menuconfig (Featured FreeRTOS IoT Integration -> Run qualification test).
460
-
- Enable Unity and Unity/Fixture by menuconfig.
458
+
- 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.
459
+
- Run `idf.py menuconfig`.
460
+
- Under `Featured FreeRTOS IoT Integration`, choose `Run qualification test`.
461
+
- Under `Component config -> Unity unit testing library`, choose `Include Unity test fixture`.
461
462
462
-
*Note: The log of module `esp_ota_ops`and `esp-tls-mbedtls` will be disabled when `Run qualification test` is on. You can enable them back by commenting out`esp_log_level_set` in [main.c](./main/main.c).*
463
+
*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).*
463
464
464
465
### 6.2 Steps for each test case
465
466
466
467
1. Device Advisor Test
467
-
- Enable "Device Advisor Test" in Freatured FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Execution Test Configurations by menuconfig.
468
-
- Create a [device advisor test](https://docs.aws.amazon.com/iot/latest/developerguide/device-advisor.html) on website. ( Iot Console -> Test -> Device Advisor )
469
-
- Create test suite.
470
-
- Run test suite and record device advisor endpoint.
471
-
- Set "Endpoint for MQTT Broker to use" (from previous step) and "Thing Name for Device Advisor Test/OTA end-to-end Test" in Freatured FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Parameter Configurations by menuconfig.
468
+
- Create a [Device Advisor test suite](https://docs.aws.amazon.com/iot/latest/developerguide/device-advisor.html) in the console.
469
+
- Find the Device Advisor test endpoint for your account
470
+
- Under `Freatured FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Execution Test Configurations`, choose `Device Advisor Test`.
471
+
- Under `FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Parameter Configurations`
472
+
- Set `Endpoint for MQTT Broker to use` to Device Avdisor test endpoint
473
+
- Set `Thing Name for Device Advisor Test/OTA end-to-end Test` to AWS IoT Thing under test.
472
474
- Build and run.
473
-
- See device advisor test result on website.
474
-
1. MQTT Test
475
-
- Enable "MQTT Test" in Freatured FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Execution Test Configurations by menuconfig.
476
-
- Set "Endpoint for MQTT Broker to use" and "Client Identifier for MQTT Test" in Freatured FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Parameter Configurations by menuconfig.
475
+
- See Device Advisor test result in the console.
476
+
2. MQTT Test
477
+
- Under `Freatured FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Execution Test Configurations`, choose `MQTT Test`.
478
+
- Under `FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Parameter Configurations`
479
+
- Set `Endpoint for MQTT Broker to use` to your AWS IoT endpoint
480
+
- Set `Client Identifier for MQTT Test`
477
481
- Build and run.
478
482
- See test result on target output.
479
483
- Example output
480
484
```
481
485
I (821) qual_main: Run qualification test.
482
486
...
483
487
-----------------------
484
-
7 Tests 0 Failures 0 Ignored
488
+
8 Tests 0 Failures 0 Ignored
485
489
OK
486
490
I (84381) qual_main: End qualification test.
487
491
```
488
-
1. Transport Interface Test
489
-
- Enable "Transport Interface Test" in Freatured FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Execution Test Configurations by menuconfig.
490
-
- 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 a echo server.
491
-
- Set "Echo Server Domain Name/IP for Transport Interface Test" and "Port for Echo Server to use" in Freatured FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Parameter Configurations by menuconfig.
492
+
3. Transport Interface Test
493
+
- 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.
494
+
- Under `Freatured FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Execution Test Configurations`, choose `Transport Interface Test`.
495
+
- Under `FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Parameter Configurations`
496
+
- Set `Echo Server Domain Name/IP for Transport Interface Test`
497
+
- Set `Port for Echo Server to use`
492
498
- 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).
493
499
- Build and run.
494
500
- See test result on target output.
@@ -501,8 +507,8 @@ I (3444) ota_over_mqtt_demo: Subscribed to topic $aws/things/thing_esp32c3_nonOt
501
507
OK
502
508
I (612755) qual_main: End qualification test.
503
509
```
504
-
1. OTA PAL Test
505
-
- Enable "OTA PAL Test" in Freatured FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Execution Test Configurations by menuconfig.
510
+
4. OTA PAL Test
511
+
- Under `Freatured FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Execution Test Configurations`, choose `OTA PAL Test`.
506
512
- Build and run.
507
513
- See test result on target output.
508
514
- Example output
@@ -514,8 +520,8 @@ I (3444) ota_over_mqtt_demo: Subscribed to topic $aws/things/thing_esp32c3_nonOt
514
520
OK
515
521
I (113755) qual_main: End qualification test.
516
522
```
517
-
1. Core PKCS11 Test
518
-
- Enable "CorePKCS#11 Test" in Freatured FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Execution Test Configurations by menuconfig.
523
+
5. Core PKCS11 Test
524
+
- Under `Freatured FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Execution Test Configurations`, choose `CorePKCS#11 Test`.
519
525
- Build and run.
520
526
- See test result on target output.
521
527
- Example output
@@ -535,65 +541,65 @@ This repository can be tested using [AWS IoT Device Tester for FreeRTOS (IDT)](h
535
541
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.
536
542
537
543
### 7.1 Prerequisite
538
-
- Run [OTA](#5-perform-firmware-over-the-air-updates-with-aws-iot) once manually.
539
-
- Enable "Run qualification test" by menuconfig (Featured FreeRTOS IoT Integration -> Run qualification test).
540
-
- Enable Unity and Unity/Fixture by menuconfig.
541
-
- Disable all test cases in Freatured FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Execution Test Configurations by menuconfig.
542
-
- run "idf.py fullclean" to clear local CMAKE cache.
544
+
- 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.
545
+
- Run `idf.py menuconfig`.
546
+
- Under `Featured FreeRTOS IoT Integration`, choose `Run qualification test`.
547
+
- Under `Component config -> Unity unit testing library`, choose `Include Unity test fixture`.
548
+
- Under `Freatured FreeRTOS IoT Integration -> Qualification Test Configurations -> Qualification Execution Test Configurations`, **DISABLE** all the tests.
549
+
- Run `idf.py fullclean` to clear local CMAKE cache.
543
550
544
-
*Note: The log of module `esp_ota_ops`, `AWS_OTA` and `esp-tls-mbedtls` will be disabled when `Run qualification test` is on. You can enable them back by commenting out `esp_log_level_set` in [main.c](./main/main.c).*
551
+
*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).*
545
552
546
553
### 7.2 Download AWS IoT Device Tester
547
554
548
-
The latest version of IDT can be downloaded from the [public documentation page](https://docs.aws.amazon.com/freertos/latest/userguide/dev-test-versions-afr.html). This repository only supports test suites FRQ_2.2.0 or later.
555
+
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.
549
556
550
557
### 7.3 Configure AWS IoT Device Tester
551
558
552
-
After downloading and unzipping IDT onto your file system, you should extract a file structure that includes the following directories:
559
+
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).
553
560
554
-
* The `bin` directory holds the devicetester binary, which is the entry point used to run IDT
555
-
* The `results` directory holds logs that are generated every time you run IDT.
556
-
* The `configs` directory holds configuration values that are needed to set up IDT
561
+
Extract IDT for FreeRTOS to a location on the file system
557
562
558
-
Before running IDT, the files in `configs` need to be updated. In this repository, we have pre-defined configs available in the `idt_config` directory. Copy these templates over into IDT, and the rest of this section will walk through the remaining values that need to be filled in.
563
+
* The `devicetester-extract-location/bin` directory holds the IDT binary, which is the entry point used to run IDT
564
+
* The `devicetester-extract-location/results` directory holds logs that are generated every time you run IDT.
565
+
* The `devicetester-extract-location/configs` directory holds configuration files that are required to setup IDT
559
566
560
-
First, copy one of each file from `idt_config` (based on host OS) in this reference repository to the `configs` directory inside the newly downloaded IDT project. This should provide you with the following files in `device_tester/configs` directory:
567
+
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.
561
568
562
-
```
563
-
configs/dummyPublicKeyAsciiHex.txt
564
-
configs/flash.bat or flash.sh
565
-
configs/config.json
566
-
configs/userdata.json
567
-
configs/device.json
568
-
configs/build.bat or build.sh
569
-
```
569
+
You need to configure your AWS credentials for IDT.
570
+
* In `config.json`, update the `profile` and `awsRegion` fields
570
571
571
-
Next, we need to update some configuration values in these files.
572
+
You need to specify the device details for IDT.
573
+
* 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).
572
574
575
+
You need to configure IDT the build, flash and test settings.
573
576
* In `build.bat` / `build.sh`, update ESP_IDF_PATH, and ESP_IDF_FRAMEWORK_PATH
574
577
* In `flash.bat` / `flash.sh`, update ESP_IDF_PATH, ESP_IDF_FRAMEWORK_PATH, and NUM_COMPORT
575
-
576
-
* In `config.json`, update the `profile` and `awsRegion` fields
577
-
* 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).
578
578
* In `userdata.json`, update `sourcePath` to the absolute path to the root of this repository.
579
579
* In `userdata.json`, update `signerCertificate` with the ARN of the [Setup pre-requisites for OTA cloud resources
* 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`.
582
582
583
-
### 7.4 Running AWS IoT Device Tester
583
+
### 7.4 Running the FreeRTOS qualification 2.0 suite
584
584
585
585
With configuration complete, IDT can be run for an individual test group, a test case, or the entire qualification suite.
@@ -604,4 +610,4 @@ To run the entire qualification suite, run:
604
610
605
611
For more information, `.\devicetester_win_x86-64.exe help` will show all available commands.
606
612
607
-
When IDT is run, it generates the `results/uuid` directory that contains the logs and other information associated with your test run, allowing failures to easily be debugged.
613
+
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.
0 commit comments