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 Marcus,

    I have resolved the problem which you didn't like in my log file from AT_client sample on line: Debug modem<<+CEREG: 5,2,"5209",...by adding the following line to the prj.conf file for this sample: CONFIG_LTE_NETWORK_MODE_NBIOT=y  (to set the modem to the NB-IoT mode).

    I attach the log file for this sample, that was created after implementing this change to the prj.conf file, which shows new data on this previously problematic line, namely: Debug modem<<+CEREG:5,1,"5209",..., indicating that now the registration was successful.

    2021-09-07T13:24:37.774Z INFO Application data folder: C:\Users\Administrator\AppData\Roaming\nrfconnect\pc-nrfconnect-linkmonitor
    2021-09-07T13:24:38.062Z DEBUG App pc-nrfconnect-linkmonitor v1.1.10 official
    2021-09-07T13:24:38.062Z DEBUG App path: C:\Users\Administrator\.nrfconnect-apps\node_modules\pc-nrfconnect-linkmonitor
    2021-09-07T13:24:38.062Z DEBUG nRFConnect 3.7.0, required by the app is (^3.6.0)
    2021-09-07T13:24:38.062Z DEBUG nRFConnect path: C:\Users\Administrator\AppData\Local\Programs\nrfconnect\resources\app.asar
    2021-09-07T13:24:38.063Z DEBUG HomeDir: C:\Users\Administrator
    2021-09-07T13:24:38.063Z DEBUG TmpDir: C:\Users\ADMINI~1\AppData\Local\Temp
    2021-09-07T13:24:38.270Z VERBOSE Could not fetch serial number for serial port at COM3
    2021-09-07T13:24:44.963Z INFO Modem port is opened
    2021-09-07T13:24:44.973Z DEBUG modem >> AT+CFUN?
    2021-09-07T13:24:45.162Z DEBUG modem << +CFUN: 0
    2021-09-07T13:24:45.166Z DEBUG modem << OK
    2021-09-07T13:27:28.814Z DEBUG modem >> AT+CFUN=1
    2021-09-07T13:27:28.858Z DEBUG modem << OK
    2021-09-07T13:27:54.228Z DEBUG modem >> AT+CFUN?
    2021-09-07T13:27:54.234Z DEBUG modem << +CFUN: 1
    2021-09-07T13:27:54.285Z DEBUG modem << OK
    2021-09-07T13:27:54.293Z DEBUG modem >> AT+CGSN=1
    2021-09-07T13:27:54.305Z DEBUG modem << +CGSN: "352656100048068"
    2021-09-07T13:27:54.310Z DEBUG modem << OK
    2021-09-07T13:27:54.317Z DEBUG modem >> AT+CGMI
    2021-09-07T13:27:54.343Z DEBUG modem << Nordic Semiconductor ASA
    2021-09-07T13:27:54.347Z DEBUG modem << OK
    2021-09-07T13:27:54.354Z DEBUG modem >> AT+CGMM
    2021-09-07T13:27:54.363Z DEBUG modem << nRFFFFFFFFF-SICA
    2021-09-07T13:27:54.367Z DEBUG modem << OK
    2021-09-07T13:27:54.371Z DEBUG modem >> AT+CGMR
    2021-09-07T13:27:54.387Z DEBUG modem << mfw_nrf9160_1.2.3
    2021-09-07T13:27:54.391Z DEBUG modem << OK
    2021-09-07T13:27:54.395Z INFO Nordic Semiconductor ASA nRFFFFFFFFF-SICA [mfw_nrf9160_1.2.3] SerNr: 352656100048068
    2021-09-07T13:27:54.396Z DEBUG modem >> AT+CEMODE?
    2021-09-07T13:27:54.408Z DEBUG modem << +CEMODE: 0
    2021-09-07T13:27:54.413Z DEBUG modem << OK
    2021-09-07T13:27:54.431Z DEBUG modem >> AT%XCBAND=?
    2021-09-07T13:27:54.449Z DEBUG modem << %XCBAND: (1,2,3,4,5,8,12,13,17,19,20,25,26,28,66)
    2021-09-07T13:27:54.454Z DEBUG modem << OK
    2021-09-07T13:27:54.474Z DEBUG modem >> AT+CMEE?
    2021-09-07T13:27:54.484Z DEBUG modem << +CMEE: 0
    2021-09-07T13:27:54.488Z DEBUG modem << OK
    2021-09-07T13:27:54.493Z DEBUG modem >> AT+CMEE=1
    2021-09-07T13:27:54.502Z DEBUG modem << OK
    2021-09-07T13:27:54.508Z DEBUG modem >> AT+CNEC?
    2021-09-07T13:27:54.515Z DEBUG modem << +CNEC: 0
    2021-09-07T13:27:54.517Z DEBUG modem << OK
    2021-09-07T13:27:54.538Z DEBUG modem >> AT+CNEC=24
    2021-09-07T13:27:54.545Z DEBUG modem << OK
    2021-09-07T13:27:54.551Z DEBUG modem >> AT+CGEREP?
    2021-09-07T13:27:54.556Z DEBUG modem << +CGEREP: 0,0
    2021-09-07T13:27:54.568Z DEBUG modem << OK
    2021-09-07T13:27:54.573Z DEBUG modem >> AT+CGDCONT?
    2021-09-07T13:27:54.586Z DEBUG modem << +CGDCONT: 0,"IP","ltedefault.vodacom.za","10.170.0.72",0,0
    2021-09-07T13:27:54.590Z DEBUG modem << OK
    2021-09-07T13:27:54.607Z DEBUG modem >> AT+CGACT?
    2021-09-07T13:27:54.618Z DEBUG modem << +CGACT: 0,1
    2021-09-07T13:27:54.622Z DEBUG modem << OK
    2021-09-07T13:27:54.637Z DEBUG modem >> AT+CGEREP=1
    2021-09-07T13:27:54.645Z DEBUG modem << OK
    2021-09-07T13:27:54.650Z DEBUG modem >> AT+CIND=1,1,1
    2021-09-07T13:27:54.655Z DEBUG modem << OK
    2021-09-07T13:27:54.658Z DEBUG modem >> AT+CEREG=5
    2021-09-07T13:27:54.665Z DEBUG modem << OK
    2021-09-07T13:27:54.669Z DEBUG modem >> AT+CEREG?
    2021-09-07T13:27:54.685Z DEBUG modem << +CEREG: 5,1,"5209","099F990D",9,,,"11100000","00000110"
    2021-09-07T13:27:54.690Z DEBUG modem << OK
    2021-09-07T13:27:54.708Z DEBUG modem >> AT+COPS=3,2
    2021-09-07T13:27:54.714Z DEBUG modem << OK
    2021-09-07T13:27:54.718Z DEBUG modem >> AT+COPS?
    2021-09-07T13:27:54.728Z DEBUG modem << +COPS: 0,2,"65501",9
    2021-09-07T13:27:54.733Z DEBUG modem << OK
    2021-09-07T13:27:54.748Z DEBUG modem >> AT%XCBAND
    2021-09-07T13:27:54.756Z DEBUG modem << %XCBAND: 8
    2021-09-07T13:27:54.758Z DEBUG modem << OK
    2021-09-07T13:27:54.773Z DEBUG modem >> AT+CGDCONT?
    2021-09-07T13:27:54.788Z DEBUG modem << +CGDCONT: 0,"IP","ltedefault.vodacom.za","10.170.0.72",0,0
    2021-09-07T13:27:54.791Z DEBUG modem << OK
    2021-09-07T13:27:54.809Z DEBUG modem >> AT+CGACT?
    2021-09-07T13:27:54.816Z DEBUG modem << +CGACT: 0,1
    2021-09-07T13:27:54.826Z DEBUG modem << OK
    2021-09-07T13:27:54.834Z DEBUG modem >> AT%CESQ=1
    2021-09-07T13:27:54.839Z DEBUG modem << OK
    2021-09-07T13:27:54.849Z DEBUG modem >> AT+CESQ
    2021-09-07T13:27:54.855Z DEBUG modem << %CESQ: 79,3,30,4
    2021-09-07T13:27:54.859Z DEBUG modem << 
    2021-09-07T13:27:54.864Z DEBUG modem << +CESQ: 99,99,255,255,30,79
    2021-09-07T13:27:54.866Z DEBUG modem << OK
    2021-09-07T13:27:54.882Z DEBUG modem >> AT%XSIM=1
    2021-09-07T13:27:54.891Z DEBUG modem << OK
    2021-09-07T13:27:54.895Z DEBUG modem >> AT%XSIM?
    2021-09-07T13:27:54.905Z DEBUG modem << %XSIM: 1
    2021-09-07T13:27:54.909Z DEBUG modem << OK
    2021-09-07T13:27:54.924Z DEBUG modem >> AT+CPIN?
    2021-09-07T13:27:54.931Z DEBUG modem << +CPIN: READY
    2021-09-07T13:27:54.936Z DEBUG modem << OK
    2021-09-07T13:27:54.948Z DEBUG modem >> AT+CPINR="SIM PIN"
    2021-09-07T13:27:54.967Z DEBUG modem << +CPINR: "SIM PIN",3
    2021-09-07T13:27:54.971Z DEBUG modem << OK
    2021-09-07T13:27:54.989Z DEBUG modem >> AT+CIMI
    2021-09-07T13:27:54.997Z DEBUG modem << 655010470498134
    2021-09-07T13:27:55.001Z DEBUG modem << OK
    2021-09-07T13:27:55.003Z INFO IMSIdentity: 655010470498134
    2021-09-07T13:28:19.322Z DEBUG modem << %CESQ: 79,3,25,3
    2021-09-07T13:28:21.368Z DEBUG modem << %CESQ: 79,3,30,4
    2021-09-07T13:28:27.096Z DEBUG modem >> AT+CFUN?
    2021-09-07T13:28:27.102Z DEBUG modem << +CFUN: 1
    2021-09-07T13:28:27.109Z DEBUG modem << OK
    2021-09-07T13:28:27.110Z DEBUG modem >> AT+CGSN=1
    2021-09-07T13:28:27.121Z DEBUG modem << +CGSN: "352656100048068"
    2021-09-07T13:28:27.125Z DEBUG modem << OK
    2021-09-07T13:28:27.130Z DEBUG modem >> AT+CGMI
    2021-09-07T13:28:27.141Z DEBUG modem << Nordic Semiconductor ASA
    2021-09-07T13:28:27.145Z DEBUG modem << OK
    2021-09-07T13:28:27.149Z DEBUG modem >> AT+CGMM
    2021-09-07T13:28:27.162Z DEBUG modem << nRFFFFFFFFF-SICA
    2021-09-07T13:28:27.165Z DEBUG modem << OK
    2021-09-07T13:28:27.168Z DEBUG modem >> AT+CGMR
    2021-09-07T13:28:27.183Z DEBUG modem << mfw_nrf9160_1.2.3
    2021-09-07T13:28:27.186Z DEBUG modem << OK
    2021-09-07T13:28:27.188Z INFO Nordic Semiconductor ASA nRFFFFFFFFF-SICA [mfw_nrf9160_1.2.3] SerNr: 352656100048068
    2021-09-07T13:28:27.190Z DEBUG modem >> AT+CEMODE?
    2021-09-07T13:28:27.202Z DEBUG modem << +CEMODE: 0
    2021-09-07T13:28:27.207Z DEBUG modem << 
    2021-09-07T13:28:27.208Z DEBUG modem << OK
    2021-09-07T13:28:27.220Z DEBUG modem >> AT%XCBAND=?
    2021-09-07T13:28:27.230Z DEBUG modem << %XCBAND: (1,2,3,4,5,8,12,13,17,19,20,25,26,28,66)
    2021-09-07T13:28:27.233Z DEBUG modem << OK
    2021-09-07T13:28:27.244Z DEBUG modem >> AT+CMEE?
    2021-09-07T13:28:27.251Z DEBUG modem << +CMEE: 1
    2021-09-07T13:28:27.254Z DEBUG modem << OK
    2021-09-07T13:28:27.263Z DEBUG modem >> AT+CNEC?
    2021-09-07T13:28:27.270Z DEBUG modem << +CNEC: 24
    2021-09-07T13:28:27.272Z DEBUG modem << OK
    2021-09-07T13:28:27.274Z DEBUG modem >> AT+CGEREP?
    2021-09-07T13:28:27.284Z DEBUG modem << +CGEREP: 1,0
    2021-09-07T13:28:27.287Z DEBUG modem << OK
    2021-09-07T13:28:27.290Z DEBUG modem >> AT+CIND=1,1,1
    2021-09-07T13:28:27.294Z DEBUG modem << OK
    2021-09-07T13:28:27.303Z DEBUG modem >> AT+CEREG=5
    2021-09-07T13:28:27.310Z DEBUG modem << OK
    2021-09-07T13:28:27.314Z DEBUG modem >> AT+CEREG?
    2021-09-07T13:28:27.326Z DEBUG modem << +CEREG: 5,1,"5209","099F990D",9,,,"11100000","00000110"
    2021-09-07T13:28:27.328Z DEBUG modem << OK
    2021-09-07T13:28:27.334Z DEBUG modem >> AT+COPS=3,2
    2021-09-07T13:28:27.343Z DEBUG modem << OK
    2021-09-07T13:28:27.349Z DEBUG modem >> AT+COPS?
    2021-09-07T13:28:27.363Z DEBUG modem << +COPS: 0,2,"65501",9
    2021-09-07T13:28:27.366Z DEBUG modem << OK
    2021-09-07T13:28:27.373Z DEBUG modem >> AT%XCBAND
    2021-09-07T13:28:27.385Z DEBUG modem << %XCBAND: 8
    2021-09-07T13:28:27.389Z DEBUG modem << OK
    2021-09-07T13:28:27.396Z DEBUG modem >> AT+CGDCONT?
    2021-09-07T13:28:27.408Z DEBUG modem << +CGDCONT: 0,"IP","ltedefault.vodacom.za","10.170.0.72",0,0
    2021-09-07T13:28:27.410Z DEBUG modem << OK
    2021-09-07T13:28:27.423Z DEBUG modem >> AT+CGACT?
    2021-09-07T13:28:27.431Z DEBUG modem << +CGACT: 0,1
    2021-09-07T13:28:27.433Z DEBUG modem << OK
    2021-09-07T13:28:27.443Z DEBUG modem >> AT%CESQ=1
    2021-09-07T13:28:27.451Z DEBUG modem << OK
    2021-09-07T13:28:27.454Z DEBUG modem >> AT+CESQ
    2021-09-07T13:28:27.465Z DEBUG modem << +CESQ: 99,99,255,255,31,79
    2021-09-07T13:28:27.468Z DEBUG modem << OK
    2021-09-07T13:28:27.474Z DEBUG modem >> AT%XSIM=1
    2021-09-07T13:28:27.516Z DEBUG modem << OK
    2021-09-07T13:28:27.521Z DEBUG modem >> AT%XSIM?
    2021-09-07T13:28:27.534Z DEBUG modem << %XSIM: 1
    2021-09-07T13:28:27.536Z DEBUG modem << OK
    2021-09-07T13:28:27.547Z DEBUG modem >> AT+CPIN?
    2021-09-07T13:28:27.555Z DEBUG modem << +CPIN: READY
    2021-09-07T13:28:27.557Z DEBUG modem << OK
    2021-09-07T13:28:27.571Z DEBUG modem >> AT+CPINR="SIM PIN"
    2021-09-07T13:28:27.588Z DEBUG modem << +CPINR: "SIM PIN",3
    2021-09-07T13:28:27.590Z DEBUG modem << OK
    2021-09-07T13:28:27.595Z DEBUG modem >> AT+CIMI
    2021-09-07T13:28:27.606Z DEBUG modem << 655010470498134
    2021-09-07T13:28:27.609Z DEBUG modem << OK
    2021-09-07T13:28:27.611Z INFO IMSIdentity: 655010470498134
    2021-09-07T13:28:33.091Z DEBUG modem << %CESQ: 81,4,24,3
    2021-09-07T13:28:40.902Z DEBUG modem << %CESQ: 80,4,31,4
    2021-09-07T13:29:11.625Z DEBUG modem << %CESQ: 80,4,20,2
    2021-09-07T13:29:21.860Z DEBUG modem << %CESQ: 78,3,29,4
    2021-09-07T13:30:54.019Z DEBUG modem << %CESQ: 79,3,22,3
    2021-09-07T13:31:04.255Z DEBUG modem << %CESQ: 80,4,29,4
    2021-09-07T13:31:17.576Z DEBUG modem >> AT%XOPERID
    2021-09-07T13:31:17.600Z DEBUG modem << %XOPERID: 0
    2021-09-07T13:31:17.606Z DEBUG modem << OK
    2021-09-07T13:32:12.954Z DEBUG modem >> AT%XMONITOR
    2021-09-07T13:32:12.974Z DEBUG modem << %XMONITOR: 1,"","","65501","5209",9,8,"099F990D",102,3558,79,48,"","11100000","00000110","01001001"
    2021-09-07T13:32:12.977Z DEBUG modem << OK
    2021-09-07T13:32:41.144Z DEBUG modem >> AT%XTEMP?
    2021-09-07T13:32:41.166Z DEBUG modem << %XTEMP: 26
    2021-09-07T13:32:41.169Z DEBUG modem << OK
    2021-09-07T13:33:11.221Z DEBUG modem >> AT%CMNG=1
    2021-09-07T13:33:11.246Z DEBUG modem << %CMNG: 42,0,"0000000000000000000000000000000000000000000000000000000000000000"
    2021-09-07T13:33:11.269Z DEBUG modem << %CMNG: 411,0,"0000000000000000000000000000000000000000000000000000000000000000"
    2021-09-07T13:33:11.277Z DEBUG modem << %CMNG: 412,0,"0000000000000000000000000000000000000000000000000000000000000000"
    2021-09-07T13:33:11.283Z DEBUG modem << %CMNG: 16842753,0,"0000000000000000000000000000000000000000000000000000000000000000"
    2021-09-07T13:33:11.295Z DEBUG modem << %CMNG: 16842753,1,"0101010101010101010101010101010101010101010101010101010101010101"
    2021-09-07T13:33:11.306Z DEBUG modem << %CMNG: 16842753,2,"0202020202020202020202020202020202020202020202020202020202020202"
    2021-09-07T13:33:11.310Z DEBUG modem << OK
    

    As I wanted to use AT commands with the https_client sample  to verify that the modem is ON and that the modem is set to the NBIoT mode, I added these two lines to the prj.conf file for https_client sample:

    CONFIG_AT_HOST_LIBRARY=y

    CONFIG_UART_INTERRUPT_DRIVEN=y

    I attach below the copy of the modified prj.conf file for the sample https_client:

    CONFIG_NRF_MODEM_LIB=y
    CONFIG_NRF_MODEM_LIB_SYS_INIT=n
    
    CONFIG_NETWORKING=y
    CONFIG_NET_SOCKETS=y
    CONFIG_NET_SOCKETS_POSIX_NAMES=y
    CONFIG_NET_NATIVE=n
    
    CONFIG_HEAP_MEM_POOL_SIZE=4096
    CONFIG_MAIN_STACK_SIZE=4096
    
    CONFIG_MODEM_KEY_MGMT=y
    CONFIG_LTE_LINK_CONTROL=y
    CONFIG_LTE_AUTO_INIT_AND_CONNECT=n
    CONFIG_LTE_NETWORK_MODE_NBIOT=y
    
    CONFIG_NEWLIB_LIBC=y
    CONFIG_AT_HOST_LIBRARY=y
    CONFIG_UART_INTERRUPT_DRIVEN=y
    

    Subsequently, I run the https_client sample again and the same error message: "connect() failed, err 116" appeared.

    I then used the AT command  AT+CFUN?  to confirm that the modem was on. And it was.

    And then I used the AT command  AT%XSYSTEMMODE?  to confirm that the modem was set to the NBIoT mode. And it was.

    I attach below the log file for https_client sample that shows what I have described above.

    2021-09-07T15:09:27.441Z INFO Application data folder: C:\Users\Administrator\AppData\Roaming\nrfconnect\pc-nrfconnect-linkmonitor
    2021-09-07T15:09:27.799Z DEBUG App pc-nrfconnect-linkmonitor v1.1.10 official
    2021-09-07T15:09:27.800Z DEBUG App path: C:\Users\Administrator\.nrfconnect-apps\node_modules\pc-nrfconnect-linkmonitor
    2021-09-07T15:09:27.800Z DEBUG nRFConnect 3.7.0, required by the app is (^3.6.0)
    2021-09-07T15:09:27.800Z DEBUG nRFConnect path: C:\Users\Administrator\AppData\Local\Programs\nrfconnect\resources\app.asar
    2021-09-07T15:09:27.801Z DEBUG HomeDir: C:\Users\Administrator
    2021-09-07T15:09:27.801Z DEBUG TmpDir: C:\Users\ADMINI~1\AppData\Local\Temp
    2021-09-07T15:09:28.094Z VERBOSE Could not fetch serial number for serial port at COM3
    2021-09-07T15:09:33.631Z INFO Modem port is opened
    2021-09-07T15:09:33.667Z DEBUG modem >> AT+CFUN?
    2021-09-07T15:09:33.921Z DEBUG modem << +CFUN: 1
    2021-09-07T15:09:33.927Z DEBUG modem << OK
    2021-09-07T15:09:33.956Z DEBUG modem >> AT+CGSN=1
    2021-09-07T15:09:33.967Z DEBUG modem << +CGSN: "352656100048068"
    2021-09-07T15:09:33.972Z DEBUG modem << OK
    2021-09-07T15:09:33.978Z DEBUG modem >> AT+CGMI
    2021-09-07T15:09:33.994Z DEBUG modem << Nordic Semiconductor ASA
    2021-09-07T15:09:34.012Z DEBUG modem << OK
    2021-09-07T15:09:34.020Z DEBUG modem >> AT+CGMM
    2021-09-07T15:09:34.031Z DEBUG modem << nRFFFFFFFFF-SICA
    2021-09-07T15:09:34.034Z DEBUG modem << OK
    2021-09-07T15:09:34.038Z DEBUG modem >> AT+CGMR
    2021-09-07T15:09:34.048Z DEBUG modem << mfw_nrf9160_1.2.3
    2021-09-07T15:09:34.052Z DEBUG modem << OK
    2021-09-07T15:09:34.053Z INFO Nordic Semiconductor ASA nRFFFFFFFFF-SICA [mfw_nrf9160_1.2.3] SerNr: 352656100048068
    2021-09-07T15:09:34.056Z DEBUG modem >> AT+CEMODE?
    2021-09-07T15:09:34.068Z DEBUG modem << +CEMODE: 0
    2021-09-07T15:09:34.071Z DEBUG modem << OK
    2021-09-07T15:09:34.099Z DEBUG modem >> AT%XCBAND=?
    2021-09-07T15:09:34.115Z DEBUG modem << %XCBAND: (1,2,3,4,5,8,12,13,17,19,20,25,26,28,66)
    2021-09-07T15:09:34.118Z DEBUG modem << OK
    2021-09-07T15:09:34.135Z DEBUG modem >> AT+CMEE?
    2021-09-07T15:09:34.149Z DEBUG modem << +CMEE: 0
    2021-09-07T15:09:34.156Z DEBUG modem << OK
    2021-09-07T15:09:34.170Z DEBUG modem >> AT+CMEE=1
    2021-09-07T15:09:34.177Z DEBUG modem << OK
    2021-09-07T15:09:34.186Z DEBUG modem >> AT+CNEC?
    2021-09-07T15:09:34.196Z DEBUG modem << +CNEC: 0
    2021-09-07T15:09:34.208Z DEBUG modem << OK
    2021-09-07T15:09:34.213Z DEBUG modem >> AT+CNEC=24
    2021-09-07T15:09:34.218Z DEBUG modem << OK
    2021-09-07T15:09:34.227Z DEBUG modem >> AT+CGEREP?
    2021-09-07T15:09:34.234Z DEBUG modem << +CGEREP: 0,0
    2021-09-07T15:09:34.237Z DEBUG modem << 
    2021-09-07T15:09:34.238Z DEBUG modem << OK
    2021-09-07T15:09:34.254Z DEBUG modem >> AT+CGDCONT?
    2021-09-07T15:09:34.268Z DEBUG modem << +CGDCONT: 0,"IP","ltedefault.vodacom.za","10.170.0.90",0,0
    2021-09-07T15:09:34.271Z DEBUG modem << OK
    2021-09-07T15:09:34.290Z DEBUG modem >> AT+CGACT?
    2021-09-07T15:09:34.300Z DEBUG modem << +CGACT: 0,1
    2021-09-07T15:09:34.304Z DEBUG modem << OK
    2021-09-07T15:09:34.316Z DEBUG modem >> AT+CGEREP=1
    2021-09-07T15:09:34.331Z DEBUG modem << OK
    2021-09-07T15:09:34.336Z DEBUG modem >> AT+CIND=1,1,1
    2021-09-07T15:09:34.351Z DEBUG modem << OK
    2021-09-07T15:09:34.358Z DEBUG modem >> AT+CEREG=5
    2021-09-07T15:09:34.370Z DEBUG modem << OK
    2021-09-07T15:09:34.373Z DEBUG modem >> AT+CEREG?
    2021-09-07T15:09:34.388Z DEBUG modem << +CEREG: 5,1,"5209","099F990D",9,,,"11100000","00000110"
    2021-09-07T15:09:34.392Z DEBUG modem << OK
    2021-09-07T15:09:34.410Z DEBUG modem >> AT+COPS=3,2
    2021-09-07T15:09:34.417Z DEBUG modem << OK
    2021-09-07T15:09:34.420Z DEBUG modem >> AT+COPS?
    2021-09-07T15:09:34.431Z DEBUG modem << +COPS: 0,2,"65501",9
    2021-09-07T15:09:34.435Z DEBUG modem << OK
    2021-09-07T15:09:34.454Z DEBUG modem >> AT%XCBAND
    2021-09-07T15:09:34.466Z DEBUG modem << %XCBAND: 8
    2021-09-07T15:09:34.474Z DEBUG modem << 
    2021-09-07T15:09:34.475Z DEBUG modem << OK
    2021-09-07T15:09:34.490Z DEBUG modem >> AT+CGDCONT?
    2021-09-07T15:09:34.510Z DEBUG modem << +CGDCONT: 0,"IP","ltedefault.vodacom.za","10.170.0.90",0,0
    2021-09-07T15:09:34.512Z DEBUG modem << OK
    2021-09-07T15:09:34.517Z DEBUG modem >> AT+CGACT?
    2021-09-07T15:09:34.531Z DEBUG modem << +CGACT: 0,1
    2021-09-07T15:09:34.533Z DEBUG modem << OK
    2021-09-07T15:09:34.538Z DEBUG modem >> AT%CESQ=1
    2021-09-07T15:09:34.549Z DEBUG modem << OK
    2021-09-07T15:09:34.554Z DEBUG modem >> AT+CESQ
    2021-09-07T15:09:34.561Z DEBUG modem << +CESQ: 99,99,255,255,31,73
    2021-09-07T15:09:34.564Z DEBUG modem << OK
    2021-09-07T15:09:34.578Z DEBUG modem >> AT%XSIM=1
    2021-09-07T15:09:34.591Z DEBUG modem << OK
    2021-09-07T15:09:34.594Z DEBUG modem >> AT%XSIM?
    2021-09-07T15:09:34.600Z DEBUG modem << %XSIM: 1
    2021-09-07T15:09:34.618Z DEBUG modem << OK
    2021-09-07T15:09:34.635Z DEBUG modem >> AT+CPIN?
    2021-09-07T15:09:34.649Z DEBUG modem << +CPIN: READY
    2021-09-07T15:09:34.653Z DEBUG modem << OK
    2021-09-07T15:09:34.660Z DEBUG modem >> AT+CPINR="SIM PIN"
    2021-09-07T15:09:34.676Z DEBUG modem << +CPINR: "SIM PIN",3
    2021-09-07T15:09:34.678Z DEBUG modem << OK
    2021-09-07T15:09:34.692Z DEBUG modem >> AT+CIMI
    2021-09-07T15:09:34.699Z DEBUG modem << 655010470498134
    2021-09-07T15:09:34.701Z DEBUG modem << 
    2021-09-07T15:09:34.703Z DEBUG modem << OK
    2021-09-07T15:09:34.706Z INFO IMSIdentity: 655010470498134
    2021-09-07T15:09:35.132Z DEBUG modem << Connecting to example.com
    2021-09-07T15:09:35.397Z DEBUG modem << connect() failed, err: 116
    2021-09-07T15:09:54.236Z DEBUG modem >> AT+CFUN?
    2021-09-07T15:09:54.243Z DEBUG modem << +CFUN: 1
    2021-09-07T15:09:54.249Z DEBUG modem << OK
    2021-09-07T15:09:54.251Z DEBUG modem >> AT+CGSN=1
    2021-09-07T15:09:54.265Z DEBUG modem << +CGSN: "352656100048068"
    2021-09-07T15:09:54.267Z DEBUG modem << OK
    2021-09-07T15:09:54.271Z DEBUG modem >> AT+CGMI
    2021-09-07T15:09:54.281Z DEBUG modem << Nordic Semiconductor ASA
    2021-09-07T15:09:54.284Z DEBUG modem << OK
    2021-09-07T15:09:54.289Z DEBUG modem >> AT+CGMM
    2021-09-07T15:09:54.302Z DEBUG modem << nRFFFFFFFFF-SICA
    2021-09-07T15:09:54.305Z DEBUG modem << OK
    2021-09-07T15:09:54.310Z DEBUG modem >> AT+CGMR
    2021-09-07T15:09:54.322Z DEBUG modem << mfw_nrf9160_1.2.3
    2021-09-07T15:09:54.324Z DEBUG modem << OK
    2021-09-07T15:09:54.326Z INFO Nordic Semiconductor ASA nRFFFFFFFFF-SICA [mfw_nrf9160_1.2.3] SerNr: 352656100048068
    2021-09-07T15:09:54.330Z DEBUG modem >> AT+CEMODE?
    2021-09-07T15:09:54.341Z DEBUG modem << +CEMODE: 0
    2021-09-07T15:09:54.344Z DEBUG modem << OK
    2021-09-07T15:09:54.351Z DEBUG modem >> AT%XCBAND=?
    2021-09-07T15:09:54.365Z DEBUG modem << %XCBAND: (1,2,3,4,5,8,12,13,17,19,20,25,26,28,66)
    2021-09-07T15:09:54.371Z DEBUG modem << OK
    2021-09-07T15:09:54.382Z DEBUG modem >> AT+CMEE?
    2021-09-07T15:09:54.391Z DEBUG modem << +CMEE: 1
    2021-09-07T15:09:54.393Z DEBUG modem << OK
    2021-09-07T15:09:54.396Z DEBUG modem >> AT+CNEC?
    2021-09-07T15:09:54.405Z DEBUG modem << +CNEC: 24
    2021-09-07T15:09:54.408Z DEBUG modem << OK
    2021-09-07T15:09:54.411Z DEBUG modem >> AT+CGEREP?
    2021-09-07T15:09:54.423Z DEBUG modem << +CGEREP: 1,0
    2021-09-07T15:09:54.426Z DEBUG modem << OK
    2021-09-07T15:09:54.429Z DEBUG modem >> AT+CIND=1,1,1
    2021-09-07T15:09:54.433Z DEBUG modem << OK
    2021-09-07T15:09:54.436Z DEBUG modem >> AT+CEREG=5
    2021-09-07T15:09:54.444Z DEBUG modem << OK
    2021-09-07T15:09:54.451Z DEBUG modem >> AT+CEREG?
    2021-09-07T15:09:54.464Z DEBUG modem << +CEREG: 5,1,"5209","099F990D",9,,,"11100000","00000110"
    2021-09-07T15:09:54.466Z DEBUG modem << OK
    2021-09-07T15:09:54.472Z DEBUG modem >> AT+COPS=3,2
    2021-09-07T15:09:54.482Z DEBUG modem << OK
    2021-09-07T15:09:54.487Z DEBUG modem >> AT+COPS?
    2021-09-07T15:09:54.494Z DEBUG modem << +COPS: 0,2,"65501",9
    2021-09-07T15:09:54.497Z DEBUG modem << OK
    2021-09-07T15:09:54.508Z DEBUG modem >> AT%XCBAND
    2021-09-07T15:09:54.515Z DEBUG modem << %XCBAND: 8
    2021-09-07T15:09:54.526Z DEBUG modem << OK
    2021-09-07T15:09:54.533Z DEBUG modem >> AT+CGDCONT?
    2021-09-07T15:09:54.544Z DEBUG modem << +CGDCONT: 0,"IP","ltedefault.vodacom.za","10.170.0.90",0,0
    2021-09-07T15:09:54.547Z DEBUG modem << OK
    2021-09-07T15:09:54.552Z DEBUG modem >> AT+CGACT?
    2021-09-07T15:09:54.568Z DEBUG modem << +CGACT: 0,1
    2021-09-07T15:09:54.571Z DEBUG modem << OK
    2021-09-07T15:09:54.588Z DEBUG modem >> AT%CESQ=1
    2021-09-07T15:09:54.594Z DEBUG modem << OK
    2021-09-07T15:09:54.604Z DEBUG modem >> AT+CESQ
    2021-09-07T15:09:54.612Z DEBUG modem << +CESQ: 99,99,255,255,30,72
    2021-09-07T15:09:54.614Z DEBUG modem << OK
    2021-09-07T15:09:54.625Z DEBUG modem >> AT%XSIM=1
    2021-09-07T15:09:54.633Z DEBUG modem << OK
    2021-09-07T15:09:54.636Z DEBUG modem >> AT%XSIM?
    2021-09-07T15:09:54.646Z DEBUG modem << %XSIM: 1
    2021-09-07T15:09:54.649Z DEBUG modem << OK
    2021-09-07T15:09:54.655Z DEBUG modem >> AT+CPIN?
    2021-09-07T15:09:54.667Z DEBUG modem << +CPIN: READY
    2021-09-07T15:09:54.671Z DEBUG modem << OK
    2021-09-07T15:09:54.686Z DEBUG modem >> AT+CPINR="SIM PIN"
    2021-09-07T15:09:54.705Z DEBUG modem << +CPINR: "SIM PIN",3
    2021-09-07T15:09:54.709Z DEBUG modem << OK
    2021-09-07T15:09:54.715Z DEBUG modem >> AT+CIMI
    2021-09-07T15:09:54.726Z DEBUG modem << 655010470498134
    2021-09-07T15:09:54.728Z DEBUG modem << OK
    2021-09-07T15:09:54.730Z INFO IMSIdentity: 655010470498134
    2021-09-07T15:10:09.743Z DEBUG modem >> AT+CFUN?
    2021-09-07T15:10:09.756Z DEBUG modem << +CFUN: 1
    2021-09-07T15:10:09.768Z DEBUG modem << OK
    2021-09-07T15:10:48.807Z DEBUG modem >> AT%XSYSTEMMODE?
    2021-09-07T15:10:48.823Z DEBUG modem << %XSYSTEMMODE: 0,1,0,0
    2021-09-07T15:10:48.825Z DEBUG modem << OK
    2021-09-07T15:12:44.447Z DEBUG modem << *** Booting Zephyr OS build v2.6.0-rc1-ncs1  ***
    2021-09-07T15:12:44.485Z DEBUG modem << Flash regionsDomainPermissions
    2021-09-07T15:12:44.490Z DEBUG modem << 00 01 0x00000 0x10000 Securerwxl
    2021-09-07T15:12:44.495Z DEBUG modem << 02 31 0x10000 0x100000 Non-Securerwxl
    2021-09-07T15:12:44.499Z DEBUG modem << Non-secure callable region 0 placed in flash region 1 with size 32.
    2021-09-07T15:12:44.526Z DEBUG modem << SRAM regionDomainPermissions
    2021-09-07T15:12:44.529Z DEBUG modem << 00 07 0x00000 0x10000 Securerwxl
    2021-09-07T15:12:44.531Z DEBUG modem << 08 31 0x10000 0x40000 Non-Securerwxl
    2021-09-07T15:12:44.534Z DEBUG modem << PeripheralDomainStatus
    2021-09-07T15:12:44.537Z DEBUG modem << 00 NRF_P0               Non-SecureOK
    2021-09-07T15:12:44.551Z DEBUG modem << 01 NRF_CLOCK            Non-SecureOK
    2021-09-07T15:12:44.556Z DEBUG modem << 02 NRF_RTC0             Non-SecureOK
    2021-09-07T15:12:44.559Z DEBUG modem << 03 NRF_RTC1             Non-SecureOK
    2021-09-07T15:12:44.563Z DEBUG modem << 04 NRF_NVMC             Non-SecureOK
    2021-09-07T15:12:44.564Z DEBUG modem << 05 NRF_UARTE1           Non-SecureOK
    2021-09-07T15:12:44.565Z DEBUG modem << 06 NRF_UARTE2           SecureSKIP
    2021-09-07T15:12:44.568Z DEBUG modem << 07 NRF_TWIM2            Non-SecureOK
    2021-09-07T15:12:44.570Z DEBUG modem << 08 NRF_SPIM3            Non-SecureOK
    2021-09-07T15:12:44.574Z DEBUG modem << 09 NRF_TIMER0           Non-SecureOK
    2021-09-07T15:12:44.575Z DEBUG modem << 10 NRF_TIMER1           Non-SecureOK
    2021-09-07T15:12:44.577Z DEBUG modem << 11 NRF_TIMER2           Non-SecureOK
    2021-09-07T15:12:44.579Z DEBUG modem << 12 NRF_SAADC            Non-SecureOK
    2021-09-07T15:12:44.580Z DEBUG modem << 13 NRF_PWM0             Non-SecureOK
    2021-09-07T15:12:44.580Z DEBUG modem << 14 NRF_PWM1             Non-SecureOK
    2021-09-07T15:12:44.594Z DEBUG modem << 15 NRF_PWM2             Non-SecureOK
    2021-09-07T15:12:44.597Z DEBUG modem << 16 NRF_PWM3             Non-SecureOK
    2021-09-07T15:12:44.600Z DEBUG modem << 17 NRF_WDT              Non-SecureOK
    2021-09-07T15:12:44.604Z DEBUG modem << 18 NRF_IPC              Non-SecureOK
    2021-09-07T15:12:44.605Z DEBUG modem << 19 NRF_VMC              Non-SecureOK
    2021-09-07T15:12:44.606Z DEBUG modem << 20 NRF_FPU              Non-SecureOK
    2021-09-07T15:12:44.608Z DEBUG modem << 21 NRF_EGU1             Non-SecureOK
    2021-09-07T15:12:44.609Z DEBUG modem << 22 NRF_EGU2             Non-SecureOK
    2021-09-07T15:12:44.611Z DEBUG modem << 23 NRF_DPPIC            Non-SecureOK
    2021-09-07T15:12:44.612Z DEBUG modem << 24 NRF_REGULATORS       Non-SecureOK
    2021-09-07T15:12:44.626Z DEBUG modem << 25 NRF_PDM              Non-SecureOK
    2021-09-07T15:12:44.629Z DEBUG modem << 26 NRF_I2S              Non-SecureOK
    2021-09-07T15:12:44.634Z DEBUG modem << 27 NRF_GPIOTE1          Non-SecureOK
    2021-09-07T15:12:44.635Z DEBUG modem << SPM: NS image at 0x10000
    2021-09-07T15:12:44.636Z DEBUG modem << SPM: NS MSP at 0x2001b4b0
    2021-09-07T15:12:44.637Z DEBUG modem << SPM: NS reset vector at 0x12b65
    2021-09-07T15:12:44.648Z DEBUG modem << SPM: prepare to jump to Non-Secure image.
    2021-09-07T15:12:44.651Z DEBUG modem << *** Booting Zephyr OS build v2.6.0-rc1-ncs1  ***
    2021-09-07T15:12:44.654Z DEBUG modem << HTTPS client sample started
    2021-09-07T15:12:44.926Z DEBUG modem << Provisioning certificate
    2021-09-07T15:12:54.905Z DEBUG modem << Waiting for network.. OK
    2021-09-07T15:13:29.303Z DEBUG modem << Connecting to example.com
    2021-09-07T15:13:29.558Z DEBUG modem << connect() failed, err: 116
    2021-09-07T15:13:37.914Z DEBUG modem >> AT%XSYSTEMMODE?
    2021-09-07T15:13:37.922Z DEBUG modem << %XSYSTEMMODE: 0,1,0,0
    2021-09-07T15:13:37.923Z DEBUG modem << OK
    2021-09-07T15:13:41.754Z DEBUG modem >> AT+CFUN?
    2021-09-07T15:13:41.760Z DEBUG modem << +CFUN: 1
    2021-09-07T15:13:41.776Z DEBUG modem << OK
    

    I wonder if there are any more changes required to the prj.conf file for sample https_client to ovecome the error: "connect() failed, err 116.

    For comparison, I attach below a copy of the prj.conf file for the AT_client sample that connects to the NB-IoT network without a problem.

    #
    # Copyright (c) 2019 Nordic Semiconductor ASA
    #
    # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
    #
    # General config
    CONFIG_ASSERT=y
    
    # Network
    CONFIG_NETWORKING=y
    CONFIG_NET_NATIVE=n
    CONFIG_NET_SOCKETS=y
    CONFIG_NET_SOCKETS_OFFLOAD=y
    CONFIG_LTE_NETWORK_MODE_NBIOT=y
    
    
    # Modem library
    CONFIG_NRF_MODEM_LIB=y
    
    # AT host library
    CONFIG_AT_HOST_LIBRARY=y
    CONFIG_UART_INTERRUPT_DRIVEN=y
    
    # Stacks and heaps
    CONFIG_MAIN_STACK_SIZE=3072
    CONFIG_HEAP_MEM_POOL_SIZE=16384
    

    Also, I was told that the engineering samples for my nRF9160 DK v 0.8.2 are not compatible with the latest modem firmware versions.

    Could this be a reason for the problem that I am experiencing?

    Regards,

    Jacek

  • Hello Jacek,

    Jacek Majda said:
    I have resolved the problem which you didn't like in my log file from AT_client sample on line: Debug modem<<+CEREG: 5,2,"5209",...by adding the following line to the prj.conf file for this sample: CONFIG_LTE_NETWORK_MODE_NBIOT=y  (to set the modem to the NB-IoT mode).

    Thank you for clarifying and my apologies for missing the necessary Nb-IoT modification.

    Jacek Majda said:
    Also, I was told that the engineering samples for my nRF9160 DK v 0.8.2 are not compatible with the latest modem firmware versions.

    Yes, that is correct. Engineering samples of the DK are not compatible any more with the latest modem firmware versions (starting from 1.3.0). But running applications like the HTTPS Client should work fine with modem firmware 1.2.3 as well.

    Jacek Majda said:
    I attach the log file for this sample, that was created after implementing this change to the prj.conf file, which shows new data on this previously problematic line, namely: Debug modem<<+CEREG:5,1,"5209",..., indicating that now the registration was successful.

    Yes, I can confirm that your device has successfully established a connection with the network.

    2021-09-07T13:28:27.314Z DEBUG modem >> AT+CEREG?
    2021-09-07T13:28:27.326Z DEBUG modem << +CEREG: 5,1,"5209","099F990D",9,,,"11100000","00000110"
    
    2021-09-07T13:32:12.954Z DEBUG modem >> AT%XMONITOR
    2021-09-07T13:32:12.974Z DEBUG modem << %XMONITOR: 1,"","","65501","5209",9,8,"099F990D",102,3558,79,48,"","11100000","00000110","01001001"

    Jacek Majda said:
    Could this be a reason for the problem that I am experiencing?

    I’m honestly running out of ideas what the root cause could be here, because this should work. I wonder if there might be an issue related to Nb-IoT, but I can not test this myself (I only have LTE-M available). I have asked one of our field engineers to run the HTTPS Client on his DK with Nb-IoT, but he can not do that before the end of the week.

    In the meantime, I wonder if you could record a modem trace from the point where the HTTPS Client is starting up until you receive the connection failure error? I might want to send this to our modem team for further analysis.

    Thanks and regards,

    Markus

  • Hello Marcus,

    As requested, I attach the file that was created during the process of collecting a modem trace, while the sample: https_client was running on my nRF9160DK v0.8.2.

    trace-2021-09-08T16-26-57.340Z.bin

    Can you advise how can this file be opened in order to read its content?

    Regards,

    Jacek

  • Hello Jacek,

    Jacek Majda said:
    As requested, I attach the file that was created during the process of collecting a modem trace, while the sample: https_client was running on my nRF9160DK v0.8.2.

    Thanks a lot! Unfortunately, I’m not able to see that much in this trace, as it stops before the device has established a connection to the network. When did you stop the recording?

    Otherwise, I observed that there are quite a lot of error messages in the trace which make me wonder if there is something wrong with the modem (firmware image). This might be the reason as well why the trace recording stops earlier as expected. Could you give it a new try, maybe?

    My colleague Didrik Rokhaug told me that we will send you a newer DK which should be on its way as we speak. It would be interesting to see if you can connect to the example.com server using this one.

    Jacek Majda said:
    Can you advise how can this file be opened in order to read its content?

    You can convert and analyse the .bin file using Trace Collector V2 preview, accessible via nRF Connect. It is still in experimental state, but the basic functionality should work.  When opening the tool, you will get a quick introduction on how to proceed.

    Regards,

    Markus

  • Hello Marcus,

    As requested, I repeated the exercise of collecting a modem trace for my nRF9160 DK  v0.8.2 , running the sample: https_client.

    I attach the file that was created during this process of collecting the modem trace, while the sample: https_client was running on my nRF9160DK.

    trace-2021-09-09T12-33-41.706Z.bin

    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.

    Regards,

    Jacek

Related