Connect to NRF cloud using the Serial LTE Modem sample

Hi,

The NCS version I am using is 2.4.0

I have a 91DK which has a modem firmware of 1.3.5. I also have flashed the serial_lte_modem hex file. I saw that we can connect to NRF cloud using the asset tracker V2 hex file. Wanted to know if it is possible to do the same with serial lte modem hex file.

Thank you for your help.

Regards 

Parents
  • yes you can connect to nRF Cloud using the pre-compiled Serial LTE Modem hex file.

    it looks like you have found the device device credentials and provisioning documentation (note: we are in the process of changing this term to device onboarding), but i will list all the steps here:

    1. Create and install credentials on your device.
      1. Create a self-signed CA cert and private key: see create_ca_cert.py
      2. Create/install a device private key and certificate: see device_credentials_installer.py
        This step uses the CA cert and private key pem files created in step 1a.
        By default, a provision.csv file is created when the script executes successfully.
        If your device is already running serial LTE modem, add --term CRLF to the python command.
        Example: 
        python3 ./device_credentials_installer.py --ca <CA_CERT.PEM> --ca_key <CA_PRIVATE_KEY.PEM> -d --term CRLF
    2. Use the provision.csv file created in step 1b to provision (onboard) your device to nRF Cloud.
      1. Use the web UI: https://nrfcloud.com/#/add-device/bulk 
      2. Or use the REST API: https://api.nrfcloud.com/v1#tag/IP-Devices/operation/ProvisionDevices
    3. When your device has been successfully added to your nRF Cloud account, it should appear in your device list: https://nrfcloud.com/#/devices
    4. Now connect the device with serial LTE modem:
      > AT+CFUN=1
      
      OK
      > AT+CEREG?
      
      +CEREG: 0,5,"900A","0509260F",7
      
      OK
      > AT#XNRFCLOUD=1
      
      OK
      
      #XNRFCLOUD: 1,0
      > AT#XNRFCLOUD?
      
      #XNRFCLOUD: 1,0,16842753,"50503642-3239-4f86-80c4-06122e299623"
      
      OK
  • Hi,

    Thank you for replying. I have done these steps and have already gotten my device added to NRF Cloud. I also did step 4. But I couldn't get line 13. I am not sure where I am going wrong.

    Regards

  • I did the necessary changes. On my NRF Cloud now, I am getting with my internal UUID:-

    But I am still getting the same error when I use the terminal:-

    Wanted to know how much time it normally takes to connect to NRF Cloud after I write this command AT#XNRFCLOUD=1 for the first time

  • It should connect within 30s... but is dependent on LTE network conditions.
    unfortunately debug output is not enabled in the prebuilt hex file for serial LTE modem.
    you can view standard logging output on RTT if you have a JLink device.

    your device appears to be correctly added to the cloud.
    the potential causes for not connecting are: 
    - your SIM card is out of data.
    - poor LTE connection.
    - the credentials on your device do not match what has been provisioned to nRF Cloud.
    - the credentials on your device were installed to a sec_tag other than 16842753.

  • I remember the first time I was connecting to LTE, it took me 30 minutes. Will it be the same for connecting to NRF Cloud?

    Also, how can I check the last 2 causes?

  • - the credentials on your device do not match what has been provisioned to nRF Cloud.

    This is difficult to fully verify, other than having the device successfully connect to nRF Cloud.
    If the device_credentials_installer.py is executed multiple times on the same device it could occur if the script prompts or options are not used correctly.
    If you suspect this is the issue, I would delete your device from nRF Cloud, and re-run the steps.
    For device_credentials_installer.py:
    - use the -d parameter to ensure the sec tag contents are deleted.
    - use the --verify parameter to perform a SHA check on the cert data.
    - if you are using the same csv file, ensure you select y to overwrite when prompted.


    - the credentials on your device were installed to a sec_tag other than 16842753.

    This would occur only if you used the -s or --sectag when running the device_credentials_installer.py script.

  • Hi, thank you very much for your help. I followed the instructions you gave me and it worked. I also got to know where I went wrong.

    Regards 

Reply Children
No Data
Related