Quectel: Allowed modes

Aleksander Morgado aleksander at aleksander.es
Thu Jul 2 12:06:47 UTC 2020


Hey!

>
> We’re facing a problem where ModemManager (v1.10.0) doesn’t respect the allowed modes when the modem (Quectel BG96) fails to connect the first try.
>
> First, we set the allowed modes to 4G (--set-allowed-modes=4g) which works. We verified this by running AT+QCFG=“nwscanmode” which is correctly set to “3” after running the command. When NetworkManager then issues a simple connect, ModemManager launches an automatic network registration which appears to reset the allowed modes. Querying nwscanmode afterwards yields “0” which corresponds to all modes (2g+4g).
>
> How can we make the allowed modes setting stick (preferably across module restarts/resets as well)?

So it seems it's this next "NAS Initiate Network Register" the one
that ends up resetting the nwscanmode setting.

> ModemManager[4228]: <debug> [1593676702.171801] Launching automatic network registration...
> ModemManager[4228]: [/dev/cdc-wdm0] sent message...
> <<<<<< RAW:
> <<<<<<   length = 17
> <<<<<<   data   = 01:10:00:00:03:02:00:23:00:22:00:04:00:01:01:00:01
> ModemManager[4228]: [/dev/cdc-wdm0] sent generic request (translated)...
> <<<<<< QMUX:
> <<<<<<   length  = 16
> <<<<<<   flags   = 0x00
> <<<<<<   service = "nas"
> <<<<<<   client  = 2
> <<<<<< QMI:
> <<<<<<   flags       = "none"
> <<<<<<   transaction = 35
> <<<<<<   tlv_length  = 4
> <<<<<<   message     = "Initiate Network Register" (0x0022)
> <<<<<< TLV:
> <<<<<<   type       = "Action" (0x01)
> <<<<<<   length     = 1
> <<<<<<   value      = 01
> <<<<<<   translated = automatic
> ModemManager[4228]: [/dev/cdc-wdm0] received message...
> <<<<<< RAW:
> <<<<<<   length = 20
> <<<<<<   data   = 01:13:00:80:03:02:02:23:00:22:00:07:00:02:04:00:00:00:00:00
> ModemManager[4228]: [/dev/cdc-wdm0] received generic response (translated)...
> <<<<<< QMUX:
> <<<<<<   length  = 19
> <<<<<<   flags   = 0x80
> <<<<<<   service = "nas"
> <<<<<<   client  = 2
> <<<<<< QMI:
> <<<<<<   flags       = "response"
> <<<<<<   transaction = 35
> <<<<<<   tlv_length  = 7
> <<<<<<   message     = "Initiate Network Register" (0x0022)
> <<<<<< TLV:
> <<<<<<   type       = "Result" (0x02)
> <<<<<<   length     = 4
> <<<<<<   value      = 00:00:00:00
> <<<<<<   translated = SUCCESS

I wonder if this is an implementation detail of Quectel modems.

For the allowed/preferred mode settings in this kind of devices, we
use always the plain QMI APIs; e.g. Set/Get System Selection
Preference. My questoin would be, once you have updated the allowed
modes mask to e.g. 4G only using mmcli (so using Set System Selection
Preference), does this Initiate Network Register reset also the
settings in the Get System Selection Preference? Could you check that?
i.e. run "qmicli -d /dev/cdc-wdm0 -p
--nas-get-system-selection-preference" before and after the Initiate
Network Register.


-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list