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

nrf9160 custom device - nrfcloud cert connect failure

Hi,

I have a custom PCB with the nrf9610.  I have confirmed that https over LTE works fine.  I want to enable agps, so I need to get nrfcloud connected.

I made a new device certificate and instead of nrf-### I used tap-###

I got the json with the rootca, private key, and client cert.

I get connect error -8 (sorry I ran home before I got the exact error)

In any case, I also tried to use mosquitto_pub/_sub to test the ca/cert/key, but that failed as well, so obviously no agps data Disappointed

The certs are programmed manually using the AT* command set because on mac the nrfconnect lte monitor won't detect my cp2102 USB/Serial chip :(  even though it's serialized!  Anyways, story for a different day, but I verified that I have all 3 entries (ca,cert,key) under the proper ID #

Okay so I want to go step by step and figure out where I went wrong.  

1) Can you recommend a mosquitto_pub or _sub command with a -t 'topic_path' that I could use to test my certificates?  I just want to sanity check that my cert actually connects, but don't know the right topic to use.

2) Is there a good way to more detailed messages about where in the connect process things went wrong?  I worry that maybe the program can't retrive the keys from the modem or perhaps it's using a different set of keys besides the one in the modem.  Would be cool if there was a way to print out the certs during debug mode (however that sounds dangerous right? Slight smile

Parents
  • Hi!

    -8 is a format error so most likely the certificates were not provisioned correctly. 

    Please show me the output from the device when provisioning the certificates (preferably in a text file).

    1) 

    Can you recommend a mosquitto_pub or _sub command with a -t 'topic_path' that I could use to test my certificates?

    If you mean as an AT command, the Serial LTE Modem application has some proprietary MQTT AT commands that you can use to connect via MQTT (#XMQTTSUB and #XMQTTPUB). But I don't know how that would test your certificates, as they are used with nRF Connect for Cloud, not Mosquitto. 

     

    2) You can set "CONFIG_LTE_LINK_CONTROL_LOG_LEVEL_DBG" to get a more detailed output.

     

    Best regards,

    Heidi

  • Also in my prj.conf I was sure to change my prefix for the nrf client prefix:

    CONFIG_NRF_CLOUD_CLIENT_ID_PREFIX="tap-"

    I also tried to hard code it:

    CONFIG_COMPILER_OPT="-DNRF_CLOUD_CLIENT_ID=\"tap-352656102742411\""

    I also tried various combinations of:

    #+# NRF CLoud - src/certificates.h

    #+CONFIG_PROVISION_CERTIFICATES=n

    #+# NRF CLoud - AT*

    #+#CONFIG_MODEM_KEY_MGMT=y

    CONFIG_NRF_CLOUD_PROVISION_CERTIFICATES=y

    But seeing that it's a format error, I guess we're not at this point yet... anyways, thought I'd share it in advance :)

  • Hi!

    Thanks for the information. The AT commands look correct, as far as I can tell. Is the modem returning "OK" after you send each command?

    Could you export the log file from the application so I can take a look?

    Best regards,

    Heidi

Reply Children
Related