This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Thingy91 Asset Tracker v2 AWS IoT hostname not set

Hi,

I'm trying to evaluate  the new Asset Tracker v2 example with a Thingy91, nRF cloud, and the supplied iBasis SIM, but when I build I get the following error:

C:/Nordic/v1.5.0/zephyr/include/toolchain/gcc.h:62:36: error: static assertion failed: "AWS IoT hostname not set"

I found in the proj.conf file: CONFIG_AWS_IOT_BROKER_HOST_NAME="", so I searched the v1 Asset Tracker, found the NRF_CLOUD_HOST_NAME and put it in, rebuilt (clean now), and loaded. The Thingy91 does not connect, I get:

m<err> aws_iot: mqtt_connect, error: -95

From: https://devzone.nordicsemi.com/f/nordic-q-a/66776/mqtt-connect-error--95-in-nrf9160-aws_iot-sample

It is suggested that this is a certficiate error, butI reloaded the Asset Tracker v1 code and it connects to nRF cloud and operates correctly.

Thanks,

Tim

Parents
  • Hello again,

    With AT%CMNG=1, I got the follwing response indicating the sec_tag value:

    AT%CMNG=1

    %CMNG: 0,6,"0606060606060606060606060606060606060606060606060606060606060606"

    %CMNG: 16842753,0,"0000000000000000000000000000000000000000000000000000000000000000"

    %CMNG: 16842753,1,"0101010101010101010101010101010101010101010101010101010101010101"

    %CMNG: 16842753,2,"0202020202020202020202020202020202020202020202020202020202020202"

    OK

     

    So I edited proj.conf to:

    CONFIG_AWS_IOT_SEC_TAG=16842753
    CONFIG_AWS_IOT_BROKER_HOST_NAME="a2n7tk1kp18wix-ats.iot.us-east-1.amazonaws.com"

    And the unit seemed to show connected on nRF cloud for a while, but then did not. The mqtt_connect error -95 is gone now however. Here's the log:

    [00:01:06.656,616] [1;33m<wrn> cloud_module: Cloud connection establishment in progress

    [00:01:06.664,794] [1;33m<wrn> cloud_module: New connection attempt in 32 seconds if not successful

    [00:01:06.674,194] [0m<inf> event_manager: CLOUD_EVT_CONNECTING

    [00:01:11.347,808] [0m<inf> event_manager: CLOUD_EVT_DISCONNECTED

    [00:01:38.674,224] [0m<inf> event_manager: CLOUD_EVT_CONNECTION_TIMEOUT

    [00:01:38.681,243] [1;33m<wrn> cloud_module: Cloud connection establishment in progress

    [00:01:38.689,453] [1;33m<wrn> cloud_module: New connection attempt in 64 seconds if not successful

    [00:01:38.698,944] [0m<inf> event_manager: CLOUD_EVT_CONNECTING

    [00:01:44.128,631] [0m<inf> event_manager: CLOUD_EVT_DISCONNECTED

    
    
    
    

    Thanks,

    Tim

  • Hi Tim,

    The Asset Tracker v2 application does not support nRF Cloud yet. As of now, it only has support for AWS IoT Core, and it is intended to be used with an instance of Asset Tracker Cloud Example for AWS running on the cloud side. If you want to test this application with AWS IoT Core, please see the part about configuration in the Asset Tracker v2 to see how to set up the project, as well as the Getting started guide for Asset Tracker Cloud Example for AWS to see how to set up the application.

    If your goal is to connect to nRF Cloud you should instead use the old Asset Tracker application for now.

    Best regards,

    Marte

Reply Children
Related