Seeking Recommendations for LTE Network Timeout Configuration

Background

Our device uses the CONFIG_LTE_NETWORK_TIMEOUT option from LTE Link Control, which by default is set to 600 seconds (10 minutes). I haven’t found any specific recommendations for this timeout value, and all Nordic samples appear to use the default.

Currently, we use the default 600-second timeout. If the device cannot connect, it retries with an increasing delay: 10 seconds, 60 seconds, 10 minutes, 30 minutes, and so on, up to 24 hours. However, this approach leads to rapid battery drain if the device is out of network coverage.

In the office, devices usually connect within 2–10 seconds, but sometimes it takes up to 30 seconds or more. Field behavior is less predictable.

Request

Do you have any recommendations for an appropriate value for CONFIG_LTE_NETWORK_TIMEOUT?
The devices will be deployed globally, so using a band lock is not ideal due to varying regional bands.
The nRF Connect SDK v2.6.0 is in use.

Relevant Code Snippet
static uint32_t get_next_reconnect_delay_in_sec(int attempt_number)
{
    switch (attempt_number) {
    case 0:
    case 1:
        return RECONNECT_DELAY_10_SEC;
    case 2:
        return RECONNECT_DELAY_60_SEC;
    case 3:
        return RECONNECT_DELAY_10_MINS;
    case 4:
        return RECONNECT_DELAY_30_MINS;
    case 5:
        return RECONNECT_DELAY_1_HOUR;
    case 6:
        return RECONNECT_DELAY_2_HOUR;
    case 7:
        return RECONNECT_DELAY_6_HOURS;
    case 8:
        return RECONNECT_DELAY_12_HOUR;
    case 9:
        return RECONNECT_DELAY_24_HOUR;
    default:
        return RECONNECT_DELAY_24_HOUR;
    }
}

static int modem_service_start_modem(void)
{
    static int attempt_number;
    uint32_t reconnect_delay;

    LOG_INF("Connecting to LTE network");
    for (;;) {
        int err = lte_lc_connect();
        if (!err) {
            break;
        }
        if (err == -ETIMEDOUT) {
            // Timeout error: Modem could not connect within CONFIG_LTE_NETWORK_TIMEOUT
            // (default is 600 seconds)
            // TODO: Consider reducing CONFIG_LTE_NETWORK_TIMEOUT to save power
            LOG_WRN("LTE connection attempt number %d failed!", attempt_number);
            attempt_number++;
            reconnect_delay = get_next_reconnect_delay_in_sec(attempt_number);
            LOG_DBG("Next connection attempt in %u seconds", reconnect_delay);
            k_sleep(K_SECONDS(reconnect_delay));
            LOG_DBG("Reattempting LTE connection ...");
            continue;
        }

        LOG_ERR("LTE connection attempt failed: %d", err);
        return err;
    }

    LOG_INF("LTE connection established");
    attempt_number = 0; // Reset attempt counter after success
    ...
}


Regards,
Tareq

Parents
  • Hello,

    Do you have any recommendations for an appropriate value for CONFIG_LTE_NETWORK_TIMEOUT?

    It is quite hard to suggest anything concrete here, unless I know exactly what sort of conditions you expect to use the modem. I believe the default value should be left untouched, as it is optimized to work for the general case. And as it seems you are not targeting a particular type of area, then I think the default value should be good.

    Also, consider using periodic search configuration. That can further improve power consumption in network searches. You can look at Øyvinds response here.

  •   Thank you very much for your response, i will have a look at the periodic search config.

    I still have questions regarding the current consumption during attempting to connect to the network (with 10 min timeout). Most of the time in case there is no network coverage i record the following pattern of the current consumption during the 10 min attempt. Can you explain what the modem exactly do in these 10 min? Does it continuously scan/search for a network, does it use different band for the search ... ? 

    current_consumption_pattern_of_one_connenction_attempt (10 min)
    Logs of this failed attempt:

    [00:10:01.715,026] <dbg> modem_service: modem_service_start_modem: Next connection attempt in 1 seconds
    [00:10:02.715,118] <dbg> modem_service: modem_service_start_modem: Reattempting to establish LTE connection ...
    [00:10:02.725,982] <inf> modem_service: LTE_LC_EVT_MODEM_SLEEP_ENTER: FLIGHT_MODE (-1 ms)
    [00:10:02.756,805] <inf> modem_service: LTE_LC_EVT_MODEM_SLEEP_EXIT
    [00:13:25.742,156] <inf> modem_service: LTE_LC_EVT_NW_REG_STATUS: UNKNOWN
    [00:20:02.856,781] <inf> lte_lc: Network connection attempt timed out
    [00:20:02.875,610] <inf> modem_service: LTE_LC_EVT_NW_REG_STATUS: NOT_REGISTERED
    [00:20:02.901,794] <wrn> modem_service: LTE connection attempt number 1 failed!
    


    Another 10 minutes failed attempt but with slightly different pattern and higher current consumption was recorded

    The logs from this attempt are also slightly different from the first one
    [11:11:16.849,822] <dbg> modem_service: modem_service_start_modem: Next connection attempt in 43200 seconds
    [23:11:16.849,945] <dbg> modem_service: modem_service_start_modem: Reattempting to establish LTE connection ...
    [23:11:16.860,900] <inf> modem_service: LTE_LC_EVT_MODEM_SLEEP_ENTER: FLIGHT_MODE (-1 ms)
    [23:11:16.891,784] <inf> modem_service: LTE_LC_EVT_MODEM_SLEEP_EXIT
    [23:11:18.673,736] <inf> modem_service: LTE_LC_EVT_NW_REG_STATUS: SEARCHING
    [23:14:26.226,898] <inf> modem_service: LTE_LC_EVT_NW_REG_STATUS: UNKNOWN
    [23:19:10.506,134] <inf> modem_service: LTE_LC_EVT_NW_REG_STATUS: SEARCHING
    [23:19:10.506,195] <inf> modem_service: LTE_LC_EVT_CELL_UPDATE: MCC: 0, MNC: 0, TAC: 44934, RSSI: -140 dBm
    [23:19:10.506,256] <inf> modem_service: LTE_LC_EVT_LTE_MODE_UPDATE: NB-IoT
    [23:21:16.991,760] <inf> lte_lc: Network connection attempt timed out
    [23:21:30.899,230] <inf> modem_service: LTE_LC_EVT_NW_REG_STATUS: NOT_REGISTERED
    [23:21:30.899,291] <inf> modem_service: LTE_LC_EVT_CELL_UPDATE: MCC: 0, MNC: 0, TAC: 4294967295, RSSI: -140 dBm
    [23:21:30.899,353] <inf> modem_service: LTE_LC_EVT_LTE_MODE_UPDATE: NONE
    [23:21:30.909,332] <wrn> modem_service: LTE connection attempt number 9 failed!
    

    I am trying to understand what is the deference between the two attempts and why the current consumption in the second one is higher than in the first one?
    Does the modem consume more power during attempting to attach to a network than scanning for a network?
    If that is the case then the reason might be that in the second attempt the modem found a network at the end of the 10 min interval and tired to attach to it but it failed to do that within the 10 min interval.
    Could that be the reason for the higher consumption at the end of the interval ?

Reply
  •   Thank you very much for your response, i will have a look at the periodic search config.

    I still have questions regarding the current consumption during attempting to connect to the network (with 10 min timeout). Most of the time in case there is no network coverage i record the following pattern of the current consumption during the 10 min attempt. Can you explain what the modem exactly do in these 10 min? Does it continuously scan/search for a network, does it use different band for the search ... ? 

    current_consumption_pattern_of_one_connenction_attempt (10 min)
    Logs of this failed attempt:

    [00:10:01.715,026] <dbg> modem_service: modem_service_start_modem: Next connection attempt in 1 seconds
    [00:10:02.715,118] <dbg> modem_service: modem_service_start_modem: Reattempting to establish LTE connection ...
    [00:10:02.725,982] <inf> modem_service: LTE_LC_EVT_MODEM_SLEEP_ENTER: FLIGHT_MODE (-1 ms)
    [00:10:02.756,805] <inf> modem_service: LTE_LC_EVT_MODEM_SLEEP_EXIT
    [00:13:25.742,156] <inf> modem_service: LTE_LC_EVT_NW_REG_STATUS: UNKNOWN
    [00:20:02.856,781] <inf> lte_lc: Network connection attempt timed out
    [00:20:02.875,610] <inf> modem_service: LTE_LC_EVT_NW_REG_STATUS: NOT_REGISTERED
    [00:20:02.901,794] <wrn> modem_service: LTE connection attempt number 1 failed!
    


    Another 10 minutes failed attempt but with slightly different pattern and higher current consumption was recorded

    The logs from this attempt are also slightly different from the first one
    [11:11:16.849,822] <dbg> modem_service: modem_service_start_modem: Next connection attempt in 43200 seconds
    [23:11:16.849,945] <dbg> modem_service: modem_service_start_modem: Reattempting to establish LTE connection ...
    [23:11:16.860,900] <inf> modem_service: LTE_LC_EVT_MODEM_SLEEP_ENTER: FLIGHT_MODE (-1 ms)
    [23:11:16.891,784] <inf> modem_service: LTE_LC_EVT_MODEM_SLEEP_EXIT
    [23:11:18.673,736] <inf> modem_service: LTE_LC_EVT_NW_REG_STATUS: SEARCHING
    [23:14:26.226,898] <inf> modem_service: LTE_LC_EVT_NW_REG_STATUS: UNKNOWN
    [23:19:10.506,134] <inf> modem_service: LTE_LC_EVT_NW_REG_STATUS: SEARCHING
    [23:19:10.506,195] <inf> modem_service: LTE_LC_EVT_CELL_UPDATE: MCC: 0, MNC: 0, TAC: 44934, RSSI: -140 dBm
    [23:19:10.506,256] <inf> modem_service: LTE_LC_EVT_LTE_MODE_UPDATE: NB-IoT
    [23:21:16.991,760] <inf> lte_lc: Network connection attempt timed out
    [23:21:30.899,230] <inf> modem_service: LTE_LC_EVT_NW_REG_STATUS: NOT_REGISTERED
    [23:21:30.899,291] <inf> modem_service: LTE_LC_EVT_CELL_UPDATE: MCC: 0, MNC: 0, TAC: 4294967295, RSSI: -140 dBm
    [23:21:30.899,353] <inf> modem_service: LTE_LC_EVT_LTE_MODE_UPDATE: NONE
    [23:21:30.909,332] <wrn> modem_service: LTE connection attempt number 9 failed!
    

    I am trying to understand what is the deference between the two attempts and why the current consumption in the second one is higher than in the first one?
    Does the modem consume more power during attempting to attach to a network than scanning for a network?
    If that is the case then the reason might be that in the second attempt the modem found a network at the end of the 10 min interval and tired to attach to it but it failed to do that within the 10 min interval.
    Could that be the reason for the higher consumption at the end of the interval ?

Children
  • tareq_itx said:
    I am trying to understand what is the deference between the two attempts and why the current consumption in the second one is higher than in the first one?

    The reason you are seeing a higher current draw in the second graph is because in the second attempt the modem actually finds a signal. And when the modem receives a signal it will try to send out a connection request. Those are the 300 mA spikes you are seeing the second graph.This is also why you get

    [23:19:10.506,195] <inf> modem_service: LTE_LC_EVT_CELL_UPDATE: MCC: 0, MNC: 0, TAC: 44934, RSSI: -140 dBm

    in the log. That's from the received signal.

    In the first attempt the modem does not detect any signal whatsoever, so it just keeps scanning with 40-50 mA RX output.

    But -140 dB RSSI seems rather low, so that can be the reason why it is not able to connect. I think the CONEVAL command can be useful for determining the energy efficiency of your searches, and evaluating the signal conditions before trying to connect. This is something you should consider using in your application.

Related