Amazon FreeRTOS IDT MQTT failures

Hello All,

I recently ported Amazon FreeRTOS to my custom hardware. All of the demos and most of the tests have run successfully. The IDT MQTT tests are failing and I’m not sure why, especially since the demos are running.

I’m using FreeRTOS version 201912.00 and the compatible version of IDT.

The log of the Full_MQTT test failure is pasted below.

time=“2020-02-21T06:32:52-08:00” level=info msg=“AFQP Suite Info” hostArch=amd64 hostName=XXXX hostOs=linux
time=“2020-02-21T06:32:52-08:00” level=info msg=“Getting version file url …”
time=“2020-02-21T06:32:53-08:00” level=info msg=“Validation result for test group”
time=“2020-02-21T06:32:53-08:00” level=info msg="{“userData”:{“sourcePath”:"",“vendorPath”:"",“buildTool”:{“Command”:""},“flashTool”:{“Command”:""},“clientWifiConfig”:{“wifiSSID”:"",“wifiPassword”:"",“wifiSecurityType”:""},“testWifiConfig”:{“wifiSSID”:"",“wifiPassword”:"",“wifiSecurityType”:""},“otaConfiguration”:{“otaFirmwareFilePath”:"",“deviceFirmwareFileName”:"",“awsSignerPlatform”:"",“awsSignerCertificateArn”:"",“awsUntrustedSignerCertificateArn”:"",“awsSignerCertificateFileName”:"",“compileCodesignerCertificate”:""},“cmakeConfiguration”:{“boardName”:"",“vendorName”:"",“afrToolchainPath”:"",“compilerName”:"",“cmakeToolchainPath”:"",“cmakeInstallation”:"",“compilerInfo”:""},“echoserverConfiguration”:{“securePortForSecureSocket”:"",“insecurePortForSecureSocket”:"",“insecurePortForWiFi”:""}},“setup”:{“awsCredential”:{“accessKey”:"",“secretKey”:"",“region”:""},“productVersion”:""},“resource”:{“privateKeyPath”:"",“username”:"",“ip”:"",“bleDevice”:""}}"
time=“2020-02-21T06:32:57-08:00” level=info msg=“AFQP Suite Info” hostArch=amd64 hostName=SparkNUC hostOs=linux
time=“2020-02-21T06:32:57-08:00” level=info msg=“Getting version file url …”
time=“2020-02-21T06:32:57-08:00” level=info msg=“Test setup start …”
time=“2020-02-21T06:32:57-08:00” level=info msg=“Copying source code to /XXX/devicetester_afreertos_linux/6f2-6glcid…”
time=“2020-02-21T06:32:59-08:00” level=info msg=“Copying source code finished”
time=“2020-02-21T06:32:59-08:00” level=info msg=“Setting client wifi config …”
time=“2020-02-21T06:32:59-08:00” level=info msg=“Applying policy retrieved from /XXX/devicetester_afreertos_linux/tests/AFQ_1/policies/thingPolicy.json.\n”
time=“2020-02-21T06:32:59-08:00” level=error msg=“failed to create thing with error open : no such file or directory”
time=“2020-02-21T06:32:59-08:00” level=info msg=“Cleaning test resources”
time=“2020-02-21T06:32:59-08:00” level=error msg=“Execution failed due to error: failed to setup environment with error: open : no such file or directory”

It’s not clear which file or directory is missing. Running the test individually with additional verbosity and through strace yields no clues. I suspect the test is failing to create the thing due to policy issues.

I would greatly appreciate any help.

Cheers,
-John

Hi John,

To help me debug this issue, can you:
1) Confirm that you are using IDT v1.6.1 for FreeRTOS Linux.
2) Provide information about the compiler and compiler version being used.
3) Provide a zip folder with your logs and configuration files.

Thanks,
Joshua

Hi Joshua,

Thank you for the response!

  1. Yes, I am using IDT v1.6.1
  2. I’m using the toolchain for the esp32 supplied with FreeRTOS.
  3. I’ve attached a zipped tar file. (whoops, new users can’t upload) Please let me know how.

Regards,
-John

Hi @jkaye I’ve bumped up your level so you can post an attachment. Please try again.

Thanks Rashed! Attached is the file containing the logs.

-Johnresults.tar.gz (105.9 KB)

Hi John,

Thank you for providing your logs and configuration files. In your device.json file, it looks like you have set the KeyProvisioning feature to “Onboard”.

{
   "name": "KeyProvisioning",
   "value": "Onboard"
}

When using this setting, you need to provide a path to the public key via the “secureElementConfig” feature.

"secureElementConfig": {
  "publicKeyAsciiHexFilePath":"<absolute-path-to-public-key>"
}

This setting is used when the board has a secure element. Here are my suggestions:

  • If the board does not have a secure element, select “Import” for “KeyProvisioning”.
  • If the board does have a secure element, configure the “secureElementConfig” section.

See the following link for more information on the configuration options and how to use them:
https://docs.aws.amazon.com/freertos/latest/userguide/qual-steps.html#cfg-dt-dp

Thanks Joshua! That worked perfectly. Now I just need to sort the FreeRTOSIntegrity failure and I’ll be good to go!

-John