nrf9151 LTE-M Connection issue: getaddrinfo() failed, error -11

Hi,

there are several devices with same Firmware/Modem firmware/Hardware. All device were working. While all others continue to work, one suddenly gives me this:

mqtt_helper: getaddrinfo() failed, error -11

Once this error appears, I can not get the device back to working by reconnection attempts or even watchdog reset.

All devices are all in same place and the log of a working device looks same in terms of XMonitor/Network info etc. So I'm not sure why one fails. Is this a firmware issue? Or maybe network?

I'm aware of https://devzone.nordicsemi.com/f/nordic-q-a/60825/nrf9160-getaddrinfo-return-error--11 and https://devzone.nordicsemi.com/f/nordic-q-a/50029/nrf9160-modem-firmware-v1-0-0-setting-custom-dns-server/235419#235419 but not sure if that is what is needed here.

Full log (Firmware based on mqtt sample):

[02:28:45.583,343] <inf> application_states: Current state: APP_STATES_WAIT_FOR_NETWORK_STATE
[02:28:45.583,404] <inf> network: Network task starting
[02:28:45.583,404] <inf> network: Bringing network interface up
[02:28:45.627,075] <inf> network: Network ready
[02:28:45.627,136] <inf> application_states: Initializing Modem
[02:28:45.801,300] <inf> application_states: Modem command AT+CFUN=0 sent successfully
[02:28:45.808,227] <inf> application_states: Modem command AT+CGDCONT=1,"IP","iot.1nce.net" sent successfully
[02:28:45.808,685] <inf> application_states: Modem command AT+COPS=0 sent successfully
[02:28:45.810,028] <inf> application_states: Modem command AT%XBANDLOCK=0 sent successfully
[02:28:45.847,747] <inf> application_states: Modem command AT+CFUN=1 sent successfully
[02:28:45.851,501] <inf> application_states: Network search triggered
[02:28:45.851,501] <inf> connection_retry: Phase 2: LONG timeouts (network: 300000 ms, mqtt: 60000 ms)
[02:28:45.851,531] <inf> application_states: Waiting for network connection for 300000 ms
[02:28:45.852,416] <inf> network: LTE registration status unknown (out of coverage?)
+CGEV: EXCE STATUS 0
+CEREG: 2,"63AA","01FAA503",7
%MDMEV: PRACH CE-LEVEL 0
[02:28:46.942,504] <inf> network: Unhandled modem event type: 6
[02:28:46.970,031] <inf> network: LTE interface not registered, searching for operator
+CSCON: 1
+CGEV: ME PDN ACT 0,0
+CNEC_ESM: 50,0
%MDMEV: SEARCH STATUS 2
+CEREG: 5,"63AA","01FAA503",7,,,"00000000","00101000"
[02:28:48.864,257] <inf> cloud_connection: Network connectivity gained!
%XTIME: "80","62405240034080","01"
[02:28:48.884,735] <inf> network: LTE interface is connected (Roaming)
[02:28:48.884,735] <inf> application_states: Network is connected
[02:28:48.884,735] <inf> application_states: Updating last EEPROM entry with fresh modem data (Phase 2)
[02:28:48.901,519] <inf> modem_time: DATE_TIME_OBTAINED_MODEM
[02:28:48.901,885] <inf> modem_time: current_modem_ts: 1777091403859, last_modem_ts: 1777089604782 | Current time: 2026-04-25 04:30:03, Last time: 2026-04-25 04:00:04
[02:28:48.912,170] <inf> modem_info2: Battery voltage: 4359 mV
[02:28:48.960,876] <inf> modem_info2: xmonitor raw: %XMONITOR: 5,"","","26201","63AA",7,3,"01FAA503",321,1300,45,48,"","00000000","00101000","01011111"
OK
[02:28:48.961,914] <inf> network: Network search done
[02:28:48.989,685] <inf> transport: EEPROM: unsent=6 health=OK current_stored=yes
[02:28:49.092,620] <inf> transport: Loading 6 historical entries into TX queue (6 unsent total)
[02:28:49.092,620] <inf> transport: Unsent index 25 is the current sample – skipping from history
[02:28:49.109,985] <inf> transport: Current sample: Phase-2 from EEPROM index 25
[02:28:49.110,015] <inf> transport: TX queue built: 6 entries total (5 historical + current)
[02:28:49.110,015] <inf> application_states: TX queue prepared: 6 entries
[02:28:49.110,046] <inf> application_states: Current state: APP_STATES_WAIT_FOR_MQTT_CONNECTED_STATE
[02:28:49.110,076] <inf> transport: Connect work scheduled (result=1)
[02:28:49.110,107] <inf> application_states: Waiting for MQTT connection for 60000 ms
[02:28:49.119,384] <inf> transport: Token from NVS: 1rv... (20 chars)
[02:28:49.119,445] <inf> transport: Connecting to mqtt.eu.thingsboard.cloud:8883 (client=355565934862880 TLS=yes)
[02:28:49.864,410] <inf> network: Network connectivity established
[02:29:34.127,441] <err> mqtt_helper: getaddrinfo() failed, error -11
[02:29:34.127,471] <err> transport: mqtt_helper_connect error: 11
[02:29:34.127,502] <wrn> diagnostics: [TRANSPORT] ERROR Code:16
+CSCON: 0
[02:29:49.187,622] <err> application_states: MQTT connection timeout after 60000 ms
[02:29:49.187,683] <wrn> diagnostics: [APP_STATES] ERROR Code:4
[02:29:49.187,713] <inf> application_states: Aborting hanging MQTT connection attempt
[02:29:49.187,713] <inf> transport: Disconnecting MQTT
[02:29:49.187,774] <err> mqtt_helper: Library is in the wrong state (MQTT_STATE_DISCONNECTED), MQTT_STATE_CONNECTED required
[02:29:49.187,774] <inf> transport: MQTT disconnect initiated
[02:29:49.187,835] <wrn> diagnostics: [APP_STATES] WARNING Code:18
[02:29:49.187,957] <wrn> diagnostics: [APP_STATES] WARNING Code:19
[02:29:49.187,957] <inf> application_states: MQTT connection failed. Checking for FOTA updates (uses different auth)
[02:29:49.187,988] <inf> application_states: Current state: APP_STATES_SLEEP_STATE
[02:29:49.188,018] <inf> network: Network deinitialized
[02:29:49.188,018] <inf> application_states: Deinitializing Modem: (CFUN=4)
%MDMEV: PRACH CE-LEVEL 0
[02:29:49.802,612] <inf> network: Unhandled modem event type: 6
+CSCON: 1
+CEREG: 0
+CGEV: ME DETACH
[02:29:49.835,479] <inf> cloud_connection: Network connectivity lost!
[02:29:49.835,510] <inf> cloud_connection: Disconnecting from nRF Cloud
[02:29:49.835,540] <inf> network: Network connectivity lost
[02:29:49.835,723] <inf> transport: Network disconnected, cancelled connect work
+CSCON: 0
%MDMEV: SEARCH STATUS 2

Best

Parents Reply
  • Artnia said:
    thank you very much for the hint! A wrong SIM was inserted. With the right SIM everything works as expected.

    That is great news! Glad to hear you found the culprit.

    Artnia said:
    is this the error we should expect?

    Yes, as far as I can tell, this is often an indication to an issue with the SIM. 

    Artnia said:
    Or is the only way to track the SIM via SIM provider?

    Yes, this seems to be the only option at the moment. 

    Kind regards,
    Øyvind

Children
No Data
Related