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

Problems with programming device certificates from the AWS IoT console.

I did download the device certificates from the AWS IoT console into a directory: C:\Nordic  on my PC.

However, my attempts to copy and paste these device certificates from the directory C:\Nordic on my PC to the respective entries (CA Certificate, Client Certificate and Private Key) on the Certificate Manager of the LTE Link Monitor were unsuccessful. No response at all...

Also, when you open the Certificate Manager in the LTE Link Monitor, you see the following note: "Use security tag 16842753 to manage nRF Connect for Cloud certificate, otherwise pick a different tag".   So, which security tag shall be used to manage the AWS IoT certificates?

I am using:

1. nRF9160DK v1.0.1

2. Windows 10 Pro OS, version: 20H2, OS build:19042.631

3. nRF Connect v 3.7.0

4. nRF Connect SDK v1.6.1

Regards,

Jacek

  • Hi Markus,

    As I explained in my earlier communications, I did follow this procedure "as documented here" several times but my attempts to use copy-and-paste in order to enter the required certificates from a folder: c:\Nordic to the relevant text boxes of the Certificate Manager were unsuccessful. I was able to copy a certificate from the folder c:\Nordic but there was no response when I tried to paste this certificate into the relevant text box of the Certificate Manager.

    I tried to attach the copies of these 3 certificates that I downloaded from the AWS IoT Console (to a C;\Nordic folder of my PC) to this message for your reference but I could not insert them into this message.

    Regards,

    Jacek

  • Hei Jacek,

    just to clarify:

    1. can you type in the text boxes?
    2. with copy&paste we mean that you should
      1. open the file with a text editor (e.g. Notepad on Windows)
      2. select the entire content
      3. copy it to the clipboard
      4. switch to the Certificate manager
      5. paste into the respective textbox

    It pasted content should look like this:

  • Hi Markus,

    Thanks for clarifying that by copy&paste you mean that I should first open the file with a text editor.  Once I did that, I was able to copy&paste the device certificates without any problems.

    While the device certificates from AWS IoT Console have now been programmed correctly, I am still experiencing problems when running the sample: AWS_iot and trying to connect to the AWS IoT client broker, with the following messages popping up on the LTE Link Monitor every 30 seconds:

    AWS_IOT_EVT_CONNECTING

    getaddrinfo, error:-11

    client_broker_init, error:-10

    as shown in the attached LTE Link Monitor log file.

    2021-09-20T14:42:46.527Z INFO Application data folder: C:\Users\Administrator\AppData\Roaming\nrfconnect\pc-nrfconnect-linkmonitor
    2021-09-20T14:42:46.578Z DEBUG App pc-nrfconnect-linkmonitor v1.1.10 official
    2021-09-20T14:42:46.578Z DEBUG App path: C:\Users\Administrator\.nrfconnect-apps\node_modules\pc-nrfconnect-linkmonitor
    2021-09-20T14:42:46.578Z DEBUG nRFConnect 3.7.0, required by the app is (^3.6.0)
    2021-09-20T14:42:46.578Z DEBUG nRFConnect path: C:\Users\Administrator\AppData\Local\Programs\nrfconnect\resources\app.asar
    2021-09-20T14:42:46.579Z DEBUG HomeDir: C:\Users\Administrator
    2021-09-20T14:42:46.579Z DEBUG TmpDir: C:\Users\ADMINI~1\AppData\Local\Temp
    2021-09-20T14:42:46.587Z VERBOSE Could not fetch serial number for serial port at COM3
    2021-09-20T14:43:00.683Z INFO Modem port is opened
    2021-09-20T14:43:04.568Z DEBUG modem <<  Zephyr OS build v2.6.0-rc1-ncs1  ***
    2021-09-20T14:43:04.696Z DEBUG modem << I: Starting bootloader
    2021-09-20T14:43:04.701Z DEBUG modem << I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    2021-09-20T14:43:04.711Z DEBUG modem << I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    2021-09-20T14:43:04.719Z DEBUG modem << I: Boot source: none
    2021-09-20T14:43:04.724Z DEBUG modem << I: Swap type: none
    2021-09-20T14:43:04.726Z DEBUG modem << I: Bootloader chainload address offset: 0x10000
    2021-09-20T14:43:04.729Z DEBUG modem << I: Jumping to the first image slot
    2021-09-20T14:43:04.906Z DEBUG modem << *** Booting Zephyr OS build v2.6.0-rc1-ncs1  ***
    2021-09-20T14:43:04.926Z DEBUG modem << Flash regionsDomainPermissions
    2021-09-20T14:43:04.936Z DEBUG modem << 00 03 0x00000 0x20000 Securerwxl
    2021-09-20T14:43:04.943Z DEBUG modem << 04 31 0x20000 0x100000 Non-Securerwxl
    2021-09-20T14:43:04.951Z DEBUG modem << Non-secure callable region 0 placed in flash region 3 with size 32.
    2021-09-20T14:43:04.970Z DEBUG modem << SRAM regionDomainPermissions
    2021-09-20T14:43:04.981Z DEBUG modem << 00 07 0x00000 0x10000 Securerwxl
    2021-09-20T14:43:04.986Z DEBUG modem << 08 31 0x10000 0x40000 Non-Securerwxl
    2021-09-20T14:43:04.989Z DEBUG modem << PeripheralDomainStatus
    2021-09-20T14:43:04.998Z DEBUG modem << 00 NRF_P0               Non-SecureOK
    2021-09-20T14:43:05.002Z DEBUG modem << 01 NRF_CLOCK            Non-SecureOK
    2021-09-20T14:43:05.005Z DEBUG modem << 02 NRF_RTC0             Non-SecureOK
    2021-09-20T14:43:05.010Z DEBUG modem << 03 NRF_RTC1             Non-SecureOK
    2021-09-20T14:43:05.013Z DEBUG modem << 04 NRF_NVMC             Non-SecureOK
    2021-09-20T14:43:05.021Z DEBUG modem << 05 NRF_UARTE1           Non-SecureOK
    2021-09-20T14:43:05.026Z DEBUG modem << 06 NRF_UARTE2           SecureSKIP
    2021-09-20T14:43:05.029Z DEBUG modem << 07 NRF_TWIM2            Non-SecureOK
    2021-09-20T14:43:05.032Z DEBUG modem << 08 NRF_SPIM3            Non-SecureOK
    2021-09-20T14:43:05.035Z DEBUG modem << 09 NRF_TIMER0           Non-SecureOK
    2021-09-20T14:43:05.036Z DEBUG modem << 10 NRF_TIMER1           Non-SecureOK
    2021-09-20T14:43:05.038Z DEBUG modem << 11 NRF_TIMER2           Non-SecureOK
    2021-09-20T14:43:05.046Z DEBUG modem << 12 NRF_SAADC            Non-SecureOK
    2021-09-20T14:43:05.050Z DEBUG modem << 13 NRF_PWM0             Non-SecureOK
    2021-09-20T14:43:05.058Z DEBUG modem << 14 NRF_PWM1             Non-SecureOK
    2021-09-20T14:43:05.062Z DEBUG modem << 15 NRF_PWM2             Non-SecureOK
    2021-09-20T14:43:05.065Z DEBUG modem << 16 NRF_PWM3             Non-SecureOK
    2021-09-20T14:43:05.067Z DEBUG modem << 17 NRF_WDT              Non-SecureOK
    2021-09-20T14:43:05.069Z DEBUG modem << 18 NRF_IPC              Non-SecureOK
    2021-09-20T14:43:05.078Z DEBUG modem << 19 NRF_VMC              Non-SecureOK
    2021-09-20T14:43:05.082Z DEBUG modem << 20 NRF_FPU              Non-SecureOK
    2021-09-20T14:43:05.085Z DEBUG modem << 21 NRF_EGU1             Non-SecureOK
    2021-09-20T14:43:05.091Z DEBUG modem << 22 NRF_EGU2             Non-SecureOK
    2021-09-20T14:43:05.092Z DEBUG modem << 23 NRF_DPPIC            Non-SecureOK
    2021-09-20T14:43:05.094Z DEBUG modem << 24 NRF_REGULATORS       Non-SecureOK
    2021-09-20T14:43:05.096Z DEBUG modem << 25 NRF_PDM              Non-SecureOK
    2021-09-20T14:43:05.099Z DEBUG modem << 26 NRF_I2S              Non-SecureOK
    2021-09-20T14:43:05.101Z DEBUG modem << 27 NRF_GPIOTE1          Non-SecureOK
    2021-09-20T14:43:05.103Z DEBUG modem << SPM: NS image at 0x20200
    2021-09-20T14:43:05.116Z DEBUG modem << SPM: NS MSP at 0x2001f660
    2021-09-20T14:43:05.120Z DEBUG modem << SPM: NS reset vector at 0x26039
    2021-09-20T14:43:05.122Z DEBUG modem << SPM: prepare to jump to Non-Secure image.
    2021-09-20T14:43:05.123Z DEBUG modem << *** Booting Zephyr OS build v2.6.0-rc1-ncs1  ***
    2021-09-20T14:43:05.125Z DEBUG modem << The AWS IoT sample started, version: v1.0.0
    2021-09-20T14:43:06.912Z DEBUG modem << LTE cell changed: Cell ID: 161454349, Tracking area: 21001
    2021-09-20T14:43:07.235Z DEBUG modem << RRC mode: Connected
    2021-09-20T14:43:09.567Z DEBUG modem << RRC mode: Idle
    2021-09-20T14:43:19.965Z DEBUG modem << RRC mode: Connected
    2021-09-20T14:43:23.746Z DEBUG modem << Network registration status: Connected - home network
    2021-09-20T14:43:23.752Z DEBUG modem << Next connection retry in 30 seconds
    2021-09-20T14:43:23.793Z DEBUG modem << PSM parameter update: TAU: 3600, Active time: -1
    2021-09-20T14:43:23.795Z DEBUG modem << AWS_IOT_EVT_CONNECTING
    2021-09-20T14:43:41.666Z DEBUG modem << E: getaddrinfo, error -11
    2021-09-20T14:43:41.707Z DEBUG modem << E: client_broker_init, error: -10
    2021-09-20T14:43:41.710Z DEBUG modem << AWS_IOT_EVT_CONNECTING
    2021-09-20T14:43:41.789Z DEBUG modem << DATE_TIME_OBTAINED_NTP
    2021-09-20T14:43:53.752Z DEBUG modem << Next connection retry in 30 seconds
    2021-09-20T14:43:53.788Z DEBUG modem << AWS_IOT_EVT_CONNECTING
    2021-09-20T14:43:59.333Z DEBUG modem << E: getaddrinfo, error -11
    2021-09-20T14:43:59.349Z DEBUG modem << E: client_broker_init, error: -10
    2021-09-20T14:43:59.354Z DEBUG modem << AWS_IOT_EVT_CONNECTING
    2021-09-20T14:44:23.753Z DEBUG modem << Next connection retry in 30 seconds
    2021-09-20T14:44:23.799Z DEBUG modem << AWS_IOT_EVT_CONNECTING
    2021-09-20T14:44:53.756Z DEBUG modem << W: connection_poll_start failed, error: -119
    2021-09-20T14:44:53.783Z DEBUG modem << aws_iot_connect, error: -119
    2021-09-20T14:44:53.809Z DEBUG modem << Next connection retry in 30 seconds
    2021-09-20T14:44:58.273Z DEBUG modem << E: getaddrinfo, error -11
    2021-09-20T14:44:58.304Z DEBUG modem << E: client_broker_init, error: -10
    2021-09-20T14:44:58.310Z DEBUG modem << AWS_IOT_EVT_CONNECTING
    2021-09-20T14:45:12.159Z DEBUG modem >> AT+CEREG?
    2021-09-20T14:45:12.173Z DEBUG modem << +CEREG: 5,1,"5209","099F990D",9,,,"11100000","00000110"
    2021-09-20T14:45:12.195Z DEBUG modem << OK
    2021-09-20T14:45:23.764Z DEBUG modem << Next connection retry in 30 seconds
    2021-09-20T14:45:23.795Z DEBUG modem << AWS_IOT_EVT_CONNECTING
    

    Are you able to assist with this problem or shall I open a new ticket for it?

    Regards,

    Jacek

  • It looks like you are not getting a connection to the internet, because getaddrinfo fails.

    1. what kind of SIM card are you using in the device?
    2. did you activate the SIM card?
    3. did you double check that you have sufficient data available on the SIM card?
  • 1. what kind of SIM card are you using in the device?     A Vodacom SIM card, enabled for NB-IoT in the Republic of South Africa.

    2. did you activate the SIM card?    Yes

    3. did you double check that you have sufficient data available on the SIM card?  Yes

    I was able to successfully run and test the application: asset_tracker , connecting successfully to the nrfcloud.com but I could not connect to www.example.com when I tried to run and test the sample: https_client.

    I was told that when I ran the sample: https_client, it  was unsuccessfully trying to establish a TCP connection via port 443 (which is the HTTPS port number) because server was denying the request with a TCP RST (reset of TCP connection). 

    On the other hand, when I ran the sample:asset_tracker, it was running via MQTTS on port 8883 and it did successfully connect to  nrfcloud.com.

    Could the problem that I am experiencing with connecting to the internet while running sample: AWS_IoT be similar to the one that I experienced with sample: https_client?

    Does the sample: AWS_IoT require establishing a TCP connection via port 443 (which is the HTTPS port number)?

Related