Modem events in case of network issues

Hello,

we're developing a NB-IoT application using the nrf9160 and the nrf modem library.

Let’s suppose the modem is in PSM and due to reception/network issues it cannot send the TAU at the scheduled time.
1) What would happen?
2) What kind of event would I receive in the application's registered lte events handler?
3) In case the modem is disconnected from the LTE network, would the library attempt to reconnect automatically or should I perform a new lte_lc_connect_async() call?
4) What event signals a disconnection from the LTE network? LTE_LC_EVT_CELL_UPDATE with an invalid cell id?

Thanks for your help!

Marco

Parents
  • Hi Marco,

    Sorry for the delay. Just letting you know we are working on this and will get back to you.

    Håkon

  • Hi Marco,

    3) In case the modem is disconnected from the LTE network, would the library attempt to reconnect automatically
    The modem will automatically try to reconnect/search for a new network, as long as it is running.
    The device will not be able to send or receive any data. It might take some tome before the connection loss is registered/reported. Usually CELL_UPDATE with invalid cell id as well as LTE_LC_NW_REG_SEARCHING means that you are currently not connected to a network. Testing your situation would probably give us some answers.
  • Thank you.

    About the CELL_UPDATE and LTE_LC_NW_REG_SEARCHING events I have another question:

    Let's say that the modem returned a valid cell id and the LTE_LC_EVT_NW_REG_STATUS event was reported with either LTE_LC_NW_REG_REGISTERED_HOME or LTE_LC_NW_REG_REGISTERED_ROAMING. This is the condition where I considered the modem "connected", is this right?

    Now let's say that I receive a CELL_UPDATE event with an invalid cell id. This means that the modem got disconnected. The question is: will I also receive the LTE_LC_NW_REG_SEARCHING event?

    Moreover, same situation as before but now the CELL_UPDATE contains a valid cell ID. Can the modem change the cell it is attached to without firing a LTE_LC_NW_REG_SEARCHING in the process?

    Thanks

  • Hi Marco,

    Sorry for the delay. I will get back to you.

  • Hi Marco, sorry for the delay.

    Marco La Grassa said:
    Let's say that the modem returned a valid cell id and the LTE_LC_EVT_NW_REG_STATUS event was reported with either LTE_LC_NW_REG_REGISTERED_HOME or LTE_LC_NW_REG_REGISTERED_ROAMING. This is the condition where I considered the modem "connected", is this right?

    Yes, that is correct.

    Marco La Grassa said:
    Now let's say that I receive a CELL_UPDATE event with an invalid cell id. This means that the modem got disconnected. The question is: will I also receive the LTE_LC_NW_REG_SEARCHING event?

    No, this can mean that you have either connected to a new cell, or that you have been in PSM mode for such a long time that you cannot guarantee that you can reconnect to the same cell tower again.

    If you afterwards get _SEARCHING back: https://github.com/nrfconnect/sdk-nrf/blob/v2.1.0/include/modem/lte_lc.h#L33

    Then it means that the AT+CEREG has changed to status '2', ie. you are now searching for a new network.

    Marco La Grassa said:
    Moreover, same situation as before but now the CELL_UPDATE contains a valid cell ID. Can the modem change the cell it is attached to without firing a LTE_LC_NW_REG_SEARCHING in the process?

    If "mobility" is supported, ie. that the device can seamlessly be transferred from one cell tower to another.
    NB-IoT does not support mobility, so you shall go from _REGISTERED_* to _SEARCHING.

    Marco La Grassa said:
    You wrote "The modem will automatically try to reconnect/search for a new network, as long as it is running". What do you mean by "as long as it is running" ?.

    As long as the modem is enabled (CFUN=1).

    Marco La Grassa said:
    If I understand your answer correctly, i don't need any watchdog (or similar) to monitor the status of the network connection, since the modem will always try to re-attach in case it gets disconnected. Am i right?

    This is up to you, depending on what you require in terms of responsiveness in your application.

  • Ok, so is it correct to say that CELL_UPDATE with an invalid cell ID (-1) means that the modem is not connected to the network?

    If not, what is the appropriate procedure to understand if the modem is connected?

    The use case would be something like:

    modem connected -> start a timer that sends data periodically to a server

    modem disconnected -> stop the previously started timer

    modem connected again -> restart the timer.

    etc.

Reply
  • Ok, so is it correct to say that CELL_UPDATE with an invalid cell ID (-1) means that the modem is not connected to the network?

    If not, what is the appropriate procedure to understand if the modem is connected?

    The use case would be something like:

    modem connected -> start a timer that sends data periodically to a server

    modem disconnected -> stop the previously started timer

    modem connected again -> restart the timer.

    etc.

Children
Related