Autoconnect query

Aleksander Morgado aleksander at
Sat Nov 27 14:26:03 UTC 2021


> I'm checking whether I can get the Quectel BG95 modem to work with QMI
> mode. I'm currently using ModemManager 1.18.2 and libqmi 1.30.2.
> ModemManager doesn't manage to advance the state machine past the
> "enabled" state. This is despite the modem actually already being
> registered and attached to the network:
> +CEREG: 0,5

That's registered+roaming.

> +CGATT: 1
> +CGACT: 1,1
> +CGDCONT: 1,"IP","bicsapn","",0,0,0
> I noticed a few QMI protocol errors in the log (complete log at
> 3046:<warn>  [1637917459.156274] [modem0] couldn't load supported bands:
> Couldn't parse the list of supported bands
> 3218:<warn>  [1637917459.178727] [modem0] couldn't query SIM slots: QMI
> protocol error (94): 'NotSupported'
> 3649:<warn>  [1637917459.264097] [modem0/sim0] couldn't load list of
> emergency numbers: uninitialized emergency numbers list
> 3687:<warn>  [1637917459.270494] [modem0/sim0] couldn't load list of
> preferred networks: Couldn't get preferred networks: QMI protocol error
> (94): 'NotSupported'
> 3730:<warn>  [1637917459.276417] [modem0] couldn't load list of own
> numbers: Couldn't get MSISDN: QMI protocol error (16): 'NotProvisioned'
> 3938:<warn>  [1637917459.404641] [modem0] failed checking whether
> autoconnect is disabled or not: QMI protocol error (94): 'NotSupported'

None of those errors would explain why you're not seeing the modem at
least as "registered" instead of just "enabled". I can see in the log
you posted that the modem transitions to "enabled", but some few
messages later on I can see the "serving system" indication reporting
you're registered in LTE:

<<<<<< QMI:
<<<<<< flags = "indication"
<<<<<< transaction = 2
<<<<<< tlv_length = 25
<<<<<< message = "Serving System" (0x0024)
<<<<<< TLV:
<<<<<< type = "Serving System" (0x01)
<<<<<< length = 6
<<<<<< value = 01:02:01:02:01:08
<<<<<< translated = [ registration_state = 'registered'
cs_attach_state = 'detached' ps_attach_state = 'attached'
selected_network = '3gpp' radio_interfaces = '{ [0] = 'lte '}' ]

Unfortunately, the log stopped right after that, and I cannot tell why
it didn't switch to "registered". Could you get a longer og?

> The last one in particular seems to be related to the problem at hand.

No no, completely unrelated I'd say.

> What exactly does "autoconnect" mean in this context? Is there a way to
> deal with a modem that does indeed have autoconnect enabled?

QMI autoconnect feature involves configuring the connection settings
in a given context, and then letting the modem itself setup a full
data connection automatically. When using ModemManager, as in your
case, what we do is to disable autoconnect via QMI unconditionally, so
that MM is the one taking care of the connection setup.

What you need to understand is why the modem is not transitioning to
the "registered" state in ModemManager. That should be automatic as
soon as the modem is enabled and the SIM is available; as soon as a
network is found the modem should attempt to register by itself. And
once registered, we can look at the connection part, but for now
you're missing the first step.


More information about the libqmi-devel mailing list