Feather nRF9160 Provisioning and onboarding

Hi,

I'm using a circuitdojo feather nrf9160 I want to use the nRF cloud but I got some trouble connecting. Something is missing, but don't know what.

This is what I did:

  1. Create CA Cert with create_ca_cert.py saved ca_ca.pem, ca_prv.pem & ca_pub.pem
  2. Modem Credentials Parser used AT%KEYGEN=17,2,0 and saved the _csr.pem & _pub.pem file.
  3. Create Device Credentials with the ca_ca.pem, ca_prv.pem & _csr.pem file and saved the crt.pem & pub.pem file.
  4. nRF connect Certificate manager to add the aws_ca to Ca certificate, crt.pem to client certificate from 3 & ca_prv.pem to private key from 1
  5. Edit a onboard.csv with the UUID that is in the default names of step 2&3 and the device crt crt.pem from 3
  6. nRF cloud onboard nrf_cloud_onboard.py --apikey personal apikey --csv onboard.csv
  7. Flash nrf_cloud_mqtt_multi_service from https://github.com/circuitdojo/nrf9160-feather-examples-and-drivers.git

The device is onboarded but does not find a connection from the feather to the cloud.

With the nrf91 dk I used device_credentials_installer.py but that doesn't work because it gets stuck with sending at commands to add the certificates to the feather.

The relevant terminal output:


[00:00:05.679,687] [0m<dbg> connection: lte_event_handler: LTE_EVENT: Modem domain event, type: Search done
[00:00:05.684,875] [0m<dbg> connection: lte_event_handler: LTE_EVENT: Network registration status 5, Registered Roaming
[00:00:05.685,028] [0m<inf> connection: Connected to LTE network
[00:00:05.685,119] [0m<inf> connection: Connecting to nRF Cloud...
[00:00:05.685,119] [0m<inf> connection: Next connection retry in 30 seconds
[00:00:05.685,180] [0m<dbg> connection: await_cloud_connected: Awaiting Cloud Connection
[00:00:05.685,241] [0m<dbg> connection: await_cloud_ready: Awaiting Cloud Ready
[00:00:05.685,272] [0m<dbg> connection: cloud_event_handler: NRF_CLOUD_EVT_TRANSPORT_CONNECTING
[00:00:05.686,309] [0m<dbg> connection: lte_event_handler: LTE_EVENT: PSM parameter update: TAU: 3240, Active time: -1
[00:00:05.689,544] [0m<dbg> connection: await_cloud_ready: Awaiting Cloud Ready
+CSCON: 0
[00:00:15.542,877] [0m<dbg> connection: lte_event_handler: LTE_EVENT: RRC mode: Idle
+CSCON: 1
[00:02:46.074,951] [0m<dbg> connection: cloud_event_handler: NRF_CLOUD_EVT_TRANSPORT_CONNECT_ERROR: -10
[00:02:46.136,199] [0m<dbg> connection: lte_event_handler: LTE_EVENT: RRC mode: Connected
+CSCON: 0




I hope someone knows what I did wrong. So I can implement the code I have written for the dk to the feather.

  • Hi,

    Based on the error you get, it doesn't look like the device is able to contact nRF Cloud at all, so at this stage it is unlikely that the credentials are the problem.

    What SIM card are you using? Are you sure it has data available?

    Are you able to take a modem trace?

    Best regards,

    Didrik

  • Without changing the code. I flashed a second feather with the original certificates, and that one does connect to the nrf cloud. With the same sim I used with the example here above. So I have data on the sim. But I stil would like to use my own certificates.

    In a few days I should have the correct cable to use a jlink for the feather. I hope that I can use device_credentials_installer.py to get the same result as with the nrf9160 dk. I will comment if I'm successful.

  • I did find a solution. I use a Segger jlink base for this but for a cheaper option the jlink ob on the nrf dk should also work.

    1. Make your own Ca and prv key with this python script.
    2. Connect the TC2030-NL to the feather with the TC2030-CLIP.
    3. Supply the power to the feather through the USB or one of the power pins.
    4. Build and Flash modem_shell application for the CircuitDojo Feather nrf9160 ns with overlay-rtt.conf
    5. Create and flash the device certificates with this python script make sure to use --rtt if coap is used add --coap.
    6. Now onboard the feather with the onboard .csv file from step 5 and this python script (don't use the $ in front of the apikey)
    7. On success, the board will be visual in the nRFcloud/devices
    8. Use the application nRF_cloud_multi_service.
    9. in prj.conf add CONFIG_NRF_CLOUD_CLIENT_ID_SRC_INTERNAL_UUID=y and comment out CONFIG_NRF_CLOUD_CLIENT_ID_PREFIX="feather-" or "nrf-"
    10. Build and flash the nRF_cloud_multi_service to the feather.

    This works for me and hope this will help some of you!

Related