Thingy:91 Asset Tracker v2: nrfcloud not connecting

Hello,

I have been trying to get the thingy:91 up for 3 weeks or more now from Sri Lanka. I have made a lot of progress in getting data connectivity via MQTT to thethings.io successfully. But I still cant get the data connectivity to the nrfcloud. I really need some assistance here. 

1. I recompiled the Asset Tracker V2  with nbiot, and changed the URL to an IP address as the DNS translation is not working with my operator. Not sure why that is, but that needs further debug assistance. But for now I put this IP : 34.193.110.244. Is that the correct IP address ? Is that acceptable to change the URL to an IP ? 

2. Asset tracker v2 with the changes seems to run fine, and I think it connects with the server. Log file is attached. Can you please help confirm that its connected to the server ? 

3. I think I have the certificates properly loaded to the device. I used the following command to create the CA , in windows using the scripts from your site

python3 create_ca_cert.py -cn nrf-352656101105xxx -c US

4. I used the following command to program the certificates to the device and create the provisions.csv file. The certificates loaded in to the device via UART without an issue

python device_credentials_installer.py -d --ca .\0x58d12fc065468e1e1f81d14e6a88d316236744d7_ca.pem --ca_key .\0x58d12fc065468e1e1f81d14e6a88d316236744d7_prv.pem --csv provision.csv -s -v --id_str nrf-352656101105xxx

5. Finally I provisioned the device using this command 


python3 .\nrf_cloud_provision.py --apikey db7cec7b98573fe55f29eb21c1d28525d2c73xxx --chk --csv .\provision.csv


6. The provisioning happened correctly also. I see this when I login. Do I need to do anything else that the provisioning, like add a device using the yellow button on the left ? 


7. If do try to use the yellow button and try to add a device it gives me this error. After provisioning via the python script, do I need to do this step ? 

thank you in advance, really need to get this step solved so we can get to the next stage of the projects. 

thank you ! 

Parents
  • Hi

     

    Based on the timestamps, your firmware has been running for quite some time. How does the initial log look like from reset?

    Based on the CESQ behavior, it seems that the initial connection to the cloud server is refused/disconnected, but it is hard to say without looking at the full log.

     

    I recompiled the Asset Tracker V2  with nbiot, and changed the URL to an IP address as the DNS translation is not working with my operator. Not sure why that is, but that needs further debug assistance. But for now I put this IP : 34.193.110.244. Is that the correct IP address ? Is that acceptable to change the URL to an IP ? 

    Yes, this is one of the IPs to the nrf cloud aws.

    Have you tried to use legacy PCO and see if DNS is then provided?

    This is done by setting these configurations:

    CONFIG_PDN=y
    CONFIG_PDN_LEGACY_PCO=y

     

    Kind regards,

    Håkon

  • Same result with the following two set via the Config NRF Menu in Segger. Does not connect. Any extra logs that I can enable to see why the connection is refused ? 


    CONFIG_PDN=y
    CONFIG_PDN_LEGACY_PCO=y

  • Hi,

     

    I think you're mixing different ways of fetching the certificates for your device.

     

    The below is essentially these two guides:

    https://infocenter.nordicsemi.com/topic/ug_nrf91_dk_gsg/UG/nrf91_DK_gsg/downloading_certificate.html?cp=2_0_4_2_3_0

    https://infocenter.nordicsemi.com/topic/ug_nrf91_dk_gsg/UG/nrf91_DK_gsg/provisioning_certificate.html?cp=2_0_4_2_3_1

     

    If you log in to your nrfcloud account, then navigate to:

    * Device Management -> provision devices

    Then you click on the cog-wheel and press "generate JITP certificates"

     Then input your details on the back of the thingy91

     

    Now it should provide you with a nrf-<>.cert.json file which you can load in the LTE Link Monitor -> Certificate Manager part:

     

    Be sure to first place the device in flight mode (AT+CFUN=4) before clicking "update certificates".

    Go back to the "terminal" tab to see that the certificates were loaded correctly, ie. modem returned "OK" for each.

     

    Note: if you already have certs loaded on this sec_tag, you have to first check "delete".

     

    Now, reset your device, it should try to connect and this should be present in the serial output:

    ...
    [00:00:06.266,784] [1;31m<err> nrf_cloud_transport: MQTT input error: -128
    [00:00:06.273,803] [1;31m<err> nrf_cloud_transport: Error disconnecting from cloud: -128
    ...

     

    Now you click the large + sign in nrfcloud frontend, upper left corner, and input the imei + pin:

     

    When the device tries to reconnect now, it should successfully connect to nrfcloud and show data similar to this:

     

    Could you try this and see if it connects properly now?

     

    Kind regards,

    Håkon

Reply
  • Hi,

     

    I think you're mixing different ways of fetching the certificates for your device.

     

    The below is essentially these two guides:

    https://infocenter.nordicsemi.com/topic/ug_nrf91_dk_gsg/UG/nrf91_DK_gsg/downloading_certificate.html?cp=2_0_4_2_3_0

    https://infocenter.nordicsemi.com/topic/ug_nrf91_dk_gsg/UG/nrf91_DK_gsg/provisioning_certificate.html?cp=2_0_4_2_3_1

     

    If you log in to your nrfcloud account, then navigate to:

    * Device Management -> provision devices

    Then you click on the cog-wheel and press "generate JITP certificates"

     Then input your details on the back of the thingy91

     

    Now it should provide you with a nrf-<>.cert.json file which you can load in the LTE Link Monitor -> Certificate Manager part:

     

    Be sure to first place the device in flight mode (AT+CFUN=4) before clicking "update certificates".

    Go back to the "terminal" tab to see that the certificates were loaded correctly, ie. modem returned "OK" for each.

     

    Note: if you already have certs loaded on this sec_tag, you have to first check "delete".

     

    Now, reset your device, it should try to connect and this should be present in the serial output:

    ...
    [00:00:06.266,784] [1;31m<err> nrf_cloud_transport: MQTT input error: -128
    [00:00:06.273,803] [1;31m<err> nrf_cloud_transport: Error disconnecting from cloud: -128
    ...

     

    Now you click the large + sign in nrfcloud frontend, upper left corner, and input the imei + pin:

     

    When the device tries to reconnect now, it should successfully connect to nrfcloud and show data similar to this:

     

    Could you try this and see if it connects properly now?

     

    Kind regards,

    Håkon

Children
No Data
Related