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 Didrik,

    I'm using a 1nce SIM card. The MCC is 901 which according to 1nce information is "Worldwide Shared Mobile Country Code" (see this link).

    Regarding the modem trace I'm not sure I understand the proccess. As far as I know I need 2 UART, one for the AT commands and another one for the trace. But our custom board only has one UART (UART0). Can I get the trace with only one UART?

    I've been trying different configurations to improve the connection time. It seems using the XBANDLOCK command and locking bands 3 and 20 (used here in Spain) the time improves a lot, from more than 1 min to less than 30 seconds. I thought XBANDLOCK command and XCOUNTRYDATA command did the same: lock the search to the given bands. Am I missing something?

    Best regards.

  • Eneko said:
    I've been trying different configurations to improve the connection time. It seems using the XBANDLOCK command and locking bands 3 and 20 (used here in Spain) the time improves a lot, from more than 1 min to less than 30 seconds. I thought XBANDLOCK command and XCOUNTRYDATA command did the same: lock the search to the given bands. Am I missing something?

    %XBANDLOCK limits what bands the nRF9160 will use. The fewer bands that are enabled, the fewer bands it will have to search through, and the faster a suitable network will be found.

    %XCOUNTRYDATA on the other, simply changes the priority in which the enabled bands are searched through. It doesn't restrict which bands can be used. However, much of the network search process is also controlled by the LTE specification, so e.g. in this case, where the home network of the SIM card is a "global" network, the modem will have to search for that network first. If the SIM card had had a different home network, you would probably have seen a bigger improvement.

    Eneko said:
    Regarding the modem trace I'm not sure I understand the proccess. As far as I know I need 2 UART, one for the AT commands and another one for the trace. But our custom board only has one UART (UART0). Can I get the trace with only one UART?

    You only need one UART to take a modem trace. With an extra one, the Cellular Monitor is able to send some At commands to make sure that some information is available in the trace (and so that the Cellular Monitor is able to read the information out of the trace), but it is not strictly necessary.

    One other detail to be aware of, is that unless you are using NCS v2.5.0 which just released, the UART modem trace backend is hardcoded to use UART1. It works with the other UART instances as well, you will just have to change the code manually. Or, you can change the pins, so that UART1 uses the pins you usually use for UART0.

    Another option is to capture the trace over RTT instead. That way, you don't need to make any changes to how you use the peripherals of the nRF9160.

    But, with the home network of the SIM card being a "global" network, I doubt a modem trace will give us much more information.

  • Hi Dridik,

    Thank you so much for the explanation. 

    I updated the modem firmware to v1.3.5 as the modem won't search for PLMN started with 901.

    See mfw_nrf9160_1.3.5_release_notes.txt:

    - Fix for higher priority PLMN search. Global PLMN IDs (start with digit 9) are no more
      automatically considered to be suitable for higher priority PLMN search and selection.

    I'm using an iBasis SIM for comparation. For emulate the first connection I'm switching both SIMs to see the time. The iBasis SIM takes less than 20s to make the first connection.

    But with 1nce SIM don't see any improvement. It takes the same time (around 1:20 min) to connect using automatic network selection (+COPS=0).

    The second connection (resetting the MCU) takes almost no time with both SIM cards.

    If I change to 1nce SIM after connecting using iBasis it takes again 1:20 mins even if it's connecting to the same PLMN used by iBasis SIM.

    Could this behaviour mean the modem is still trying to connect to the Global home network (901)?

    Thank you for your help.

    Best regards.

  • Hi Didrik,

    Have you been able to look at this?

    Best regards!

  • Sorry for the late response.

    There might be other reasons for why the 1once SIM takes longer to connect to a network than just the time it takes to search for it.

    Could you take a modem trace, so we can look at what happens on the modem and SIM side?

Related