Auto-enabling modems

Aleksander Morgado aleksandermj at chromium.org
Mon Nov 7 15:08:21 UTC 2022


Hey,

> I have yet another question around the Fibocom MA510 modem. I'm
> observing an issue where the modem is in registered state when
> ModemManager starts up. MM ignores this due to
>
> 3GPP registration state change ignored as modem isn't enabled (line 832)
>
> MM then triggers an automatic network registration (+COPS=0, line 937)
> and then immediately proceeds with connecting since the modem reports
> +COPS: 0,0,"...",7. The modem appears to be slow in reacting to the
> +COPS=0 because right after the connection is up, we get +CEREG: 0 (line
> 1072) and NW DETACH.
>
> I have 2 questions around this:
> 1. Is it possible to initialize the modem as enabled if it's already
> registered automatically? Then we wouldn't have to trigger an automatic
> network registration which would speed all of this up significantly.

We could store those 3GPP reg state updates that happened before being
enabled, and once we get enabled, we could apply them. Those delayed
3GPP reg state updates could take us right away into registered state.
This could definitely be a good change to do indeed.

> 2. Is the modem misbehaving after the first +COPS=0 when it only emits
> +CEREG: 0 some seconds later? How can we handle this properly?
>

Please note that the automatic registration you're seeing (+COPS=0) is
being started because you likely run a Simple.Connect() while the
modem was disabled (as opposed to running a Modem.Enable() first and
then a Simple.Connect()). Not saying that running the Simple.Connect()
while disabled is wrong, but I think it's important to note that MM
won't ever run +COPS=0 on its own. Regarding the issue itself, ideally
if the modem is already registered automatically in the home network,
running +COPS=0 could just be a no-op; if the modem is reporting
+CEREG: 0 after the +COPS=0, I think we could try to improve the logic
to avoid having run the +COPS=0 in the first place, either by applying
those delayed 3GPP registration updates from the previous questions,
or even running an explicit registration refresh before triggering the
automatic registration in the Simple.Connect() logic.

-- 
Aleksander


More information about the ModemManager-devel mailing list