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 06:16:51 UTC 2020


I'm using a Quectel EC21 modem on a Debian Buster Linux system (using 
modemmanager 1.10.0).

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.

    # mmcli -m 0
       --------------------------------
       Modes    |            supported: allowed: 3g; preferred: none
                |                       allowed: 4g; preferred: none
                |                       allowed: 3g, 4g; preferred: 3g
                |                       allowed: 3g, 4g; preferred: 4g
                |              current: *allowed: 3g; preferred: none*
       --------------------------------


and the modem connects using 3G (umts).

    --------------------------------
       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: *umts*
                |       signal quality: 57% (recent)
       --------------------------------


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?

Does this feature work with MM 1.10.0 ?
I did see some forum discussions about it not working and also patches, 
but I can't quite figure out whether that was pre or post v1.10.0.

There is a backport of MM 1.14.0 which I could try.  Is a later version 
likely to help?

The MM changelog/news file doesn't seem to suggest there is an issue or fix.

I did find this in the git commits, but not sure if it is relevant or not.

    *policy: Use SetCurrentModes instead of SetAllowedModes

    *
    There is no DBus API for SetAllowedModes, but only for
    SetCurrentModes. (cherry picked from commit
    e21e7ddfae3d68418ad9c6f4d589b720b7b85b8b
    <https://cgit.freedesktop.org/ModemManager/ModemManager/commit/?id=e21e7ddfae3d68418ad9c6f4d589b720b7b85b8b>)

    author 	Mohammed Sadiq <sadiq at sadiqpk.org> 	2019-09-24 19:10:29 +0530
    committer 	Aleksander Morgado <aleksander at aleksander.es> 	2019-09-25
    13:38:50 +0200
    commit 	b34203b1b8e8676bb686f0c33ba3104c8577b855
    <https://cgit.freedesktop.org/ModemManager/ModemManager/commit/?h=mm-1-10&id=b34203b1b8e8676bb686f0c33ba3104c8577b855>
    (patch
    <https://cgit.freedesktop.org/ModemManager/ModemManager/patch/?id=b34203b1b8e8676bb686f0c33ba3104c8577b855>)

    tree 	80a501b5eae527399c783a2c09e84e1d5b86fe02
    <https://cgit.freedesktop.org/ModemManager/ModemManager/tree/?h=mm-1-10&id=b34203b1b8e8676bb686f0c33ba3104c8577b855>

    parent 	00c0911cb2e0e4558d98f4fe5085cd2be89f9ec3
    <https://cgit.freedesktop.org/ModemManager/ModemManager/commit/?h=mm-1-10&id=00c0911cb2e0e4558d98f4fe5085cd2be89f9ec3>
    (diff
    <https://cgit.freedesktop.org/ModemManager/ModemManager/diff/?h=mm-1-10&id=b34203b1b8e8676bb686f0c33ba3104c8577b855&id2=00c0911cb2e0e4558d98f4fe5085cd2be89f9ec3>)




Thanks,
Brendan.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/modemmanager-devel/attachments/20200818/73944f32/attachment.htm>


More information about the ModemManager-devel mailing list