nRF5 SDK is not maintained anymore
More Info: Consider nRF Connect SDK for new designs
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Check if 9160 LTE-M Connection has Become Unavailable

Hello,

I am using the 9160 with nRF Connect SDK 1.8.0 to connect to an LTE-M network.  I am currently using:

CONFIG_MQTT_KEEPALIVE=180 

to manage the keepalive timer, but was wondering if there are any methods of determining when LTE connection has been lost.  Ideally I want to keep the device always connected but I don't know how to detect when the LTE connection drops to implement some sort of error handling if the connection drops.  After looking through the LTE controller documentation (https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.6.0/nrf/include/modem/lte_lc.html) I didn't see anything for handling this and was wondering if there were any out of the box solutions for this.

Thanks,

Jake 

Parents Reply
  • Thanks for the response that's really helpful!

    So if the network goes out or connection is lost I assume it would change the 

    LTE_LC_EVT_NW_REG_STATUS to 
    LTE_LC_NW_REG_SEARCHING correct?  
    Will it automatically try to reconnect if this happens or does this need to be handled directly?  
    Is there a way to simulate the LTE-M network going down?  I'm not sure how to test the behavior.
Children
  • Hi,

     

    You will normally see _SEACHING (ie. AT+CEREG stat field = 2) first, and if there's no cell towers within range, you'll see _UNKNOWN (stat=4), and eventually it will go into NOT_REGISTERED state (stat=0).

    However, you can also get a _REGISTRATION_DENIED in cases where you try to roam to a network provider that does not accept your SIM card.

     

    jake11212 said:
    Will it automatically try to reconnect if this happens or does this need to be handled directly?  

    Yes, it will try to reconnect to a network.

    jake11212 said:
    Is there a way to simulate the LTE-M network going down?  I'm not sure how to test the behavior.

    A Faraday cage can be used for such testing to see how your application handles this specific scenario.

     

    Kind regards,

    Håkon

  • Okay that's everything I needed, thanks so much!

Related