<div dir="ltr">Then, would it be possible to fix a 2G, 3G or 4G with mbimcli after a connection has been established using ModemManager?</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 28, 2015 at 10:54 PM, Aleksander Morgado <span dir="ltr"><<a href="mailto:aleksander@aleksander.es" target="_blank">aleksander@aleksander.es</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Wed, Oct 28, 2015 at 10:45 PM, Dan Williams <<a href="mailto:dcbw@redhat.com">dcbw@redhat.com</a>> wrote:<br>
> On Wed, 2015-10-28 at 20:06 +0100, Aleksander Morgado wrote:<br>
>> On Wed, Oct 28, 2015 at 6:59 PM, Dan Williams <<a href="mailto:dcbw@redhat.com">dcbw@redhat.com</a>> wrote:<br>
>> >> > As you can see, there is only one supported mode (allowed: 2g, 3g, 4g;<br>
>> >> > preferred: none) which (as far as I know) offers me no contl about<br>
>> >> > which network technology is being used. When using this modem with<br>
>> >> > other SIM cards or other protocols (this modem also supports QMI,<br>
>> >> > direct IP and serial) the supported modes varies.<br>
>> >> ><br>
>> >> > My understanding is that the supported modes are provided by the modem<br>
>> >> > to ModemManager. Which variables affect the supported modes reported?<br>
>> >> ><br>
>> >> > Is there a way to force ModemManager to use only 2g/3g/4g despite of<br>
>> >> > the supported modes reported by the modem?<br>
>> >><br>
>> >> I don't recall why it was hardcoded in MM specifically to disallow mode<br>
>> >> switching on LTE-capable devices.  Aleksander would probably know more.<br>
>><br>
>> ModemManager has 2 settings controlling this behavior: capabilities<br>
>> and modes. When 4G is enabled in the MC7710 (capabilities<br>
>> gsm-umts+lte) the only allowed setting is 2G+3G+4G (auto). If you want<br>
>> to set it as 2G+3G (i.e. no 4G) you'll need to switch capabilities to<br>
>> just gsm-umts (no lte). Once that is done, the modem will get rebooted<br>
>> and you'll now see a new list of mode combinations, including "2G<br>
>> only", "3G only", "2G+3G, 3G preferred" and "2G+3G, 2G preferred".<br>
>> This behavior is actually very specific to how the MC7710 responds to<br>
>> our commands (i..e how we compute the list of supported modes and<br>
>> capabilities). Other modems like the MC7304 may not require the power<br>
>> cycle to switch capabilities just to get in 2G+3G mode.<br>
>><br>
>> This may also give more info:<br>
>> <a href="https://sigquit.wordpress.com/2013/06/03/changing-modes-and-capabilities-in-modemmanager/" rel="noreferrer" target="_blank">https://sigquit.wordpress.com/2013/06/03/changing-modes-and-capabilities-in-modemmanager/</a><br>
>><br>
>> As for why we hardcode the values. Well, those are the modes that QMI<br>
>> supports. The only confusion here is why you didn't get the 2G+3G<br>
>> modes when 4G was also enabled, which I said I believe is very<br>
>> specific to the MC7710 if I'm not mistaken.<br>
><br>
> My read of the code indicates that we get the same behavior with USB<br>
> devices like the UML290 and such too though, right?  Which don't have<br>
> the same restriction as the MC77xx devices.  eg this code block in<br>
> modem_load_supported_modes():<br>
><br>
>     /* LTE and others, only allow to have all, no further preference */<br>
>     else if (mm_iface_modem_is_3gpp_lte (_self)) {<br>
>         /* 2G, 3G and 4G */<br>
>         mode.allowed = (MM_MODEM_MODE_2G | MM_MODEM_MODE_3G |<br>
> MM_MODEM_MODE_4G);<br>
>         mode.preferred = MM_MODEM_MODE_NONE;<br>
>         g_array_append_val (combinations, mode);<br>
>     }<br>
><br>
> obviously gets run for an LTE-capable modem, even ones that can change<br>
> modes around unlike the 77xx devices.<br>
<br>
</div></div>You're right indeed. When LTE is involved we fix the supported modes.<br>
Just checked it with my MC7304:<br>
<span class="">    Modes    |      supported: 'allowed: 2g, 3g, 4g; preferred: none'<br>
<br>
</span>Not sure why I though it was a MC7710 only thing... bad memory :/<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Aleksander<br>
<a href="https://aleksander.es" rel="noreferrer" target="_blank">https://aleksander.es</a><br>
</font></span></blockquote></div><br></div>