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

asset_tracker does not work with firmware v1.0.0

Environment

- DK 0.8.2 in which SB44 is cut, and P1 and P2 are connected
- firmware v1.0.0
- program : asset_tracker
- SIM: iBasis

Before updating firmware, asset_tracker worked fine. 

However, after updating, LED3 is always blinking and LED4 is off.
What I do is to write the program to DK, push reset button, and wait for more than 5 min.
at_client program and LTE Link Monitor works out with v1.0.0.

this is log

SPM: NS image at 0xc000
SPM: NS MSP at 0x2002aa00
SPM: NS reset vector at 0x142f1
SPM: prepare to jump to Non-Secure image.
***** Booting Zephyr OS v1.14.99-ncs2-rc3 *****
Asset tracker started
Connecting to LTE network. This may take several minutes.
Connected to LTE network

Any idea to solve this?

Parents
  • Hi.

    Edit: This procedure has been deprecated by an update to the nRF Cloud API. For a new procedure, see devzone.nordicsemi.com/.../nrf-cloud-certificate-update

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------

    If your device has been registered at nRF Cloud earlier, you can recover your certificates by following this procedure:

    1. Install httpie.
    2. Get your API key from nRF Cloud (you can find it at your account page).
    3. Get the device ID by running 
      http https://api.nrfcloud.com/v1/devices Authorization:"Bearer <your API key>"
      .
    4. Get the devices certificates by running 
      http POST https://api.nrfcloud.com/v1/devices/<device ID>/certificates Authorization:"Bearer <API key>"
      .
    5. Get Amazon's root CA certificate: https://www.amazontrust.com/repository/AmazonRootCA1.pem
    6. Write the certificates to the modem
      1. By writing certificates to the modem using AT command:
        1. Root CA cert: AT%CMNG=0,16842753,0,"< Amazon root CA >"
        2. Client cert:     AT%CMNG=0,16842753,1,"< Client cert >"
        3. Private key:    AT%CMNG=0,16842753,2,"< Private key >"
      2. Or by adding the certificates and your client ID to certificates.h (in the asset tracker sample) and adding CONFIG_NRF_CLOUD_PROVISION_CERTIFICATES=y to your prj.conf

    Best regards,

    Didrik

  • Thank you Didrik, this got my DK up and running again after losing my certificates and seeing the the nrf_cloud_connect: -111 error. I had to use the certificates.h method as the AT commands were timing out.

  • Hi ,

    I thought it was a bit weird that you were having an issue with a timeout error when using the AT commands to update your certificates, so I tried to update the certificates with AT%CMNG command  as well. It worked fine for me. Did you made sure that the AT client example was started before writing the AT commands? (easily done by pressing the reset button on the DK)

    If you try to write AT commands before the sample starts you will get an timeout error. I hope you help me to resolve this mistery.

    Best regards,

    Marjeris

Reply
  • Hi ,

    I thought it was a bit weird that you were having an issue with a timeout error when using the AT commands to update your certificates, so I tried to update the certificates with AT%CMNG command  as well. It worked fine for me. Did you made sure that the AT client example was started before writing the AT commands? (easily done by pressing the reset button on the DK)

    If you try to write AT commands before the sample starts you will get an timeout error. I hope you help me to resolve this mistery.

    Best regards,

    Marjeris

Children
  • Hi Marjeris,I dug up a log snippet from when I tried to write the AWS root certificate:

    2019-07-31T15:33:07.503Z DEBUG modem << ***** Booting Zephyr OS v1.14.99-ncs2 *****\x0D\x0A
    2019-07-31T15:33:07.510Z DEBUG modem << The AT host sample started\x0D\x0A
    2019-07-31T15:33:10.915Z DEBUG modem >> AT\x0D\x0A
    2019-07-31T15:33:10.932Z DEBUG modem << OK\x0D\x0A\x00
    2019-07-31T15:34:20.738Z DEBUG modem >> AT%CMNG=0,16842753,0,"MIIDQTCCAimgAwIBAgITBmyfz5m/jAo54vB4ikPmljZbyjANBgkqhkiG9w0BAQsFADA5MQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24gUm9vdCBDQSAxMB4XDTE1MDUyNjAwMDAwMFoXDTM4MDExNzAwMDAwMFowOTELMAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZMBcGA1UEAxMQQW1hem9uIFJvb3QgQ0EgMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALJ4gHHKeNXjca9HgFB0fW7Y14h29Jlo91ghYPl0hAEvrAIthtOgQ3pOsqTQNroBvo3bSMgHFzZM9O6II8c+6zf1tRn4SWiw3te5djgdYZ6k/oI2peVKVuRF4fn9tBb6dNqcmzU5L/q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3pOsqTQNroBvo3bSMgHFzZM9O6II8c+6zf1tRn4SWiw3te5djgdYZ6k/oI2peVKVuRF4fn9tBb6dNqcmzU5L/qwIFAGbHrQgLKm+a/sRxmPUDgH3KKHOVj4utWp+UhnMJbulHheb4mjUcAwhmahRWa6VOujw5H5SNz/0egwLX0tdHA114gk957EWW67c4cX8jJGKLhD+rcdqsq08p8kDi1L93FcXmn/6pUCyziKrlA4b9v7LWIbxcceVOF34GfID5yHI9Y/QCB/IIDEgEw+OyQmjgSubJrIqg0CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAYYwHQYDVR0OBBYEFIQYzIU07LwMlJQuCFmcx7IQTgoIMA0GCSqGSIb3DQEBCwUAA4IBAQCY8jdaQZChGsV2USggNiMOruYou6r4lK5IpDB/G/wkjUu0yKGX9rbxenDIU5PMCCjjmCXPI6T53iHTfIUJrU6adTrCC2qJeHZERxhlbI1Bjjt/msv0tadQ1wUsN+gDS63pYaACbvXy8MWy7Vu33PqUXHeeE6V/Uq2V8viTO96LXFvKWlJbYK8U90vvo/ufQJVtMVT8QtPHRh8jrdkPSHCa2XV4cdFyQzR1bldZwgJcJmApzyMZFo6IQ6XU5MsI+yMRQ+hDKXJioaldXgjUkK642M4UwtBV8ob2xJNDd2ZhwLnoQdeXeGADbkpyrqXRfboQnoZsG4q5WTP468SQvvG5"
    ' timed out

    I moved on pretty quickly to the other method so I won't rule out the DK being in a weird state, but it appears the AT host was running. I am wondering now if this was just the wrong format. Let me know if that is the case.

Related