nrf9160 mfw 1.3.5 CEREG: 2 Not registered is unrecoverable.

EDIT:

After getting more logging data. I see that the connection is established again seconds after unregistered occurred.

The problem is when Resolving IP address for the Azure IoT Hub: <err> azure_iot_hub_mqtt: getaddrinfo() failed, error -2

Hi,

I'm have a problem where if the CEREG notification is status 2 (Not registered, but UE is currently trying to attach or searching an operator to
register to) I'm not able to establish a connection again.

I have a project where the system is running perfectly for up to hours 58+ hours. Sending information to Azure IoT Hub each minute.

When the CEREG changes to stat 2 afterwords no more message transmission are successful.

How to recover from a CEREG: 2?

Info:
Custom board using: nrf9160
Modem FW: 1.3.5
NCS: 2.2.0

Thank you in advance.

BR. Replay

Parents
  • When trying to reconnect to the Azure IoT Hub, after connection the cell tower was lost for a short period of time, the user name is no longer the same. It's missing a part in the end of string. The string length is reported to be the same in both cases.

    NOTE: The missing .net... from the failure printout.

    Success:
    <dbg> azure_iot_hub: iot_hub_state_set: State transition: STATE_DISCONNECTED --> STATE_CONNECTING
    <dbg> CloudHdlr: HandleAzureEvent: AZURE_IOT_HUB_EVT_CONNECTING
    <dbg> azure_iot_hub_mqtt: mqtt_state_set: State transition: MQTT_STATE_UNINIT --> MQTT_STATE_DISCONNECTED
    <dbg> azure_iot_hub: azure_iot_hub_connect: User name: <redacted>.azure-devices.net/<redacted>/<redacted>-beta.2
    <dbg> azure_iot_hub: azure_iot_hub_connect: User name buffer size is 128, actual user name size is: 116
    <dbg> azure_iot_hub_mqtt: broker_init: Resolving IP address for <redacted>.azure-devices.net
    
    Failure:
    <dbg> azure_iot_hub: iot_hub_state_set: State transition: STATE_DISCONNECTED --> STATE_CONNECTING
    <dbg> CloudHdlr: HandleAzureEvent: AZURE_IOT_HUB_EVT_CONNECTING
    <dbg> azure_iot_hub_mqtt: mqtt_state_set: Skipping transition to the same state (MQTT_STATE_DISCONNECTED)
    <dbg> azure_iot_hub: azure_iot_hub_connect: User name: <redacted>.azure-devices
    <dbg> azure_iot_hub: azure_iot_hub_connect: User name buffer size is 128, actual user name size is: 116
    <dbg> azure_iot_hub_mqtt: broker_init: Resolving IP address for <redacted>.azure-devices
    <err> azure_iot_hub_mqtt: getaddrinfo() failed, error -2


    When trying to reconnect the I'm using the same config as first time connecting.

Reply
  • When trying to reconnect to the Azure IoT Hub, after connection the cell tower was lost for a short period of time, the user name is no longer the same. It's missing a part in the end of string. The string length is reported to be the same in both cases.

    NOTE: The missing .net... from the failure printout.

    Success:
    <dbg> azure_iot_hub: iot_hub_state_set: State transition: STATE_DISCONNECTED --> STATE_CONNECTING
    <dbg> CloudHdlr: HandleAzureEvent: AZURE_IOT_HUB_EVT_CONNECTING
    <dbg> azure_iot_hub_mqtt: mqtt_state_set: State transition: MQTT_STATE_UNINIT --> MQTT_STATE_DISCONNECTED
    <dbg> azure_iot_hub: azure_iot_hub_connect: User name: <redacted>.azure-devices.net/<redacted>/<redacted>-beta.2
    <dbg> azure_iot_hub: azure_iot_hub_connect: User name buffer size is 128, actual user name size is: 116
    <dbg> azure_iot_hub_mqtt: broker_init: Resolving IP address for <redacted>.azure-devices.net
    
    Failure:
    <dbg> azure_iot_hub: iot_hub_state_set: State transition: STATE_DISCONNECTED --> STATE_CONNECTING
    <dbg> CloudHdlr: HandleAzureEvent: AZURE_IOT_HUB_EVT_CONNECTING
    <dbg> azure_iot_hub_mqtt: mqtt_state_set: Skipping transition to the same state (MQTT_STATE_DISCONNECTED)
    <dbg> azure_iot_hub: azure_iot_hub_connect: User name: <redacted>.azure-devices
    <dbg> azure_iot_hub: azure_iot_hub_connect: User name buffer size is 128, actual user name size is: 116
    <dbg> azure_iot_hub_mqtt: broker_init: Resolving IP address for <redacted>.azure-devices
    <err> azure_iot_hub_mqtt: getaddrinfo() failed, error -2


    When trying to reconnect the I'm using the same config as first time connecting.

Children
No Data
Related