Connecting nRF7002 to AWS IoT Core

Hi, I'm working on getting nRf7002 connected to AWS IoT Core and the process hasn't been so smooth, so I wanted to post and make sure I am on the right track (or if I'm not, get some guidance on the topic).

My development setup is as follows: nRF7002DK and 2.3.0 nRF Connect SDK/Toolchain, #include <net/aws_iot.h> library

What I've been able to do so far is connecting to a WiFi network and syncing the date time with NTP server. I am currently using the net/aws_iot library and trying to provision the aws certificates at runtime by specifying a header file with the aws private key and certificates. Unfortunately, I have been getting many build errors just by including the aws_iot.h file (haven't made any function calls yet), and it's been very confusing trying to resolve them.

It'd be great if I can get some help or suggestions from anyone with similar experience on this, any help is really appreciated! And sorry if this post seems like an easy-fix and I couldn't get it, I haven't found any examples of nrf7002 running the aws iot library on the internet yet. Thank you again for reading and helping!

Parents Reply
  • Hi Epietro, sorry for the late response, here are AWS_IOT-related configs I used (in addition to Johannes' suggestions), note that you can also load the certificate files manually with function calls, instead of from the config:

    # AWS Module
    # CONFIG_MQTT_CLEAN_SESSION=y
    # CONFIG_MQTT_LIB_TLS=y

    # CONFIG_MQTT_HELPER=y
    # CONFIG_MQTT_HELPER_NATIVE_TLS=y
    # CONFIG_MQTT_HELPER_SEC_TAG=10
    # CONFIG_MQTT_HELPER_CERTIFICATES_FILE="certificates.h"
    # CONFIG_TLS_CREDENTIAL_FILENAMES=y

    CONFIG_AWS_IOT=y
    CONFIG_AWS_IOT_SEC_TAG=24
    CONFIG_AWS_IOT_CLIENT_ID_APP=y
    CONFIG_AWS_IOT_BROKER_HOST_NAME_APP=y
    # CONFIG_AWS_IOT_PROVISION_CERTIFICATES=y
    # CONFIG_AWS_IOT_CERTIFICATES_FILE="certificates.h"
    CONFIG_AWS_IOT_CLIENT_ID_STATIC="aws_thing_name"
    CONFIG_AWS_IOT_APP_SUBSCRIPTION_LIST_COUNT=1
    CONFIG_AWS_IOT_TOPIC_UPDATE_DELTA_SUBSCRIBE=y
    CONFIG_AWS_IOT_LAST_WILL=y
    CONFIG_AWS_IOT_TOPIC_GET_ACCEPTED_SUBSCRIBE=y
    CONFIG_AWS_IOT_TOPIC_GET_REJECTED_SUBSCRIBE=y

    CONFIG_AWS_IOT_CONNECTION_POLL_THREAD=n
    CONFIG_AWS_IOT_SEND_TIMEOUT=n

     Hope this helps! I also have some AWS code uploaded in this ticket:  aws_iot mqtt_connect and client_connect failing (Check out Amanda's answer too, she provided a prj.conf in there and I will need to review it too)

    -Eric

Children
Related