Re: SIM Reconnection Issues (Modem Manager 1.20.4)

2024-03-19 Thread Aleksander Morgado
Hey Armand,


>
> Find attached a .zip with 4 logs files:
>
>- *mmlogs_P2.log*: is the ModemManager logs for one of the boards
>(board P2)
>- *nmlogs_P2.log*: is the NetworkManager logs for the board P2 (board
>P2)
>- *mmlogs_P4.log*:  is the ModemManager logs for the other board
>(board P4)
>- *nmlogs_P4.log*: is the NetworkManager logs for the board P4 (board
>P4)
>
> For both of the boards we have reproduced the same scenario in paral·lel
> with the same enabling/disabling SIM times.
>
> The logs start Monday March 11th, at around 2:29 PM UTC for both boards.
> At this point, SIMs are enabled, and get connected.
> Then, aproximetly 3-4 min later, at 2:32 PM UTC, both SIMs are disabled
> remotly:
>
>- For board P4, the epoch where the state changed is
>[1710171130.242576] [modem0] state changed (connected -> registered)
>- For board P2, the epoch where the state changed is
>[1710171121.444769] [modem0] state changed (connected -> registered)
>
> The SIMs are now disabled for an entire day. This is now March 12th, at
> around 8:06 AM UTC. We enable both SIMs.
> In the logs, nothing changes. We leave it be for around 3 more hours to
> see if at some point it is reconnected, but nothing changes.
>
>
The modem is initially registered and connected with the Movistar network
(21407). When the EMnify SIM card is disabled, we get kicked out of the
network and eventually fully unregistered (registration_reject_cause =
'no-suitable-cells-in-location-area'). This process looks good enough to me.

When the SIM card is enabled again, there is obviously no way to ask the
modem to explicitly start a new registration with the Movistar network. We
need to fully rely on the modem's own network search and selection logic.
The problem here is that the modem ends up trying to register with *other*
networks, and eventually it ends up registered with "limited" capabilities
(e.g. for emergency services only) with Vodafone (21401).

I don't have the 3GPP knowledge about this at hand, but I'd guess that
no-suitable-cells-in-location-area instructs the modem not to attempt
registering with the network any more.

Can you try to repeat the test, but once re-enabling the SIM card, run an
airplane mode cycle through NetworkManager, e.g. "nmcli radio wwan off",
wait some seconds and "nmcli radio wwan on". That should put the modem in
low power mode and then back on again, and it should very likely reset any
network-specific state that was cached in the previous run.

-- 
Aleksander


Re: SIM Reconnection Issues (Modem Manager 1.20.4)

2024-03-08 Thread Aleksander Morgado
Hey,


>
> Recently I have encountered an issue related to reconnecting cellular.
>
> *OS*: Raspian OS Lite (32 bits) -> Linux panells3 6.1.0-rpi7-rpi-v8 #1
> SMP PREEMPT Debian 1:6.1.63-1+rpt1 (2023-11-24) aarch64 GNU/Linux
> *Modem*: SIM7600G-H
>
> The SIM is active. Using mmcli I can see that the state is connected. I
> then proceed to de-activate the SIM remotly. This is where the logs start
> (Feb 29 13:00:00).
> The logs then show a constant change in state where *enabled -> searching*
> and *searching -> enabled* is constantly logged.
> All the night is spent like this, switching the state. What I am trying to
> test is that upon remot activation of the SIM, the connection is resumed
> without problems.
> So, fast forward to Mar 01, I activate the SIM remotely and nothing
> happens. I end up reseting the modem with "mmcli -m 0 --reset" and then a
> restart of the ModemManager.service and finally the connection is
> established correctly.
>
> I am not sure what could be the issue. It is also worth noting that we
> have tested this in other boards that have the same modem, and the
> behaviour is not the same for every board.
>
>
Would you be able to provide full MM debug logs including the times when
the SIM was remotely deactivated and remotely activated?

-- 
Aleksander