Issue Connecting nRF7002DK to AWS IoT Core nRF connect SDK 2.9.0

Hello Team,

I am currently experiencing difficulties connecting my nRF7002DK to AWS IoT Core using the aws_iot sample in nRF connect SDK v2.9.0 , which I have adapted with a few modifications. Below are the changes I made and the steps I have taken so far:

Changes Made to the Application Configuration:
1. Wi-Fi Configuration (Kconfig):

CONFIG_WIFI_CREDENTIALS_STATIC=y
CONFIG_WIFI_CREDENTIALS_STATIC_SSID="my_ssid"
CONFIG_WIFI_CREDENTIALS_STATIC_PASSWORD="my_pass"

2. AWS IoT Credentials:

CONFIG_AWS_IOT_CLIENT_ID_STATIC="my-thing"
CONFIG_AWS_IOT_BROKER_HOST_NAME="xxx.amazonaws.com"

3. Certificates:
I have attempted both of the following methods to include the AWS IoT certificates and keys:
- Directly using the exact certificates and key downloaded from the AWS IoT Console.
- Manually reformatted them as described in the documentation on Nordic Dev Academy by adding quotes and newlines as below manner

"-----BEGIN CERTIFICATE-----\n"
"MIIDQTCCAimgAwIBAgITBmyfz5m/jAo54vB4ikPmljZbyjANBgkqhkiG9w0BAQsF\n"
"ADA5MQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6\n"
"b24gUm9vdCBDQSAxMB4XDTE1MDUyNjAwMDAwMFoXDTM4MDExNzAwMDAwMFowOTEL\n"
"-----END CERTIFICATE-----\n"

Observed Issue:
Despite the above configurations, I am consistently unable to establish a connection to AWS IoT Core. I suspect there might be an issue with either the certificates or the way the credentials are being processed, although I am unsure.

Additional Information:
Device: nRF7002DK
Sample Used: aws_iot
I have attached a portion of the logs from the device console below for your reference:

*** Booting nRF Connect SDK v3.5.99-ncs1-1 ***
I: Starting bootloader
I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Boot source: none
I: Image index: 0, Swap type: none
I: Bootloader chainload address offset: 0x10000
I: Jumping to the first image slot

uart:~$ [00:00:00.013,305] <inf> spi_nor: mx25r6435f@0: 8 MiBy flash
uart:~$ *** Booting nRF Connect SDK v3.5.99-ncs1-1 ***
uart:~$ [00:00:00.226,898] <inf> aws_iot_sample: The AWS IoT sample started, version: v1.0.0
uart:~$ [00:00:00.237,243] <inf> aws_iot_sample: Bringing network interface up and connecting to the network
uart:~$ [00:00:01.845,489] <inf> wifi_mgmt_ext: Connection requested
uart:~$ [00:00:06.828,460] <inf> aws_iot_sample: Network connectivity established
uart:~$ [00:00:11.837,982] <inf> aws_iot_sample: Connecting to AWS IoT
uart:~$ [00:00:12.056,762] <err> mqtt_helper: mqtt_connect, error: -22
uart:~$ [00:00:12.065,490] <err> aws_iot: mqtt_helper_connect, error: -22
uart:~$ [00:00:12.074,462] <err> aws_iot_sample: aws_iot_connect, error: -22
uart:~$ [00:00:12.083,709] <err> aws_iot_sample: Fatal error! Rebooting the device.
uart:~$ [�I: mx25r6435f@0: 8 MiBy flash
*** Booting nRF Connect SDK v3.5.99-ncs1-1 ***
I: Starting bootloader
I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Boot source: none
I: Image index: 0, Swap type: none
I: Bootloader chainload address offset: 0x10000
I: Jumping to the first image slot

uart:~$ [00:00:00.013,305] <inf> spi_nor: mx25r6435f@0: 8 MiBy flash
uart:~$ *** Booting nRF Connect SDK v3.5.99-ncs1-1 ***
uart:~$ [00:00:00.226,867] <inf> aws_iot_sample: The AWS IoT sample started, version: v1.0.0
uart:~$ [00:00:00.237,243] <inf> aws_iot_sample: Bringing network interface up and connecting to the network
uart:~$ [00:00:01.845,489] <inf> wifi_mgmt_ext: Connection requested
uart:~$ [00:00:06.828,308] <inf> aws_iot_sample: Network connectivity established
uart:~$ [00:00:11.837,768] <inf> aws_iot_sample: Connecting to AWS IoT
uart:~$ [00:00:12.070,495] <err> mqtt_helper: mqtt_connect, error: -22
uart:~$ [00:00:12.079,223] <err> aws_iot: mqtt_helper_connect, error: -22
uart:~$ [00:00:12.088,195] <err> aws_iot_sample: aws_iot_connect, error: -22
uart:~$ [00:00:12.097,442] <err> aws_iot_sample: Fatal error! Rebooting the device.

Could you please assist me in troubleshooting this issue? If there are any additional resources, examples, or debugging methods you can provide, I would greatly appreciate it.

Thank you for your time and support. I look forward to your guidance on how to resolve this.

Best regards,
Thuan.

Parents Reply Children
No Data
Related