Device Advisor is a cloud-based, fully managed test capability for validating IoT devices during device software development. Follow the link to learn more about the device advisor.
Follow the instructions described in the section listed below to create an IoT thing for your device.
Follow the instructions described in the page to create a policy for your IoT thing and then a device advisor role.
- Create an IAM role to use as your device role.
- As part of creating the policy, the topic and topic filter shall be assigned a value
*
and theclientId
should match the IoT thing name.
- As part of creating the policy, the topic and topic filter shall be assigned a value
- Create a custom-managed policy for an IAM user to use Device Advisor
- Create an IAM user to use Device Advisor (AWS recommendation)
Follow the instructions described the page to create AWS IoT Core Qualification test suite.
The Trigger Topic
property should be set to the value of deviceAdvisorTOPIC_FORMAT
macro available at aws_device_advisor_task.h for TLS Receive Maximum Size Fragments
test.
Now that you have created an AWS Thing and attached the certificates and policies to it, the representative values must be added to your application to ensure connectivity with AWS IoT Core Device Advisor.
Set the macro appCONFIG_DEVICE_ADVISOR_TEST_ACTIVE
in
applications/<application_name>/configs/app_config/app_config.h
to 1.
Within the application directory that you are using, edit the
applications/<application_name>/configs/aws_configs/aws_clientcredential.h
file and set values for specified
user defines called out below.
clientcredentialMQTT_BROKER_ENDPOINT
- Set this to the device advisor endpoint. You can get the device advisor end point either via AWS CLI or AWS IoT console:
clientcredentialIOT_THING_NAME
- Set this to the name of the thing you set (e.g. MyThing).
Save and close the file.
To build the application, run the following command:
./tools/scripts/build.sh ${APPLICATION_NAME} --certificate_path <certificate pem's path> --private_key_path <private key pem's path> --target <corstone300/corstone310/corstone315> --toolchain GNU
- The
certificate pem's path
andprivate key pem's path
should be the downloaded key's and certificate's paths during the Thing creation.
Or, run the command below to perform a clean build:
./tools/scripts/build.sh ${APPLICATION_NAME} --certificate_path <certificate pem's path> --private_key_path <private key pem's path> --target <corstone300/corstone310/corstone315> --toolchain GNU -c
We need to start the device advisor tests before running the application. If not then, device advisor rejects the connection requests from the application.
Follow the instructions described in the page to start the previously created AWS IoT Core Qualification test suite.
Now run the application by running the following command:
./tools/scripts/run.sh ${APPLICATION_NAME} --target <corstone300/corstone310/corstone315>
Once the device advisor has completed all the tests, you can download the AWS IoT Core Qualification report by following the instructions in the page.
AWS IoT Core Device Advisor Tests are supported on keyword-detection
application using Arm GNU Toolchain (arm-none-eabi-gcc)
only.