<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<font color="#804000">I'm using a Quectel EC21 modem on a Debian
Buster Linux system (using modemmanager 1.10.0).<br>
<br>
I want to force it to one of 3G or 4G to stop it changing/swapping
between the two.<br>
<br>
I've tried using the `mmcli -m 0 --set-allowed-modes=3g<br>
`. mmcli seems happy with that.<br>
<br>
</font>
<blockquote><font color="#804000"><tt># mmcli -m 0</tt><br>
<tt> --------------------------------</tt><br>
<tt> Modes | supported: allowed: 3g; preferred:
none</tt><br>
<tt> | allowed: 4g; preferred:
none</tt><br>
<tt> | allowed: 3g, 4g;
preferred: 3g</tt><br>
<tt> | allowed: 3g, 4g;
preferred: 4g</tt><br>
<tt> | current: <b>allowed: 3g;
preferred: none</b></tt><br>
<tt> --------------------------------</tt><br>
</font></blockquote>
<font color="#804000"><br>
and the modem connects using 3G (umts).<br>
<br>
</font>
<blockquote><font color="#804000"><tt>
--------------------------------</tt><tt><br>
</tt><tt> Status | lock: sim-pin2</tt><tt><br>
</tt><tt> | unlock retries: sim-pin (3),
sim-pin2 (3), sim-puk (10), sim-puk2 (10)</tt><tt><br>
</tt><tt> | state: connected</tt><tt><br>
</tt><tt> | power state: on</tt><tt><br>
</tt><tt> | access tech: <b>umts</b></tt><tt><br>
</tt><tt> | signal quality: 57% (recent)</tt><tt><br>
</tt><tt> --------------------------------</tt><tt><br>
</tt></font></blockquote>
<font color="#804000"><br>
However, some time later it swaps over to 4G (lte)<br>
<br>
</font>
<blockquote><font color="#804000"><tt>
--------------------------------</tt><tt><br>
</tt><tt> Status | lock: sim-pin2</tt><tt><br>
</tt><tt> | unlock retries: sim-pin (3),
sim-pin2 (3), sim-puk (10), sim-puk2 (10)</tt><tt><br>
</tt><tt> | state: connected</tt><tt><br>
</tt><tt> | power state: on</tt><tt><br>
</tt><tt> | access tech: <b>lte
<<< 4G !!!</b></tt><tt><br>
</tt><tt> | signal quality: 63% (recent)</tt><tt><br>
</tt><tt> --------------------------------</tt><tt><br>
</tt></font></blockquote>
<font color="#804000"><br>
Have I got the right expectations of the `--set-allowable-modes`
feature?<br>
<br>
Is there something else I need to do?<br>
<br>
Does this feature work with MM 1.10.0 ?<br>
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.<br>
<br>
There is a backport of MM 1.14.0 which I could try. Is a later
version likely to help?<br>
<br>
The MM changelog/news file doesn't seem to suggest there is an
issue or fix.<br>
<br>
I did find this in the git commits, but not sure if it is relevant
or not.<br>
<br>
</font>
<blockquote>
<div class="commit-subject"><font color="#804000"><b>policy: Use
SetCurrentModes instead of SetAllowedModes<br>
<br>
</b></font></div>
<div class="commit-msg"><font color="#804000">There is no DBus API
for SetAllowedModes, but only for SetCurrentModes.
(cherry picked from commit <a
href="https://cgit.freedesktop.org/ModemManager/ModemManager/commit/?id=e21e7ddfae3d68418ad9c6f4d589b720b7b85b8b">e21e7ddfae3d68418ad9c6f4d589b720b7b85b8b</a>)<br>
<br>
</font></div>
</blockquote>
<blockquote>
<table summary="commit info" class="commit-info">
<tbody>
<tr>
<th><font color="#804000">author</font></th>
<td><font color="#804000">Mohammed Sadiq
<a class="moz-txt-link-rfc2396E" href="mailto:sadiq@sadiqpk.org"><sadiq@sadiqpk.org></a></font></td>
<td class="right"><font color="#804000">2019-09-24 19:10:29
+0530</font></td>
</tr>
<tr>
<th><font color="#804000">committer</font></th>
<td><font color="#804000">Aleksander Morgado
<a class="moz-txt-link-rfc2396E" href="mailto:aleksander@aleksander.es"><aleksander@aleksander.es></a></font></td>
<td class="right"><font color="#804000">2019-09-25 13:38:50
+0200</font></td>
</tr>
<tr>
<th><font color="#804000">commit</font></th>
<td colspan="2" class="sha1"><font color="#804000"><a
href="https://cgit.freedesktop.org/ModemManager/ModemManager/commit/?h=mm-1-10&id=b34203b1b8e8676bb686f0c33ba3104c8577b855">b34203b1b8e8676bb686f0c33ba3104c8577b855</a>
(<a
href="https://cgit.freedesktop.org/ModemManager/ModemManager/patch/?id=b34203b1b8e8676bb686f0c33ba3104c8577b855">patch</a>)</font></td>
</tr>
<tr>
<th><font color="#804000">tree</font></th>
<td colspan="2" class="sha1"><font color="#804000"><a
href="https://cgit.freedesktop.org/ModemManager/ModemManager/tree/?h=mm-1-10&id=b34203b1b8e8676bb686f0c33ba3104c8577b855">80a501b5eae527399c783a2c09e84e1d5b86fe02</a></font></td>
</tr>
<tr>
<th><font color="#804000">parent</font></th>
<td colspan="2" class="sha1"><font color="#804000"><a
href="https://cgit.freedesktop.org/ModemManager/ModemManager/commit/?h=mm-1-10&id=00c0911cb2e0e4558d98f4fe5085cd2be89f9ec3">00c0911cb2e0e4558d98f4fe5085cd2be89f9ec3</a>
(<a
href="https://cgit.freedesktop.org/ModemManager/ModemManager/diff/?h=mm-1-10&id=b34203b1b8e8676bb686f0c33ba3104c8577b855&id2=00c0911cb2e0e4558d98f4fe5085cd2be89f9ec3">diff</a>)</font></td>
</tr>
</tbody>
</table>
</blockquote>
<font color="#804000"><br>
<br>
Thanks,<br>
Brendan.<br>
<br>
</font>
</body>
</html>