Hi, I am working on using nrf7002dk to connect to AWS over WiFi. So far I have been able to connect to WiFi and send a HTTP get request through DHCPV4. When I continue to aws_iot library, I have been able to call init, subscribe to topics, and provisioning certificates work (or not return error when they return). But whenever I call aws_iot_connect, I get
<err> aws_iot: mqtt_connect, error: -22 and
<wrn> aws_iot: connect_client failed, error: -7
Looking up the error numbers, I find that -22 stands for Invalid argument, and -7 stands for bad private key. I have tried to format my certificates header according to the library’s example and some posts here on nordic so I am pretty sure my certificates are not wrong. It would be great if I can get some help on the issue! Thank you for reading, and looking forward to any help that may come. Attached are a rough outline of my aws_iot function calls, my certificate header, and my prj.conf file. I have taken out sensitive parts in the code, please let me know if more info is needed!
-Eric