MM 1.14.2: Question about bearer disconnect

Aleksander Morgado aleksander at aleksander.es
Sat Nov 7 16:46:55 UTC 2020


Hey,

> We're running 1.14.2 on a Cinterion (PLS62W) module.
>
> The modem is connected for a while and suddenly loses registration
> causing MM to start a forced disconnect of the bearer, but the attempt
> at disconnection fails.
>
> Oct 29 22:11:24.709516 ModemManager[530]: <info>  [1604009484.709151]
> [modem0] state changed (connected -> disconnecting)
> Oct 29 22:11:24.768445 ModemManager[530]: <debug> [1604009484.768058]
> [modem0/bearer0] sending PDP context deactivation in primary port...
> Oct 29 22:11:24.772352 ModemManager[530]: <debug> [1604009484.771977]
> [modem0/ttyACM1/at] device open count is 2 (open)
> Oct 29 22:11:24.777015 ModemManager[530]: <debug> [1604009484.776642]
> [modem0/ttyACM1/at] --> 'AT+CGACT=0,1<CR>'
> Oct 29 22:11:24.966486 ModemManager[530]: <debug> [1604009484.965979]
> [modem0/ttyACM1/at] <-- '<CR><LF>+CME ERROR: 202<CR><LF>'
> Oct 29 22:11:24.968238 ModemManager[530]: <debug> [1604009484.967858]
> [modem0/ttyACM1/at] invalid mobile equipment error code: 202


Is 202 a generic error code, or Cinterion specific? Did you look that up?

> Oct 29 22:11:24.970829 ModemManager[530]: <debug> [1604009484.970446]
> [modem0/ttyACM1/at] operation failure: 100 (Unknown error)
> Oct 29 22:11:24.971581 ModemManager[530]: <debug> [1604009484.971142]
> [modem0/bearer0] PDP context deactivation failed (not fatal): Unknown
> error
> Oct 29 22:11:24.973145 ModemManager[530]: <debug> [1604009484.972774]
> [modem0/bearer0] reopening data port ttyACM0...
> Oct 29 22:11:24.973759 ModemManager[530]: <debug> [1604009484.973331]
> [modem0/ttyACM0/at] reopening port (1)
> Oct 29 22:11:24.974182 ModemManager[530]: <debug> [1604009484.973840]
> [modem0/ttyACM0/at] device open count is 0 (close)
> Oct 29 22:11:24.974661 ModemManager[530]: <debug> [1604009484.974316]
> [modem0/ttyACM0/at] closing serial port...
>

I'm missing the next debug logs in the sequence, the ones telling us
whether the flashing done during disconnect succeeded or not.

> Subsequent attempts to connect the bearer fails with this error:
> GDBus.Error:org.freedesktop.ModemManager1.Error.Core.Failed: Bearer
> currently being disconnected
>

That is definitely an error in the logic.

> My question is if the bearer disconnect fails (AT+CGACT) fails then
> does that leave the bearer state machine in "Disconnecting" state ?
> Hence preventing future attempts to connect the bearer ?
> If so, how does one get out of this state ?
>

So, a failure in disconnection is something not very easy to handle.
What would you do? Would you say that a failure in disconnection means
that the modem is still connected? Or would you say that a failure in
disconnection just indicates a failure in the procedure but the modem
is really disconnected? In the case of the generic modem, we assume a
failure in the AT+CGACT command running the disconnection is not fatal
(as seen in your logs), and after that we still run some additional
procedures like the port re-opening and flashing. If CGACT fails but
the remaining steps succeed, I would consider the disconnection
successful. Either way, *as soon as* the disconnection process ends,
with an error or not, the modem state should transition to a different
state that is not disconnecting, it should reach a "final" state. If
it doesn't reach that state, there is an error somewhere.

If this issue is easy to reproduce for your, please re-run it and this
time gather much more debug logs, and once you have them open a new
Issue in gitlab and attach all the infor there:
https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues

-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list