Restrict modem (EC21) one of 3G or 4G - ModemManager 1.10.0 (Debian Buster)

Brendan Simon (eTRIX) brendan.simon at etrix.com.au
Tue Aug 18 08:02:13 UTC 2020


Hi Aleksander,

On 18/08/2020 5:43 pm, Aleksander Morgado wrote:
> On Tue, Aug 18, 2020 at 8:16 AM Brendan Simon (eTRIX)
> <brendan.simon at etrix.com.au> wrote:
>> I'm using a Quectel EC21 modem on a Debian Buster Linux system (using modemmanager 1.10.0).
>>
> Please note, MM 1.10.0 is a very very old release, no longer
> supported, and it's not even the last one inthe 1.10.x series...

Fair enough, but 1.10.0 is comes with Debian Buster, which is the latest 
Stable release of Debian.  However there is a backport of 1.14, from the 
Unstable (next release) distro, for Buster.

>> I want to force it to one of 3G or 4G to stop it changing/swapping between the two.
>>
>> I've tried using the `mmcli -m 0 --set-allowed-modes=3g
>> `.  mmcli seems happy with that.
>>
>> However, some time later it swaps over to 4G (lte)
>>
>>    --------------------------------
>>    Status   |                 lock: sim-pin2
>>             |       unlock retries: sim-pin (3), sim-pin2 (3), sim-puk (10), sim-puk2 (10)
>>             |                state: connected
>>             |          power state: on
>>             |          access tech: lte    <<< 4G !!!
>>             |       signal quality: 63% (recent)
>>    --------------------------------
>>
>>
>> Have I got the right expectations of the `--set-allowable-modes` feature?
>>
>> Is there something else I need to do?
>>
> This may be a known issue with QMI modems where the internal network
> registration attempt is done with "QMI NAS Register In Network"; this
> command not only registers in network, it also makes the access tech
> preference fallback to "any", and MM doesn't consider that in its API.
>
> There is a recent patch to avoid this, by avoiding the use of "NAS
> Register in Network" and use "NAS Set System Selection Preference"
> instead: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/commit/c70b3557184fdf1472ff0cb36e9fd937cc7f9024
>
> That patch is not yet in any release, though, not even in 1.14.0. I'll
> backport it to the 1.14.x branch so that it gets into 1.14.2.
>
> You can confirm that this issue is happening to you by running this
> command once the tech went back to the one you didn't want:
> $ qmicli -d /dev/cdc-wdm0 -p --nas-get-system-selection-preference

Here is the output.

# qmicli -d /dev/cdc-wdm0 -p --nas-get-system-selection-preference
[/dev/cdc-wdm0] Successfully got system selection preference
         Emergency mode: 'no'
         Mode preference: 'umts, lte'
         Band preference: 'wcdma-2100, wcdma-850-us'
         LTE band preference: '1, 3, 5, 7, 28'
         TD-SCDMA band preference: '(null)'
         Roaming preference: 'any'
         Network selection preference: 'automatic'
         Service domain preference: 'cs-ps'
         GSM/WCDMA acquisition order preference: 'wcdma'
         Acquisition order preference: lte, umts, gsm, td-scdma, 
cdma-1x, cdma-1xevdo

What are the key indicators that confirm the issue?
         Network selection preference: 'automatic'???
         Acquisition order preference: lte, umts, gsm, td-scdma, 
cdma-1x, cdma-1xevdo???

Hopefully 1.14.2 is not far away and hopefully it will be backported for 
Debian Buster quickly :)

Thanks, Brendan.



More information about the ModemManager-devel mailing list