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

nRF9160 - getaddrinfo return 60

Hello,

I'm trying to run Simple_mqtt code on developement board with nRF9160. Connection to LTE takes in my opinion very long time. On basic AT sample code it's connecting a way faster. Next and main issue is that I can't connect to any mqtt broker. First I didn't change anything in code and at end I have information:

ERROR: getaddrinfo failed 60


ERROR: mqtt_connect -47

I changed mqtt broker for HiveMQ and I have exactly the same error. I'm using the latest software from your side:

2020-02-25T18:25:23.497Z INFO Application data folder: C:\Users\PiotrDurys\AppData\Roaming\nrfconnect\pc-nrfconnect-linkmonitor
2020-02-25T18:25:23.598Z DEBUG App pc-nrfconnect-linkmonitor v1.1.1 official
2020-02-25T18:25:23.599Z DEBUG App path: C:\Users\PiotrDurys\.nrfconnect-apps\node_modules\pc-nrfconnect-linkmonitor
2020-02-25T18:25:23.599Z DEBUG nRFConnect 3.3.0 is supported by the app (^3.2.0)
2020-02-25T18:25:23.599Z DEBUG nRFConnect path: C:\Users\PiotrDurys\AppData\Local\Programs\nrfconnect\resources\app.asar
2020-02-25T18:25:23.599Z DEBUG HomeDir: C:\Users\PiotrDurys
2020-02-25T18:25:23.599Z DEBUG TmpDir: C:\Users\PIOTRD~2\AppData\Local\Temp
2020-02-25T18:25:23.601Z VERBOSE Could not fetch serial number for serial port at COM5
2020-02-25T18:25:23.602Z VERBOSE Could not fetch serial number for serial port at COM3
2020-02-25T18:25:27.638Z INFO Modem port is opened
2020-02-25T18:25:27.648Z DEBUG modem >> AT+CFUN?\x0D\x0A
2020-02-25T18:25:27.655Z DEBUG modem << +CFUN: 1\x0D\x0A
2020-02-25T18:25:27.657Z DEBUG modem << OK\x0D\x0A
2020-02-25T18:25:27.689Z DEBUG modem >> AT+CGSN=1\x0D\x0A
2020-02-25T18:25:27.695Z DEBUG modem << +CGSN: "352656100373839"\x0D\x0A
2020-02-25T18:25:27.698Z DEBUG modem << OK\x0D\x0A
2020-02-25T18:25:27.701Z DEBUG modem >> AT+CGMI\x0D\x0A
2020-02-25T18:25:27.707Z DEBUG modem << Nordic Semiconductor ASA\x0D\x0A
2020-02-25T18:25:27.709Z DEBUG modem << OK\x0D\x0A
2020-02-25T18:25:27.719Z DEBUG modem >> AT+CGMM\x0D\x0A
2020-02-25T18:25:27.727Z DEBUG modem << nRF9160-SICA\x0D\x0A
2020-02-25T18:25:27.729Z DEBUG modem << OK\x0D\x0A
2020-02-25T18:25:27.733Z DEBUG modem >> AT+CGMR\x0D\x0A
2020-02-25T18:25:27.740Z DEBUG modem << mfw_nrf9160_1.1.1\x0D\x0A
2020-02-25T18:25:27.742Z DEBUG modem << OK\x0D\x0A
2020-02-25T18:25:27.744Z INFO Nordic Semiconductor ASA nRF9160-SICA [mfw_nrf9160_1.1.1] SerNr: 352656100373839
2020-02-25T18:25:27.748Z DEBUG modem >> AT+CEMODE?\x0D\x0A
2020-02-25T18:25:27.754Z DEBUG modem << +CEMODE: 2\x0D\x0A
2020-02-25T18:25:27.756Z DEBUG modem << OK\x0D\x0A
2020-02-25T18:25:27.769Z DEBUG modem >> AT%XCBAND=?\x0D\x0A
2020-02-25T18:25:27.780Z DEBUG modem << %XCBAND: (1,2,3,4,5,8,12,13,14,17,18,19,20,25,26,28,66)\x0D\x0A
2020-02-25T18:25:27.782Z DEBUG modem << OK\x0D\x0A
2020-02-25T18:25:27.797Z DEBUG modem >> AT+CMEE?\x0D\x0A
2020-02-25T18:25:27.802Z DEBUG modem << +CMEE: 0\x0D\x0A
2020-02-25T18:25:27.805Z DEBUG modem << OK\x0D\x0A
2020-02-25T18:25:27.809Z DEBUG modem >> AT+CMEE=1\x0D\x0A
2020-02-25T18:25:27.815Z DEBUG modem << OK\x0D\x0A
2020-02-25T18:25:27.818Z DEBUG modem >> AT+CNEC?\x0D\x0A
2020-02-25T18:25:27.830Z DEBUG modem << +CNEC: 0\x0D\x0A
2020-02-25T18:25:27.831Z DEBUG modem << OK\x0D\x0A
2020-02-25T18:25:27.837Z DEBUG modem >> AT+CNEC=24\x0D\x0A
2020-02-25T18:25:27.841Z DEBUG modem << OK\x0D\x0A
2020-02-25T18:25:27.848Z DEBUG modem >> AT+CGEREP?\x0D\x0A
2020-02-25T18:25:27.855Z DEBUG modem << +CGEREP: 0,0\x0D\x0A
2020-02-25T18:25:27.857Z DEBUG modem << OK\x0D\x0A
2020-02-25T18:25:27.863Z DEBUG modem >> AT+CGDCONT?\x0D\x0A
2020-02-25T18:25:27.868Z DEBUG modem << OK\x0D\x0A
2020-02-25T18:25:27.872Z DEBUG modem >> AT+CGACT?\x0D\x0A
2020-02-25T18:25:27.878Z DEBUG modem << OK\x0D\x0A
2020-02-25T18:25:27.882Z DEBUG modem >> AT+CGEREP=1\x0D\x0A
2020-02-25T18:25:27.887Z DEBUG modem << OK\x0D\x0A
2020-02-25T18:25:27.890Z DEBUG modem >> AT+CIND=1,1,1\x0D\x0A
2020-02-25T18:25:27.895Z DEBUG modem << OK\x0D\x0A
2020-02-25T18:25:27.899Z DEBUG modem >> AT+CEREG=2\x0D\x0A
2020-02-25T18:25:27.903Z DEBUG modem << OK\x0D\x0A
2020-02-25T18:25:27.919Z DEBUG modem >> AT+CEREG?\x0D\x0A
2020-02-25T18:25:27.927Z DEBUG modem << +CEREG: 2,4,"FFFE","FFFFFFFF",7\x0D
2020-02-25T18:25:27.933Z DEBUG modem << \x0A
2020-02-25T18:25:27.934Z DEBUG modem << OK\x0D\x0A
2020-02-25T18:25:27.940Z DEBUG modem >> AT%CESQ=1\x0D\x0A
2020-02-25T18:25:27.949Z DEBUG modem << OK\x0D\x0A
2020-02-25T18:25:27.952Z DEBUG modem >> AT+CESQ\x0D\x0A
2020-02-25T18:25:27.963Z DEBUG modem << +CESQ: 99,99,255,255,255,255\x0D\x0A
2020-02-25T18:25:27.965Z DEBUG modem << OK\x0D\x0A
2020-02-25T18:25:27.971Z DEBUG modem >> AT%XSIM=1\x0D\x0A
2020-02-25T18:25:27.979Z DEBUG modem << OK\x0D\x0A
2020-02-25T18:25:27.982Z DEBUG modem >> AT%XSIM?\x0D\x0A
2020-02-25T18:25:27.987Z DEBUG modem << %XSIM: 1\x0D\x0A
2020-02-25T18:25:27.989Z DEBUG modem << OK\x0D
2020-02-25T18:25:28.002Z DEBUG modem >> AT+CPIN?\x0D\x0A
2020-02-25T18:25:28.007Z DEBUG modem << +CPIN: READY\x0D\x0A
2020-02-25T18:25:28.011Z DEBUG modem << OK\x0D\x0A
2020-02-25T18:25:28.025Z DEBUG modem >> AT+CPINR="SIM PIN"\x0D\x0A
2020-02-25T18:25:28.039Z DEBUG modem << +CPINR: "SIM PIN",3\x0D\x0A
2020-02-25T18:25:28.040Z DEBUG modem << OK\x0D\x0A
2020-02-25T18:25:28.049Z DEBUG modem >> AT+CIMI\x0D\x0A
2020-02-25T18:25:28.055Z DEBUG modem << 260021864852809\x0D\x0A
2020-02-25T18:25:28.057Z DEBUG modem << OK\x0D\x0A
2020-02-25T18:25:28.058Z INFO IMSIdentity: 260021864852809
2020-02-25T18:25:34.743Z DEBUG modem << *** Booting Zephyr OS build v2.1.99-ncs1  ***\x0D\x0A
2020-02-25T18:25:34.753Z DEBUG modem << Flash region\x09\x09Domain\x09\x09Permissions\x0D\x0A
2020-02-25T18:25:34.755Z DEBUG modem << 00 0x00000 0x08000 \x09Secure\x09\x09rwxl\x0D\x0A
2020-02-25T18:25:34.758Z DEBUG modem << 01 0x08000 0x10000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:34.759Z DEBUG modem << 02 0x10000 0x18000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:34.760Z DEBUG modem << 03 0x18000 0x20000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:34.763Z DEBUG modem << 04 0x20000 0x28000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:34.764Z DEBUG modem << 05 0x28000 0x30000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:34.767Z DEBUG modem << 06 0x30000 0x38000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:34.770Z DEBUG modem << 07 0x38000 0x40000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:34.774Z DEBUG modem << 08 0x40000 0x48000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:34.778Z DEBUG modem << 09 0x48000 0x50000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:34.782Z DEBUG modem << 10 0x50000 0x58000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:34.785Z DEBUG modem << 11 0x58000 0x60000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:34.788Z DEBUG modem << 12 0x60000 0x68000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:34.791Z DEBUG modem << 13 0x68000 0x70000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:34.793Z DEBUG modem << 14 0x70000 0x78000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:34.797Z DEBUG modem << 15 0x78000 0x80000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:34.808Z DEBUG modem << 16 0x80000 0x88000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:34.810Z DEBUG modem << 17 0x88000 0x90000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:34.811Z DEBUG modem << 18 0x90000 0x98000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:34.813Z DEBUG modem << 19 0x98000 0xa0000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:34.814Z DEBUG modem << 20 0xa0000 0xa8000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:34.816Z DEBUG modem << 21 0xa8000 0xb0000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:34.819Z DEBUG modem << 22 0xb0000 0xb8000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:34.823Z DEBUG modem << 23 0xb8000 0xc0000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:34.834Z DEBUG modem << 24 0xc0000 0xc8000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:34.835Z DEBUG modem << 25 0xc8000 0xd0000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:34.837Z DEBUG modem << 26 0xd0000 0xd8000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:34.839Z DEBUG modem << 27 0xd8000 0xe0000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:34.841Z DEBUG modem << 28 0xe0000 0xe8000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:34.849Z DEBUG modem << 29 0xe8000 0xf0000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:34.851Z DEBUG modem << 30 0xf0000 0xf8000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:34.853Z DEBUG modem << 31 0xf8000 0x100000 \x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:34.854Z DEBUG modem << Non-secure callable region 0 placed in flash region 0 with size 32.\x0D
2020-02-25T18:25:35.026Z DEBUG modem << SRAM region\x09\x09Domain\x09\x09Permissions\x0D\x0A
2020-02-25T18:25:35.043Z DEBUG modem << 00 0x00000 0x02000\x09Secure\x09\x09rwxl\x0D\x0A
2020-02-25T18:25:35.047Z DEBUG modem << 01 0x02000 0x04000\x09Secure\x09\x09rwxl\x0D\x0A
2020-02-25T18:25:35.048Z DEBUG modem << 02 0x04000 0x06000\x09Secure\x09\x09rwxl\x0D\x0A
2020-02-25T18:25:35.050Z DEBUG modem << 03 0x06000 0x08000\x09Secure\x09\x09rwxl\x0D\x0A
2020-02-25T18:25:35.051Z DEBUG modem << 04 0x08000 0x0a000\x09Secure\x09\x09rwxl\x0D\x0A
2020-02-25T18:25:35.052Z DEBUG modem << 05 0x0a000 0x0c000\x09Secure\x09\x09rwxl\x0D\x0A
2020-02-25T18:25:35.054Z DEBUG modem << 06 0x0c000 0x0e000\x09Secure\x09\x09rwxl\x0D\x0A
2020-02-25T18:25:35.056Z DEBUG modem << 07 0x0e000 0x10000\x09Secure\x09\x09rwxl\x0D\x0A
2020-02-25T18:25:35.057Z DEBUG modem << 08 0x10000 0x12000\x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:35.065Z DEBUG modem << 09 0x12000 0x14000\x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:35.066Z DEBUG modem << 10 0x14000 0x16000\x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:35.068Z DEBUG modem << 11 0x16000 0x18000\x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:35.069Z DEBUG modem << 12 0x18000 0x1a000\x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:35.069Z DEBUG modem << 13 0x1a000 0x1c000\x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:35.071Z DEBUG modem << 14 0x1c000 0x1e000\x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:35.081Z DEBUG modem << 15 0x1e000 0x20000\x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:35.082Z DEBUG modem << 16 0x20000 0x22000\x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:35.084Z DEBUG modem << 17 0x22000 0x24000\x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:35.086Z DEBUG modem << 18 0x24000 0x26000\x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:35.088Z DEBUG modem << 19 0x26000 0x28000\x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:35.090Z DEBUG modem << 20 0x28000 0x2a000\x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:35.099Z DEBUG modem << 21 0x2a000 0x2c000\x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:35.100Z DEBUG modem << 22 0x2c000 0x2e000\x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:35.103Z DEBUG modem << 23 0x2e000 0x30000\x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:35.105Z DEBUG modem << 24 0x30000 0x32000\x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:35.113Z DEBUG modem << 25 0x32000 0x34000\x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:35.115Z DEBUG modem << 26 0x34000 0x36000\x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:35.117Z DEBUG modem << 27 0x36000 0x38000\x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:35.119Z DEBUG modem << 28 0x38000 0x3a000\x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:35.120Z DEBUG modem << 29 0x3a000 0x3c000\x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:35.123Z DEBUG modem << 30 0x3c000 0x3e000\x09Non-Secure\x09rwxl\x0D\x0A
2020-02-25T18:25:35.133Z DEBUG modem << 31 0x3e000 0x40000\x09Non-Secure\x09rwxl\x0D\x0A\x0D\x0A
2020-02-25T18:25:35.135Z DEBUG modem << Peripheral\x09\x09Domain\x09\x09Status\x0D\x0A
2020-02-25T18:25:35.136Z DEBUG modem << 00 NRF_P0               Non-Secure\x09OK\x0D\x0A
2020-02-25T18:25:35.137Z DEBUG modem << 01 NRF_CLOCK            Non-Secure\x09OK\x0D\x0A
2020-02-25T18:25:35.139Z DEBUG modem << 02 NRF_RTC0             Non-Secure\x09OK\x0D\x0A
2020-02-25T18:25:35.149Z DEBUG modem << 03 NRF_RTC1             Non-Secure\x09OK\x0D\x0A
2020-02-25T18:25:35.151Z DEBUG modem << 04 NRF_NVMC             Non-Secure\x09OK\x0D\x0A
2020-02-25T18:25:35.153Z DEBUG modem << 05 NRF_UARTE1           Non-Secure\x09OK\x0D\x0A
2020-02-25T18:25:35.155Z DEBUG modem << 06 NRF_UARTE2           Secure\x09\x09SKIP\x0D\x0A
2020-02-25T18:25:35.156Z DEBUG modem << 07 NRF_TWIM2            Non-Secure\x09OK\x0D\x0A
2020-02-25T18:25:35.165Z DEBUG modem << 08 NRF_SPIM3            Non-Secure\x09OK\x0D\x0A
2020-02-25T18:25:35.166Z DEBUG modem << 09 NRF_TIMER0           Non-Secure\x09OK\x0D\x0A
2020-02-25T18:25:35.167Z DEBUG modem << 10 NRF_TIMER1           Non-Secure\x09OK\x0D
2020-02-25T18:25:35.170Z DEBUG modem << 11 NRF_TIMER2           Non-Secure\x09OK\x0D\x0A
2020-02-25T18:25:35.172Z DEBUG modem << 12 NRF_SAADC            Non-Secure\x09OK\x0D\x0A
2020-02-25T18:25:35.182Z DEBUG modem << 13 NRF_PWM0             Non-Secure\x09OK\x0D\x0A
2020-02-25T18:25:35.183Z DEBUG modem << 14 NRF_PWM1             Non-Secure\x09OK\x0D\x0A
2020-02-25T18:25:35.187Z DEBUG modem << 15 NRF_PWM2             Non-Secure\x09OK\x0D\x0A
2020-02-25T18:25:35.189Z DEBUG modem << 16 NRF_PWM3             Non-Secure\x09OK\x0D\x0A
2020-02-25T18:25:35.199Z DEBUG modem << 17 NRF_WDT              Non-Secure\x09OK\x0D\x0A
2020-02-25T18:25:35.201Z DEBUG modem << 18 NRF_IPC              Non-Secure\x09OK\x0D\x0A
2020-02-25T18:25:35.203Z DEBUG modem << 19 NRF_VMC              Non-Secure\x09OK\x0D\x0A
2020-02-25T18:25:35.205Z DEBUG modem << 20 NRF_FPU              Non-Secure\x09OK\x0D\x0A
2020-02-25T18:25:35.209Z DEBUG modem << 21 NRF_EGU1             Non-Secure\x09OK\x0D\x0A
2020-02-25T18:25:35.210Z DEBUG modem << 22 NRF_EGU2             Non-Secure\x09OK\x0D\x0A
2020-02-25T18:25:35.219Z DEBUG modem << 23 NRF_DPPIC            Non-Secure\x09OK\x0D\x0A
2020-02-25T18:25:35.221Z DEBUG modem << 24 NRF_GPIOTE1          Non-Secure\x09OK\x0D\x0A
2020-02-25T18:25:35.224Z DEBUG modem << 25 NRF_REGULATORS       Non-Secure\x09OK\x0D\x0A\x0D\x0A
2020-02-25T18:25:35.228Z DEBUG modem << SPM: NS image at 0xc000\x0D\x0A
2020-02-25T18:25:35.229Z DEBUG modem << SPM: NS MSP at 0x20023d68\x0D\x0A
2020-02-25T18:25:35.236Z DEBUG modem << SPM: NS reset vector at 0xd0cd\x0D\x0A
2020-02-25T18:25:35.238Z DEBUG modem << SPM: prepare to jump to Non-Secure image.\x0D\x0A
2020-02-25T18:25:35.423Z DEBUG modem << *** Booting Zephyr OS build v2.1.99-ncs1  ***\x0D\x0A
2020-02-25T18:25:35.441Z DEBUG modem << The MQTT simple sample started\x0D\x0A
2020-02-25T18:25:35.444Z DEBUG modem << LTE Link Connecting ...\x0D\x0A
2020-02-25T18:27:06.569Z DEBUG modem << +CEREG: 2,"FFFE","FFFFFFFF",7,0,0,"11100000","11100000"\x0D\x0A
2020-02-25T18:35:35.476Z DEBUG modem << +CEREG: 0,"FFFE","FFFFFFFF",7,0,0,"11100000","11100000"\x0D\x0A
2020-02-25T18:35:43.574Z DEBUG modem << +CEREG: 2,"A982","0203A56F",9,0,0,"11100000","11100000"\x0D\x0A
2020-02-25T18:35:45.155Z DEBUG modem << +CEREG: 1,"A982","0203A56F",9,,,"11100000","11100000"\x0D\x0A
2020-02-25T18:35:45.177Z DEBUG modem >> AT+COPS=3,2\x0D\x0A
2020-02-25T18:35:45.179Z DEBUG modem << LTE Link Connected!\x0D\x0A
2020-02-25T18:35:45.182Z DEBUG modem << OK\x0D\x0A
2020-02-25T18:35:45.184Z DEBUG modem >> AT+COPS?\x0D\x0A
2020-02-25T18:35:45.195Z DEBUG modem << +COPS: 0,2,"26002",9\x0D\x0A
2020-02-25T18:35:45.198Z DEBUG modem << OK\x0D\x0A
2020-02-25T18:35:45.215Z DEBUG modem >> AT%XCBAND\x0D\x0A
2020-02-25T18:35:45.220Z DEBUG modem << %XCBAND: 20\x0D\x0A
2020-02-25T18:35:45.230Z DEBUG modem << OK\x0D\x0A
2020-02-25T18:35:45.236Z DEBUG modem >> AT+CGDCONT?\x0D\x0A
2020-02-25T18:35:45.246Z DEBUG modem << +CGDCONT: 0,"IP","test.nbiot","100.83.210.104",0,0\x0D\x0A
2020-02-25T18:35:45.248Z DEBUG modem << OK\x0D\x0A
2020-02-25T18:35:45.256Z DEBUG modem >> AT+CGACT?\x0D\x0A
2020-02-25T18:35:45.267Z DEBUG modem << +CGACT: 0,1\x0D\x0A
2020-02-25T18:35:45.268Z DEBUG modem << OK\x0D\x0A
2020-02-25T18:36:09.174Z DEBUG modem << ERROR: getaddrinfo failed 60\x0D\x0A
2020-02-25T18:36:09.193Z DEBUG modem << ERROR: mqtt_connect -47\x0D\x0A

I'm attaching log from connection. 

Regards

Piotr Durys

Parents
  • Hi.

    What SIM card are you using, and have you been able to use it (to send data) with other samples previously (such as the asset_tracker application)?

    When getaddrinfo times out (error code 60), that usually indicates that you are not able to send IP data due to the SIM card not being activated or supporting LTE-M/NB-IoT.

    As to why it takes so long to connect, it looks like it first tries to search for an LTE-M network, but when not finding one after 10 minutes, it starts to look for an NB-IoT network which it finds in a couple of seconds.

    Best regards,

    Didrik

  • Hi,

    Thank you for fast answer. 

    I'm using T-mobile Poland NB-IoT card. I'm able to connect with this card to MQTT brocker via other module form quectel. I'm sure that the card is correct. I know that the T-mobile prefer using UDP instead of TCP/IP maybe that is the issue. Is this possible to switch searching NB-Iot first than LTE-M?

  • I have also information from T-mobile Poland that Modules has to support ePCO to distribute DNS addresses. Does nRF9160 support ePCO?

    Regards

    Piotr Durys

  • p.durys said:
    Can you tell me what those errors code means?

     You can find the definition of the error codes here: https://github.com/NordicPlayground/fw-nrfconnect-zephyr/blob/master/lib/libc/minimal/include/errno.h

    57 means that the socket is not connected.

     

    p.durys said:
    Does nRF9160 support ePCO?

     Yes. The nRF9160 supports both ePCO and "legacy" PCO. You can control which is used with our %XEPCO AT command.

     

    p.durys said:
    Now the board is connecting, but I can't login to the server.

     Are you using TLS? OR any other form of security?

    Also, it does not look like you are able to connect to the server. If you had, you should either see a line saying "MQTT client connected!" in the log or "MQTT connect failed" with an MQTT CONACK error code explaining why the broker refused the connection.

     

    p.durys said:
    I changed Host name for IP address: 5.196.95.208. This is mosquitto server for test.

     Could you try mqtt.eclipse.org instead of test.mosquitto.org? When I do a DNS lookup for mqtt.eclipse.org I get 137.135.83.217

  • I'm not using any encryption. For first time that can complicate the communication. 

    This is log from modem when I changed host for eclipse:

    2020-02-28T14:09:34.727Z INFO Application data folder: C:\Users\PiotrDurys\AppData\Roaming\nrfconnect\pc-nrfconnect-linkmonitor
    2020-02-28T14:09:34.849Z DEBUG App pc-nrfconnect-linkmonitor v1.1.1 official
    2020-02-28T14:09:34.849Z DEBUG App path: C:\Users\PiotrDurys\.nrfconnect-apps\node_modules\pc-nrfconnect-linkmonitor
    2020-02-28T14:09:34.849Z DEBUG nRFConnect 3.3.0 is supported by the app (^3.2.0)
    2020-02-28T14:09:34.849Z DEBUG nRFConnect path: C:\Users\PiotrDurys\AppData\Local\Programs\nrfconnect\resources\app.asar
    2020-02-28T14:09:34.849Z DEBUG HomeDir: C:\Users\PiotrDurys
    2020-02-28T14:09:34.849Z DEBUG TmpDir: C:\Users\PIOTRD~2\AppData\Local\Temp
    2020-02-28T14:09:34.853Z VERBOSE Could not fetch serial number for serial port at COM5
    2020-02-28T14:09:34.853Z VERBOSE Could not fetch serial number for serial port at COM3
    2020-02-28T14:09:37.243Z INFO Modem port is opened
    2020-02-28T14:09:39.682Z DEBUG modem << *** Booting Zephyr OS build v2.1.99-ncs1  ***\x0D\x0A
    2020-02-28T14:09:39.701Z DEBUG modem << Flash region\x09\x09Domain\x09\x09Permissions\x0D\x0A
    2020-02-28T14:09:39.704Z DEBUG modem << 00 0x00000 0x08000 \x09Secure\x09\x09rwxl\x0D\x0A
    2020-02-28T14:09:39.707Z DEBUG modem << 01 0x08000 0x10000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:39.709Z DEBUG modem << 02 0x10000 0x18000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:39.711Z DEBUG modem << 03 0x18000 0x20000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:39.713Z DEBUG modem << 04 0x20000 0x28000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:39.716Z DEBUG modem << 05 0x28000 0x30000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:39.729Z DEBUG modem << 06 0x30000 0x38000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:39.732Z DEBUG modem << 07 0x38000 0x40000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:39.734Z DEBUG modem << 08 0x40000 0x48000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:39.737Z DEBUG modem << 09 0x48000 0x50000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:39.740Z DEBUG modem << 10 0x50000 0x58000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:39.745Z DEBUG modem << 11 0x58000 0x60000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:39.748Z DEBUG modem << 12 0x60000 0x68000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:39.750Z DEBUG modem << 13 0x68000 0x70000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:39.753Z DEBUG modem << 14 0x70000 0x78000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:39.756Z DEBUG modem << 15 0x78000 0x80000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:39.757Z DEBUG modem << 16 0x80000 0x88000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:39.759Z DEBUG modem << 17 0x88000 0x90000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:39.766Z DEBUG modem << 18 0x90000 0x98000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:39.769Z DEBUG modem << 19 0x98000 0xa0000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:39.771Z DEBUG modem << 20 0xa0000 0xa8000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:39.772Z DEBUG modem << 21 0xa8000 0xb0000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:39.773Z DEBUG modem << 22 0xb0000 0xb8000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:39.775Z DEBUG modem << 23 0xb8000 0xc0000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:39.776Z DEBUG modem << 24 0xc0000 0xc8000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:39.778Z DEBUG modem << 25 0xc8000 0xd0000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:39.779Z DEBUG modem << 26 0xd0000 0xd8000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:39.784Z DEBUG modem << 27 0xd8000 0xe0000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:39.786Z DEBUG modem << 28 0xe0000 0xe8000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:39.788Z DEBUG modem << 29 0xe8000 0xf0000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:39.794Z DEBUG modem << 30 0xf0000 0xf8000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:39.795Z DEBUG modem << 31 0xf8000 0x100000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:39.797Z DEBUG modem << Non-secure callable region 0 placed in flash region 0 with size 32.\x0D\x0A\x0D\x0A
    2020-02-28T14:09:39.966Z DEBUG modem << SRAM region\x09\x09Domain\x09\x09Permissions\x0D
    2020-02-28T14:09:39.981Z DEBUG modem << 00 0x00000 0x02000\x09Secure\x09\x09rwxl\x0D\x0A
    2020-02-28T14:09:39.986Z DEBUG modem << 01 0x02000 0x04000\x09Secure\x09\x09rwxl\x0D\x0A
    2020-02-28T14:09:39.996Z DEBUG modem << 02 0x04000 0x06000\x09Secure\x09\x09rwxl\x0D\x0A
    2020-02-28T14:09:39.997Z DEBUG modem << 03 0x06000 0x08000\x09Secure\x09\x09rwxl\x0D\x0A
    2020-02-28T14:09:39.999Z DEBUG modem << 04 0x08000 0x0a000\x09Secure\x09\x09rwxl\x0D\x0A
    2020-02-28T14:09:40.000Z DEBUG modem << 05 0x0a000 0x0c000\x09Secure\x09\x09rwxl\x0D\x0A
    2020-02-28T14:09:40.001Z DEBUG modem << 06 0x0c000 0x0e000\x09Secure\x09\x09rwxl\x0D\x0A
    2020-02-28T14:09:40.002Z DEBUG modem << 07 0x0e000 0x10000\x09Secure\x09\x09rwxl\x0D\x0A
    2020-02-28T14:09:40.009Z DEBUG modem << 08 0x10000 0x12000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:40.010Z DEBUG modem << 09 0x12000 0x14000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:40.012Z DEBUG modem << 10 0x14000 0x16000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:40.014Z DEBUG modem << 11 0x16000 0x18000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:40.018Z DEBUG modem << 12 0x18000 0x1a000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:40.019Z DEBUG modem << 13 0x1a000 0x1c000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:40.024Z DEBUG modem << 14 0x1c000 0x1e000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:40.026Z DEBUG modem << 15 0x1e000 0x20000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:40.034Z DEBUG modem << 16 0x20000 0x22000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:40.036Z DEBUG modem << 17 0x22000 0x24000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:40.037Z DEBUG modem << 18 0x24000 0x26000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:40.040Z DEBUG modem << 19 0x26000 0x28000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:40.042Z DEBUG modem << 20 0x28000 0x2a000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:40.043Z DEBUG modem << 21 0x2a000 0x2c000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:40.045Z DEBUG modem << 22 0x2c000 0x2e000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:40.046Z DEBUG modem << 23 0x2e000 0x30000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:40.048Z DEBUG modem << 24 0x30000 0x32000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:40.049Z DEBUG modem << 25 0x32000 0x34000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:40.051Z DEBUG modem << 26 0x34000 0x36000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:40.053Z DEBUG modem << 27 0x36000 0x38000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:40.062Z DEBUG modem << 28 0x38000 0x3a000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:40.064Z DEBUG modem << 29 0x3a000 0x3c000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:40.065Z DEBUG modem << 30 0x3c000 0x3e000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-02-28T14:09:40.068Z DEBUG modem << 31 0x3e000 0x40000\x09Non-Secure\x09rwxl\x0D\x0A\x0D\x0A
    2020-02-28T14:09:40.069Z DEBUG modem << Peripheral\x09\x09Domain\x09\x09Status\x0D\x0A
    2020-02-28T14:09:40.077Z DEBUG modem << 00 NRF_P0               Non-Secure\x09OK\x0D\x0A
    2020-02-28T14:09:40.080Z DEBUG modem << 01 NRF_CLOCK            Non-Secure\x09OK\x0D\x0A
    2020-02-28T14:09:40.081Z DEBUG modem << 02 NRF_RTC0             Non-Secure\x09OK\x0D\x0A
    2020-02-28T14:09:40.083Z DEBUG modem << 03 NRF_RTC1             Non-Secure\x09OK\x0D\x0A
    2020-02-28T14:09:40.085Z DEBUG modem << 04 NRF_NVMC             Non-Secure\x09OK\x0D\x0A
    2020-02-28T14:09:40.095Z DEBUG modem << 05 NRF_UARTE1           Non-Secure\x09OK\x0D\x0A
    2020-02-28T14:09:40.096Z DEBUG modem << 06 NRF_UARTE2           Secure\x09\x09SKIP\x0D\x0A
    2020-02-28T14:09:40.099Z DEBUG modem << 07 NRF_TWIM2            Non-Secure\x09OK\x0D\x0A
    2020-02-28T14:09:40.100Z DEBUG modem << 08 NRF_SPIM3            Non-Secure\x09OK\x0D\x0A
    2020-02-28T14:09:40.102Z DEBUG modem << 09 NRF_TIMER0           Non-Secure\x09OK\x0D\x0A
    2020-02-28T14:09:40.111Z DEBUG modem << 10 NRF_TIMER1           Non-Secure\x09OK\x0D\x0A
    2020-02-28T14:09:40.113Z DEBUG modem << 11 NRF_TIMER2           Non-Secure\x09OK\x0D\x0A
    2020-02-28T14:09:40.115Z DEBUG modem << 12 NRF_SAADC            Non-Secure\x09OK\x0D\x0A
    2020-02-28T14:09:40.117Z DEBUG modem << 13 NRF_PWM0             Non-Secure\x09OK\x0D\x0A
    2020-02-28T14:09:40.120Z DEBUG modem << 14 NRF_PWM1             Non-Secure\x09OK\x0D\x0A
    2020-02-28T14:09:40.127Z DEBUG modem << 15 NRF_PWM2             Non-Secure\x09OK\x0D\x0A
    2020-02-28T14:09:40.129Z DEBUG modem << 16 NRF_PWM3             Non-Secure\x09OK\x0D\x0A
    2020-02-28T14:09:40.132Z DEBUG modem << 17 NRF_WDT              Non-Secure\x09OK\x0D\x0A
    2020-02-28T14:09:40.134Z DEBUG modem << 18 NRF_IPC              Non-Secure\x09OK\x0D\x0A
    2020-02-28T14:09:40.136Z DEBUG modem << 19 NRF_VMC              Non-Secure\x09OK\x0D\x0A
    2020-02-28T14:09:40.144Z DEBUG modem << 20 NRF_FPU              Non-Secure\x09OK\x0D\x0A
    2020-02-28T14:09:40.147Z DEBUG modem << 21 NRF_EGU1             Non-Secure\x09OK\x0D\x0A
    2020-02-28T14:09:40.150Z DEBUG modem << 22 NRF_EGU2             Non-Secure\x09OK\x0D\x0A
    2020-02-28T14:09:40.152Z DEBUG modem << 23 NRF_DPPIC            Non-Secure\x09OK\x0D\x0A
    2020-02-28T14:09:40.154Z DEBUG modem << 24 NRF_GPIOTE1          Non-Secure\x09OK\x0D\x0A
    2020-02-28T14:09:40.161Z DEBUG modem << 25 NRF_REGULATORS       Non-Secure\x09OK\x0D\x0A\x0D\x0A
    2020-02-28T14:09:40.163Z DEBUG modem << SPM: NS image at 0xc000\x0D\x0A
    2020-02-28T14:09:40.164Z DEBUG modem << SPM: NS MSP at 0x20023d90\x0D\x0A
    2020-02-28T14:09:40.166Z DEBUG modem << SPM: NS reset vector at 0xd0c9\x0D\x0A
    2020-02-28T14:09:40.168Z DEBUG modem << SPM: prepare to jump to Non-Secure image.\x0D\x0A
    2020-02-28T14:09:40.391Z DEBUG modem << *** Booting Zephyr OS build v2.1.99-ncs1  ***\x0D\x0A
    2020-02-28T14:09:40.410Z DEBUG modem << The MQTT simple sample started\x0D\x0A
    2020-02-28T14:09:40.412Z DEBUG modem << LTE Link Connecting ...\x0D\x0A
    2020-02-28T14:10:02.191Z DEBUG modem << +CEREG: 2,"A96B","02040471",9,0,0,"11100000","11100000"\x0D
    2020-02-28T14:10:03.711Z DEBUG modem << +CEREG: 1,"A96B","02040471",9,,,"11100000","11100000"\x0D\x0A
    2020-02-28T14:10:03.734Z DEBUG modem << LTE Link Connected!\x0D\x0A
    2020-02-28T14:10:03.735Z DEBUG modem << IPv4 Address found 137.135.83.217\x0D\x0A
    2020-02-28T14:11:03.981Z DEBUG modem << ERROR: mqtt_live -57\x0D\x0A
    2020-02-28T14:11:03.990Z DEBUG modem << Disconnecting MQTT client...\x0D\x0A
    2020-02-28T14:11:03.992Z DEBUG modem << Could not disconnect MQTT client. Error: -57\x0D\x0A
    

    It looks like same issue. I'm wondering now if that is not a problem with T-mobile...

  • Could you capture a modem trace where you hard code the IP address?

Reply Children
Related