Modem not trying other PLMN's if nw_mode is not included in the dataplan?

We're currently using a virtual operator as carrier, so our device is roaming in Finland. It seems that Elisa (24405) is the preferred network, but the data plan is restricted to LTE-M on Elisa network. The SIM does have NB-IoT enabled on DNA network (24412), and I can connect using NB-IoT and calling AT+COPS=1,2,"24412" manually.

It seems that the modem doesn't automatically try other networks after not being able to register to the primary. Is this an issue with the modem, network or the carrier profile?

Attached is the modem trace (Ignore the flight mode after 15 minutes, it is intentional). Modem fw 1.3.6, SDK version 2.6.1.

2024-09-17_ttyACM2_trace.bin 

  • JyriLehtinen said:
    Is there a reason why lte_lc_connect_async() doesn't behave the same or is something misbehaving?

    The lte_lc_connect_async() is essentially just sending AT+CFUN=1. 

    JyriLehtinen said:
    Calling AT+COPS=0 seemed to do the trick, device now connected to DNA network on NB-IoT

    After rebooting the device, do you still have a connection? In the .config file found in build/zephyr of you project folder, are you able to see if what CONFIG_LTE* that are set?

    Here is an example from a project I have:

    CONFIG_LTE_LINK_CONTROL=y
    # CONFIG_LTE_LOCK_BANDS is not set
    # CONFIG_LTE_LOCK_PLMN is not set
    # CONFIG_LTE_UNLOCK_PLMN is not set
    CONFIG_LTE_PSM_REQ=y
    CONFIG_LTE_PSM_REQ_FORMAT_STRING=y
    # CONFIG_LTE_PSM_REQ_FORMAT_SECONDS is not set
    CONFIG_LTE_PSM_REQ_RPTAU="11000001"
    CONFIG_LTE_PSM_REQ_RAT="00001010"
    CONFIG_LTE_PSM_REQ_RPTAU_SECONDS=1800
    CONFIG_LTE_PSM_REQ_RAT_SECONDS=60
    # CONFIG_LTE_PROPRIETARY_PSM_REQ is not set
    # CONFIG_LTE_EDRX_REQ is not set
    CONFIG_LTE_EDRX_REQ_VALUE_LTE_M="1001"
    CONFIG_LTE_EDRX_REQ_VALUE_NBIOT="1001"
    CONFIG_LTE_PTW_VALUE_LTE_M=""
    CONFIG_LTE_PTW_VALUE_NBIOT=""
    # CONFIG_LTE_NETWORK_MODE_DEFAULT is not set
    # CONFIG_LTE_NETWORK_MODE_LTE_M is not set
    # CONFIG_LTE_NETWORK_MODE_LTE_M_GPS is not set
    # CONFIG_LTE_NETWORK_MODE_NBIOT is not set
    # CONFIG_LTE_NETWORK_MODE_NBIOT_GPS is not set
    # CONFIG_LTE_NETWORK_MODE_LTE_M_NBIOT is not set
    CONFIG_LTE_NETWORK_MODE_LTE_M_NBIOT_GPS=y
    # CONFIG_LTE_MODE_PREFERENCE_AUTO is not set
    # CONFIG_LTE_MODE_PREFERENCE_LTE_M is not set
    # CONFIG_LTE_MODE_PREFERENCE_NBIOT is not set
    CONFIG_LTE_MODE_PREFERENCE_LTE_M_PLMN_PRIO=y
    # CONFIG_LTE_MODE_PREFERENCE_NBIOT_PLMN_PRIO is not set
    CONFIG_LTE_MODE_PREFERENCE_VALUE=3
    # CONFIG_LTE_RAI_REQ is not set
    CONFIG_LTE_RAI_REQ_VALUE="0"
    # CONFIG_LTE_NETWORK_USE_FALLBACK is not set
    CONFIG_LTE_NETWORK_TIMEOUT=600
    # CONFIG_LTE_LC_TAU_PRE_WARNING_NOTIFICATIONS is not set
    CONFIG_LTE_LC_TAU_PRE_WARNING_TIME_MS=5000
    CONFIG_LTE_LC_TAU_PRE_WARNING_THRESHOLD_MS=1200000
    CONFIG_LTE_NEIGHBOR_CELLS_MAX=10
    # CONFIG_LTE_LC_MODEM_SLEEP_NOTIFICATIONS is not set
    CONFIG_LTE_LC_MODEM_SLEEP_PRE_WARNING_TIME_MS=5000
    CONFIG_LTE_LC_MODEM_SLEEP_NOTIFICATIONS_THRESHOLD_MS=1200000
    # CONFIG_LTE_LC_TRACE is not set

    Thanks.

    Kind regards,
    Øyvind

  • The application code now calls COPS=0 while starting, so it's been able to connect consistently. In normal operation, I have CONFIG_LTE_NETWORK_MODE_LTE_M_NBIOT=y and LTE-M as preference, but for this test I've disabled LTE-M.

    CONFIG_LTE_CONNECT_RETRY_DELAY_S=120
    CONFIG_LTE_LINK_CONTROL=y
    # CONFIG_LTE_LOCK_BANDS is not set
    # CONFIG_LTE_LOCK_PLMN is not set
    # CONFIG_LTE_UNLOCK_PLMN is not set
    CONFIG_LTE_PSM_REQ=y
    CONFIG_LTE_PSM_REQ_FORMAT_STRING=y
    # CONFIG_LTE_PSM_REQ_FORMAT_SECONDS is not set
    CONFIG_LTE_PSM_REQ_RPTAU="11000001"
    CONFIG_LTE_PSM_REQ_RAT="00000101"
    CONFIG_LTE_PSM_REQ_RPTAU_SECONDS=1800
    CONFIG_LTE_PSM_REQ_RAT_SECONDS=60
    # CONFIG_LTE_PROPRIETARY_PSM_REQ is not set
    # CONFIG_LTE_EDRX_REQ is not set
    CONFIG_LTE_EDRX_REQ_VALUE_LTE_M="1001"
    CONFIG_LTE_EDRX_REQ_VALUE_NBIOT="1001"
    CONFIG_LTE_PTW_VALUE_LTE_M=""
    CONFIG_LTE_PTW_VALUE_NBIOT=""
    # CONFIG_LTE_NETWORK_MODE_DEFAULT is not set
    # CONFIG_LTE_NETWORK_MODE_LTE_M is not set
    # CONFIG_LTE_NETWORK_MODE_LTE_M_GPS is not set
    CONFIG_LTE_NETWORK_MODE_NBIOT=y
    # CONFIG_LTE_NETWORK_MODE_NBIOT_GPS is not set
    # CONFIG_LTE_NETWORK_MODE_LTE_M_NBIOT is not set
    # CONFIG_LTE_NETWORK_MODE_LTE_M_NBIOT_GPS is not set
    CONFIG_LTE_MODE_PREFERENCE_AUTO=y
    CONFIG_LTE_MODE_PREFERENCE_VALUE=0
    # CONFIG_LTE_RAI_REQ is not set
    CONFIG_LTE_RAI_REQ_VALUE="0"
    # CONFIG_LTE_NETWORK_USE_FALLBACK is not set
    CONFIG_LTE_NETWORK_TIMEOUT=300
    # CONFIG_LTE_LC_TAU_PRE_WARNING_NOTIFICATIONS is not set
    CONFIG_LTE_LC_TAU_PRE_WARNING_TIME_MS=5000
    CONFIG_LTE_LC_TAU_PRE_WARNING_THRESHOLD_MS=1200000
    CONFIG_LTE_NEIGHBOR_CELLS_MAX=10
    # CONFIG_LTE_LC_MODEM_SLEEP_NOTIFICATIONS is not set
    CONFIG_LTE_LC_MODEM_SLEEP_PRE_WARNING_TIME_MS=5000
    CONFIG_LTE_LC_MODEM_SLEEP_NOTIFICATIONS_THRESHOLD_MS=1200000
    # CONFIG_LTE_LC_TRACE is not set
    # CONFIG_LTE_LINK_CONTROL_LOG_LEVEL_OFF is not set
    # CONFIG_LTE_LINK_CONTROL_LOG_LEVEL_ERR is not set
    # CONFIG_LTE_LINK_CONTROL_LOG_LEVEL_WRN is not set
    # CONFIG_LTE_LINK_CONTROL_LOG_LEVEL_INF is not set
    # CONFIG_LTE_LINK_CONTROL_LOG_LEVEL_DBG is not set
    CONFIG_LTE_LINK_CONTROL_LOG_LEVEL_DEFAULT=y
    CONFIG_LTE_LINK_CONTROL_LOG_LEVEL=3

    If I re-enable LTE-M and set it as preference, the device will join DNA (24412) over LTE-M. Makes sense, as it was the PLMN it was previously connected to.

    By manually connecting to Elisa (24405), then removing the "AT+COPS=1,2,24405", reflashing with NB-Iot only, it does manage to connect to DNA over NB-IoT, without explicit AT+COPS=0, just the  lte_lc_connect_async()

    As I'm unable to replicate the original issue with this device, I think it might have been because the device in question had never connected to DNA before, and for some reason didn't try. I think I need to get a fresh device at some point and try to replicate the issue.

  •  Thanks for the info. Good to hear that AT+COPS=0 fixed the issue on your side. The CONFIG_LTE_UNLOCK_PLMN=y is equivalent to AT+COPS=0 in the LTE link controller. 

    JyriLehtinen said:
    The application code now calls COPS=0 while starting, so it's been able to connect consistently.

    Just an FYI, as long as you do not often use PLMN lock there is no reason to call this on every startup of the application. 

    Kind regards,
    Øyvind

  • Great. I'll report back when I've tested with a fresh device whether I can replicate the original issue.
    After that I'll change the CONFIG_LTE_UNLOCK_PLMN=y in the prj.conf and remove the AT+COPS=0-call.

Related