NRF9160 - LTE-M takes a long time for first connection

Hi! We are currently testing our custom device using the nrf9160 modem. Our use case is for an ultralow power IoT device that connects to the Internet each 30 minutes to send some data and then goes back to sleep. We don’t use PSM, when the device goes back to sleep, we disconnect from the cloud and set the modem to flight mode. The device will be in a place with no coverage (a maritime container) for days or weeks, in which the device will be in “hibernation mode”, trying to connect to LTE-M each 4 hours.

We have seen that after the first connection, the device connects to the LTE-M network in less than 5 seconds but before that, the first connection takes a long time, around two minutes.

We are using the command AT+CGDCONT before every connection to set the APN hoping that it will decrease the time it takes for that first connection, but it doesn’t make a lot of difference. The device travels around the world, so we cannot lock the LTE-M bands nor the country.

Why does the first connection take a long time and the rest doesn’t? What are the best practices to reduce the time of that first connection? Are there any other AT commands that we can use to reduce that time?

Thank you and best regards

  • Hi,

    Yes, the initial connection with a new SIM card/in a new location might take a long time.

    One thing you can try, is to use the %XCOUNTRYDATA AT command to give the modem a bit more information about what bands it should search first in the given country.

    However, much of the cell and network selection procedure is controlled by the LTE spec., so there isn't much that can be done.

    Why does the first connection take a long time and the rest doesn’t?

    The modem will store information about the connected network (in flash if you disconenct with AT+CFUN=0), and use this information when re-connecting to the network.

    That way, it knows what network to search for, and where to find it, and it doesn't have to try other networks first.

    Best regards,

    Didrik

  • Hi! Thank you for your quick reply. Unfortunately, the devices travel all around the world so we cannot know in which country the device is in when it’s trying to connect. 

    Is there any other thing we can do to help the modem connect that first time?

    Best regards

  • Eneko said:
    Unfortunately, the devices travel all around the world so we cannot know in which country the device is in when it’s trying to connect. 

    The %XCOUNTRYDATA command doesn't lock the device to a single country. Instead, when the device detects that it is in a country with information from %XCOUNTRYDATA, it will search the bands set with the command first.

    You can provide information for up to 70 countries, so you should be able to cover the most likely countries.

  • Hi Didrik,

    I have been doing some connection tests with this command but unfortunately I haven't seen any difference between using it or not.

    If I don't use any commands and let the device connect to it's own to the network, it takes aproximately 1 minute and 25 seconds.

    Using this series of commands (I'm doing test in Spain) it takes 1 minute 20 seconds to connect:

    AT
    
    
    
    
    OK
    
    
    
    
    AT%XCOUNTRYDATA=1,"4,214,3,1207,20,6175"
    
    
    
    
    OK
    
    
    
    
    AT+CFUN=1
    
    
    
    
    OK
    
    
    
    

    So I'm not really seing a difference. I'm I doing something wrong? I'm I missing an intermediate command?

    Best regards

  • What SIM card are you using?

    How effective the use of %XCOUNTRYDATA is depends a lot on what SIM card you are using, and what networks the SIM card tells the modem to search for.

    One thing you can check is the first 5 or 6 digits of the IMSI (or is it a multi-IMSI SIM?), which tells you the home network of the SIM card, i.e. the network that the SIM card most wants to be connected to. The first 3 digits are the MCC, which represents the country, while the next 2 (European standard) or 3 (North American standard) represents the operator.

    A modem trace will also help show what the modem is doing while it is searching.

Related