nRF91 modem connection blackout after SIM disable loops

Hello! 

Based on some tests, I've seen that modem disables attach logic for at least half an hour in case it has tried to connect to network at least twice with disabled SIM. My assumption is that the same Modem Reset Loop restriction kicks in, because even the SIM is again enabled, modem need to be running for some time (once it was around 30 minutes, sometimes its longer) before it can again establish connection successfully or AT%XFCTORYRESET=0 need to be issued to modem - the same behavior as with reset loop restriction. I have seen the same issue on multiple devices

As far as my testing went I did not manage to receive any specific notification about this event by setting %MDMEV=2 AT command (I was kinda hoping to see LTE_LC_MODEM_EVT_RESET_LOOP). 

The SIM disabling is a necessary feature for devices that are not used in field, so that we don't have to pay for data, that actually are not necessary. Turning off the device in that case is not an option. 

It is pretty easy to replicate. Program the sample on device, disable SIM and let connect logic go in a loop few times. If you let only one connection loop to go thru, after power reset device manages to regain connection to network. I let it run for 3 loops, then enabled SIM and did a power reset. The mentioned timeout appears only after at least 2 (based on couple of tests) unsuccessful connect events. And no this is not the actual modem loop reset restriction because of the resets, in field device is never reset manually, I tested our FW with a continuously running device firmware which has a connect/reconnect logic with timeouts implemented and the same timeout appeared.
I am using mfw_nrf91x1_2.0.4 and nRF SDK v3.2.4
Question is can I somehow detect when this happens on MCU side? Because currently it brings in a connection delay. We have a battery powered device and keeping the modem on for 30 minutes non stop is not really an option here. As mentioned we have implemented reconnect/retry logic with increasing timeout attempts (modem shut down gracefully between each attempt) and with that device connects to server almost half day later when SIM was enabled and device had power reset.
Parents
  • Hello, 

    Can you please provide application logs and/or modem trace from when you are seeing the issue?

    The SIM disabling is a necessary feature for devices that are not used in field, so that we don't have to pay for data, that actually are not necessary. Turning off the device in that case is not an option. 

    Can you elaborate more on how you are disabling the SIM?

    We have a battery powered device and keeping the modem on for 30 minutes non stop is not really an option here

    If you are hitting the reset loop restriction, then there is something not done right in your application. You should avoid getting into this Modem Reset Loop Restriction. From here: 

    The modem counts all resets where the modem is not gracefully deinitialized with +CFUN=0. If modem deinitialization with +CFUN=0 is triggered before the predefined limit is reached, the reset counter is set to zero and the counting starts from the beginning. In modem firmware version 1.3.0, the limit is 5. In modem firmware version 1.3.1 and later, the limit is 7.

    Modem domain event notifications, including notifications of the modem reset loop restriction's activation, can be subscribed with the following %MDMEV AT commandAT%MDMEV=1

    Kind regards,
    Øyvind

  • Hi Øyvind,

    Here is modem trace and wireshark recording of the long connection long_connect.pcapng

    trace-2026-04-28T06-11-44.474Z.mtrace

    Here is is a trace of getting modem in that state. I disabled SIM, reset device and let it run with trace on trace-2026-04-28T10-29-40.377Z.mtrace

    Can you elaborate more on how you are disabling the SIM?

    It happens on Onomondo dashboard. I select my device SIM and with the toggle switch deactivate it. This event shows up in network log  .

    As I mentioned, its not quite modem reset loop restriction but modem acts pretty much the same as it would be. 

    If i disable the SIM and device tries multiple times to create a network connection, the mentioned attach timeout appears. I am not sure what is really happening within modem, I don't receive any specific event when this happens.

  • Thanks for sharing this information. I will need to forward to our experts on this part. Not sure if the disabling of SIM from vendor dashboard is the correct method.

    How long is the SIM disabled, and how often do you need the device connect again? Is PSM not sufficient in this use case? If disabling SIM you should set functional mode to CFUN=0.

    Kind regards,
    Øyvind

  • Yeah, that's the tricky part. We could inform device that it should shutdown, no problem but still device would need to wake up at some point and try to connect to network since it won't know that its enabled again. We could make a workaround to send some specific event at this case, but I was wondering if its detectable on device so we don't need to add some extra functionality to server responses

    How long is the SIM disabled, and how often do you need the device connect again?

    It depends, how fast it will be assigned to another customer. Might be days to weeks.



    Could it be T3346 from 3GPP standard? Meaning the network temporary blocks device connection by sending a cooldown timer in simple terms?

    Regards,

    Andris

Reply
  • Yeah, that's the tricky part. We could inform device that it should shutdown, no problem but still device would need to wake up at some point and try to connect to network since it won't know that its enabled again. We could make a workaround to send some specific event at this case, but I was wondering if its detectable on device so we don't need to add some extra functionality to server responses

    How long is the SIM disabled, and how often do you need the device connect again?

    It depends, how fast it will be assigned to another customer. Might be days to weeks.



    Could it be T3346 from 3GPP standard? Meaning the network temporary blocks device connection by sending a cooldown timer in simple terms?

    Regards,

    Andris

Children
  • Hello again Andris, apologies for the late reply.

    Our team have looked through the modem traces and point out the following:

    From the logs it appears the application is repeatedly power cycling / software resetting the modem after the SIM is disabled. That can trigger Radio Policy Manager (RPM). Per GSMA TS.34_8.2.2_REQ_003, in permanent reject scenarios the modem allows only a limited number of application-initiated software resets, typically 1 per hour by default.  The number of re-attempts depends on the SIM configuration. 

    Please try the following setup

    1. Subscribe to +CNEC and +CGEV 

    2. If the modem notifies (+CNEC) that the reject cause “EPS services and non-EPS services not allowed" was received, deactivate the modem (+CFUN=4) and reactivate it after 20-30 minutes. Rebooting immediately is pointless because the SIM subscription likely won't be fixed so soon. Since Attach attempts are typically limited, use them wisely and avoid triggering them all at once.

    3. If the modem reports the RPM restriction became active (+CGEV), wait for RPM to trigger the Attach re-attempt. The application should not trigger a reboot until the next reject (+CNEC) because the modem reboots internally once the RPM restriction ends. Do not shut down the modem completely (cut power), as it won't know how long it was off and can't determine if the RPM restriction ended. 

      • +CGEV: RESTR 1,2 (with +CGEREP=1) can be used to detect when RPM restriction has been activated.

    Let me know how this works for you.

    Kind regards, 
    Øyvind

Related