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

Failure connecting to example.com while running sample: https_client

After programming the sample to my nRF9160 DK, I opened the terminal emulator and I observed the following messages:

1. HTTPS client sample started

2. Provisioning certificate

3. Waiting for network..OK

4. Connecting to example.com

5. connect() failed, err 116

I am using the following:

1. nRFD9160 DK v0.8.2

2. Windows10 O.S. version:20H2, OS build:19042.631

3. nRF Connect v 3.7.0

4. nRF Connect SDK v 1.6.1

I attach the log file from the LTE Link Monitor below:

2021-09-04T19:59:12.600Z INFO Application data folder: C:\Users\Administrator\AppData\Roaming\nrfconnect\pc-nrfconnect-linkmonitor
2021-09-04T19:59:12.840Z DEBUG App pc-nrfconnect-linkmonitor v1.1.10 official
2021-09-04T19:59:12.840Z DEBUG App path: C:\Users\Administrator\.nrfconnect-apps\node_modules\pc-nrfconnect-linkmonitor
2021-09-04T19:59:12.840Z DEBUG nRFConnect 3.7.0, required by the app is (^3.6.0)
2021-09-04T19:59:12.840Z DEBUG nRFConnect path: C:\Users\Administrator\AppData\Local\Programs\nrfconnect\resources\app.asar
2021-09-04T19:59:12.841Z DEBUG HomeDir: C:\Users\Administrator
2021-09-04T19:59:12.841Z DEBUG TmpDir: C:\Users\ADMINI~1\AppData\Local\Temp
2021-09-04T19:59:13.059Z VERBOSE Could not fetch serial number for serial port at COM3
2021-09-04T19:59:20.249Z INFO Modem port is opened
2021-09-04T19:59:39.135Z DEBUG modem << *** Booting Zephyr OS build v2.6.0-rc1-ncs1  ***
2021-09-04T19:59:39.395Z DEBUG modem << Flash regionsDomainPermissions
2021-09-04T19:59:39.399Z DEBUG modem << 00 01 0x00000 0x10000 Securerwxl
2021-09-04T19:59:39.404Z DEBUG modem << 02 31 0x10000 0x100000 Non-Securerwxl
2021-09-04T19:59:39.408Z DEBUG modem << Non-secure callable region 0 placed in flash region 1 with size 32.
2021-09-04T19:59:39.411Z DEBUG modem << SRAM regionDomainPermissions
2021-09-04T19:59:39.413Z DEBUG modem << 00 07 0x00000 0x10000 Securerwxl
2021-09-04T19:59:39.415Z DEBUG modem << 08 31 0x10000 0x40000 Non-Securerwxl
2021-09-04T19:59:39.418Z DEBUG modem << PeripheralDomainStatus
2021-09-04T19:59:39.422Z DEBUG modem << 00 NRF_P0               Non-SecureOK
2021-09-04T19:59:39.424Z DEBUG modem << 01 NRF_CLOCK            Non-SecureOK
2021-09-04T19:59:39.426Z DEBUG modem << 02 NRF_RTC0             Non-SecureOK
2021-09-04T19:59:39.428Z DEBUG modem << 03 NRF_RTC1             Non-SecureOK
2021-09-04T19:59:39.430Z DEBUG modem << 04 NRF_NVMC             Non-SecureOK
2021-09-04T19:59:39.436Z DEBUG modem << 05 NRF_UARTE1           Non-SecureOK
2021-09-04T19:59:39.439Z DEBUG modem << 06 NRF_UARTE2           SecureSKIP
2021-09-04T19:59:39.441Z DEBUG modem << 07 NRF_TWIM2            Non-SecureOK
2021-09-04T19:59:39.443Z DEBUG modem << 08 NRF_SPIM3            Non-SecureOK
2021-09-04T19:59:39.445Z DEBUG modem << 09 NRF_TIMER0           Non-SecureOK
2021-09-04T19:59:39.447Z DEBUG modem << 10 NRF_TIMER1           Non-SecureOK
2021-09-04T19:59:39.465Z DEBUG modem << 11 NRF_TIMER2           Non-SecureOK
2021-09-04T19:59:39.469Z DEBUG modem << 12 NRF_SAADC            Non-SecureOK
2021-09-04T19:59:39.471Z DEBUG modem << 13 NRF_PWM0             Non-SecureOK
2021-09-04T19:59:39.473Z DEBUG modem << 14 NRF_PWM1             Non-SecureOK
2021-09-04T19:59:39.475Z DEBUG modem << 15 NRF_PWM2             Non-SecureOK
2021-09-04T19:59:39.476Z DEBUG modem << 16 NRF_PWM3             Non-SecureOK
2021-09-04T19:59:39.478Z DEBUG modem << 17 NRF_WDT              Non-SecureOK
2021-09-04T19:59:39.480Z DEBUG modem << 18 NRF_IPC              Non-SecureOK
2021-09-04T19:59:39.481Z DEBUG modem << 19 NRF_VMC              Non-SecureOK
2021-09-04T19:59:39.483Z DEBUG modem << 20 NRF_FPU              Non-SecureOK
2021-09-04T19:59:39.487Z DEBUG modem << 21 NRF_EGU1             Non-SecureOK
2021-09-04T19:59:39.489Z DEBUG modem << 22 NRF_EGU2             Non-SecureOK
2021-09-04T19:59:39.491Z DEBUG modem << 23 NRF_DPPIC            Non-SecureOK
2021-09-04T19:59:39.493Z DEBUG modem << 24 NRF_REGULATORS       Non-SecureOK
2021-09-04T19:59:39.494Z DEBUG modem << 25 NRF_PDM              Non-SecureOK
2021-09-04T19:59:39.496Z DEBUG modem << 26 NRF_I2S              Non-SecureOK
2021-09-04T19:59:39.498Z DEBUG modem << 27 NRF_GPIOTE1          Non-SecureOK
2021-09-04T19:59:39.500Z DEBUG modem << SPM: NS image at 0x10000
2021-09-04T19:59:39.503Z DEBUG modem << SPM: NS MSP at 0x20019fb8
2021-09-04T19:59:39.504Z DEBUG modem << SPM: NS reset vector at 0x12b65
2021-09-04T19:59:39.506Z DEBUG modem << SPM: prepare to jump to Non-Secure image.
2021-09-04T19:59:39.508Z DEBUG modem << *** Booting Zephyr OS build v2.6.0-rc1-ncs1  ***
2021-09-04T19:59:39.510Z DEBUG modem << HTTPS client sample started
2021-09-04T19:59:39.703Z DEBUG modem << Provisioning certificate
2021-09-04T20:09:50.981Z DEBUG modem << Waiting for network.. OK
2021-09-04T20:09:51.195Z DEBUG modem << Connecting to example.com
2021-09-04T20:09:51.360Z DEBUG modem << connect() failed, err: 116
2021-09-04T20:32:18.128Z DEBUG modem << *** Booting Zephyr OS build v2.6.0-rc1-ncs1  ***
2021-09-04T20:32:18.148Z DEBUG modem << Flash regionsDomainPermissions
2021-09-04T20:32:18.153Z DEBUG modem << 00 01 0x00000 0x10000 Securerwxl
2021-09-04T20:32:18.162Z DEBUG modem << 02 31 0x10000 0x100000 Non-Securerwxl
2021-09-04T20:32:18.179Z DEBUG modem << Non-secure callable region 0 placed in flash region 1 with size 32.
2021-09-04T20:32:18.197Z DEBUG modem << SRAM regionDomainPermissions
2021-09-04T20:32:18.201Z DEBUG modem << 00 07 0x00000 0x10000 Securerwxl
2021-09-04T20:32:18.206Z DEBUG modem << 08 31 0x10000 0x40000 Non-Securerwxl
2021-09-04T20:32:18.208Z DEBUG modem << PeripheralDomainStatus
2021-09-04T20:32:18.211Z DEBUG modem << 00 NRF_P0               Non-SecureOK
2021-09-04T20:32:18.225Z DEBUG modem << 01 NRF_CLOCK            Non-SecureOK
2021-09-04T20:32:18.228Z DEBUG modem << 02 NRF_RTC0             Non-SecureOK
2021-09-04T20:32:18.230Z DEBUG modem << 03 NRF_RTC1             Non-SecureOK
2021-09-04T20:32:18.232Z DEBUG modem << 04 NRF_NVMC             Non-SecureOK
2021-09-04T20:32:18.234Z DEBUG modem << 05 NRF_UARTE1           Non-SecureOK
2021-09-04T20:32:18.236Z DEBUG modem << 06 NRF_UARTE2           SecureSKIP
2021-09-04T20:32:18.238Z DEBUG modem << 07 NRF_TWIM2            Non-SecureOK
2021-09-04T20:32:18.241Z DEBUG modem << 08 NRF_SPIM3            Non-SecureOK
2021-09-04T20:32:18.243Z DEBUG modem << 09 NRF_TIMER0           Non-SecureOK
2021-09-04T20:32:18.265Z DEBUG modem << 10 NRF_TIMER1           Non-SecureOK
2021-09-04T20:32:18.267Z DEBUG modem << 11 NRF_TIMER2           Non-SecureOK
2021-09-04T20:32:18.269Z DEBUG modem << 12 NRF_SAADC            Non-SecureOK
2021-09-04T20:32:18.270Z DEBUG modem << 13 NRF_PWM0             Non-SecureOK
2021-09-04T20:32:18.272Z DEBUG modem << 14 NRF_PWM1             Non-SecureOK
2021-09-04T20:32:18.273Z DEBUG modem << 15 NRF_PWM2             Non-SecureOK
2021-09-04T20:32:18.274Z DEBUG modem << 16 NRF_PWM3             Non-SecureOK
2021-09-04T20:32:18.275Z DEBUG modem << 17 NRF_WDT              Non-SecureOK
2021-09-04T20:32:18.288Z DEBUG modem << 18 NRF_IPC              Non-SecureOK
2021-09-04T20:32:18.291Z DEBUG modem << 19 NRF_VMC              Non-SecureOK
2021-09-04T20:32:18.292Z DEBUG modem << 20 NRF_FPU              Non-SecureOK
2021-09-04T20:32:18.293Z DEBUG modem << 21 NRF_EGU1             Non-SecureOK
2021-09-04T20:32:18.294Z DEBUG modem << 22 NRF_EGU2             Non-SecureOK
2021-09-04T20:32:18.297Z DEBUG modem << 23 NRF_DPPIC            Non-SecureOK
2021-09-04T20:32:18.301Z DEBUG modem << 24 NRF_REGULATORS       Non-SecureOK
2021-09-04T20:32:18.311Z DEBUG modem << 25 NRF_PDM              Non-SecureOK
2021-09-04T20:32:18.313Z DEBUG modem << 26 NRF_I2S              Non-SecureOK
2021-09-04T20:32:18.314Z DEBUG modem << 27 NRF_GPIOTE1          Non-SecureOK
2021-09-04T20:32:18.316Z DEBUG modem << SPM: NS image at 0x10000
2021-09-04T20:32:18.319Z DEBUG modem << SPM: NS MSP at 0x20019fb8
2021-09-04T20:32:18.321Z DEBUG modem << SPM: NS reset vector at 0x12b65
2021-09-04T20:32:18.323Z DEBUG modem << SPM: prepare to jump to Non-Secure image.
2021-09-04T20:32:18.332Z DEBUG modem << *** Booting Zephyr OS build v2.6.0-rc1-ncs1  ***
2021-09-04T20:32:18.334Z DEBUG modem << HTTPS client sample started
2021-09-04T20:32:18.608Z DEBUG modem << Provisioning certificate
2021-09-04T20:44:24.909Z DEBUG modem << Waiting for network.. OK
2021-09-04T20:44:25.195Z DEBUG modem << Connecting to example.com
2021-09-04T20:44:25.389Z DEBUG modem << connect() failed, err: 116

  • Hello Jacek,

    Jacek Majda said:
    This time I made sure to wait until I saw the error message: "connect() failed , err 116" on the LTE Link Monitor before I clicked "Stop Capture" on the Trace Collector app.

    Thank you! Now I can see more in the trace. Unfortunately, it looks like that there are some wired things going on in the modem as CPU overloads and watchdog resets are reported at irregular intervals. This might explain why a server connection cannot be established and why you are not able to send a SMS, as described in your case #276070.

    I would suggest that we wait for your new DK. If it turns out that the issues you are facing remain, we continue the investigation. Does this sound ok to you?

    Regards,

    Markus

  • Hello Marcus,

    Earlier today I received the new nRF9160 DK v1.0.1 and I immediately tested it with the application: asset_tracking and it worked OK. I was able to connect to NB-IoT and to nRF Connect for Cloud and I was able to see on the nRF Connect for Cloud  the changes in orientation status (as indicated by an arrow's direction) each time when I toggled the switch1 on my nRF9160 DK v1.0.1.

    I then tried to run sample: https_client and sample: sms on my new nRF9160 DK v1.0.1 but unfortunately, the problems reported by me in the past are still present with this new DK v1.0.1.

    I attach the file that was created during the process of collecting a modem trace while the sample: https_client was running on my new nRF9160 DK v1.0.1. 

    trace-2021-09-10T16-24-29.637Z.bin

    I made sure that I waited till I saw the error message: "connet() failed , err 116" on the LTE Link Monitor before I clicked "Stop Capture" on the Trace Collector app.

    Regards,

    Jacek

  • Hello Jacek,

    Jacek Majda said:
    Earlier today I received the new nRF9160 DK v1.0.1 and I immediately tested it with the application: asset_tracking and it worked OK. I was able to connect to NB-IoT and to nRF Connect for Cloud and I was able to see on the nRF Connect for Cloud  the changes in orientation status (as indicated by an arrow's direction) each time when I toggled the switch1 on my nRF9160 DK v1.0.1.

    Thanks for your immediate feedback and trying out the new nRF9160 DK right away.

    Jacek Majda said:
    I then tried to run sample: https_client and sample: sms on my new nRF9160 DK v1.0.1 but unfortunately, the problems reported by me in the past are still present with this new DK v1.0.1.

    There are no error messages in the modem trace this time, which is good. But I can see that the modem has to send an “ATTACH REQUEST” several time before it receives “ATTACH ACCEPTED” from the network, which I’m not quite sure if this is supposed to be like this.

    Which modem firmware did you use when recording this trace? Would you mind testing with modem firmware 1.3.0 and provide me with a modem trace, if not already done?

    Regards,

    Markus

  • Hello Markus,

    It appears that I already used modem firmware  1.3.0 when I was recording the last trace. However, to be dead sure, I did repeat the upgrade of the modem firmware this morning, using the mfw_nrf9160_1.3.0 zip file.

    I then run again the sample: AT_Client, successfully.  I noticed that it took about 25 seconds from the time when the modem was switched ON by the command: AT+CFUN=1, before the connection to the NB-IoT network was made, as confirmed by the response to the  AT+CEREG? command, in the form of: +CEREG; 0,1,"5209","099F990D",9

     Then I run the sample: Asset_Tracker and it worked OK. I was able to connect to the NB-IoT network and to the nrf Connect for Cloud.

    I then run the sample: sms and the sample: https_client and both attempts were unsuccessful. The same error messages as reported by my in the past, appeared again today.

    I attach the latest file created today in the process of capturing the modem trace, while running sample: https_client.  I made sure that I saw the error message: "connect() failed, err 116" on the LTE Link Monitor, before I clicked "Stop Capture" on the Trace Collector app.

    trace-2021-09-13T12-21-07.535Z.bin

    Regards,

    Jacek

  • Jacek Majda said:
    I attach the latest file created today in the process of capturing the modem trace, while running sample: https_client.  I made sure that I saw the error message: "connect() failed, err 116" on the LTE Link Monitor, before I clicked "Stop Capture" on the Trace Collector app.

    Thanks a lot, Jacek! Analysing the trace with the right database on my side ;-), I still can observe FATAL_ASSERT and FATAL_PANIC messages. I’m not sure if this is normal.

    I have to check this with our modem team and gather some input from them. I will come back to you as soon as possible.

    Regards,

    Markus

Related