Quectel: Allowed modes

Aleksander Morgado aleksander at aleksander.es
Fri Jul 3 06:55:09 UTC 2020


Hey Fredrik,

>> > > 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.
>> >
>>
>> It looks like we shouldn't even be using NAS Initiate Network Register
>> if Set System Selection Preference is supported, because the
>> functionality of the former is already available in the latter. My
>> assumption therefore is that if we switch to use SSSP, the mode
>> preference settings may be preserved.
>>
>> Anyway, if you could please do the Get System Selection Preference
>> check before and after the Initiate Network Register, that would be
>> awesome to confirm this.
>
>
> Hi Aleksander! Thanks for your quick reply. I'm working with Sven on this one.
>
> Yes, it seems the settings in Get System Selection Preference are also reset
> when the network scan times out. Here is the qmicli output just after setting
> the allowed mode to 4G:
>
> $ mmcli -m 0 --set-allowed-modes 4g
> successfully set current modes in the modem
> $ qmicli -d /dev/cdc-wdm0 -p --nas-get-system-selection-preference
> [/dev/cdc-wdm0] Successfully got system selection preference
> Emergency mode: 'no'
> Mode preference: 'lte'
> Band preference: 'gsm-dcs-1800, gsm-900-extended, gsm-900-primary, gsm-850, gsm-pcs-1900'
> LTE band preference: '1, 2, 3, 4, 5, 8, 12, 13, 17, 18, 19, 20, 26, 28, 39'
> Network selection preference: 'automatic'
> Service domain preference: 'cs-ps'
> GSM/WCDMA acquisition order preference: 'gsm'
> Acquisition order preference: lte, none, none, gsm
>
> After timeout and the new Initiate Network Register:
>
> $ qmicli -d /dev/cdc-wdm0 -p --nas-get-system-selection-preference
> [/dev/cdc-wdm0] Successfully got system selection preference
> Emergency mode: 'no'
> Mode preference: 'gsm, lte'
> Band preference: 'gsm-dcs-1800, gsm-900-extended, gsm-900-primary, gsm-850, gsm-pcs-1900'
> LTE band preference: '1, 2, 3, 4, 5, 8, 12, 13, 17, 18, 19, 20, 26, 28, 39'
> Network selection preference: 'automatic'
> Service domain preference: 'cs-ps'
> GSM/WCDMA acquisition order preference: 'gsm'
> Acquisition order preference: lte, none, none, gsm
>

Yes, this confirms the assumption. We should try to use SSSP for the
manual/automatic registration attempt.

> I just noticed that after completing the procedure above, I am unable to use mmcli
> to set the preferred mode at all. Polling nwscanmode returns '0'. This is fixed by
> restarting ModemManager.
>
> $ mmcli -m 0 --set-allowed-modes 4g
> successfully set current modes in the modem
> $ qmicli -d /dev/cdc-wdm0 -p --nas-get-system-selection-preference
> [/dev/cdc-wdm0] Successfully got system selection preference
> Emergency mode: 'no'
> Mode preference: 'gsm, lte'
> Band preference: 'gsm-dcs-1800, gsm-900-extended, gsm-900-primary, gsm-850, gsm-pcs-1900'
> LTE band preference: '1, 2, 3, 4, 5, 8, 12, 13, 17, 18, 19, 20, 26, 28, 39'
> Network selection preference: 'automatic'
> Service domain preference: 'cs-ps'
> GSM/WCDMA acquisition order preference: 'gsm'
> Acquisition order preference: lte, none, none, gsm
>

Ahh, that is just because internally MM daemon has cached that the
modes allowed is 4G only, so attempting to re-set 4G only won't send
any command to the modem. MM didn't detect that those settings were
changed "behind its back". If you try to change it to 3G+4G and then
to 4G-only, it should work. Anyway, this issue will be solved along
with the one above, it's just a side effect of the original problem.

-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list