<div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>Hey!<br>
<br>
> > 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.<br>
> ><br>
> > 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).<br>
> > </blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> > How can we make the allowed modes setting stick (preferably across module restarts/resets as well)?<br>
><br>
> So it seems it's this next "NAS Initiate Network Register" the one<br>
> that ends up resetting the nwscanmode setting.<br>
><br>
<br>
It looks like we shouldn't even be using NAS Initiate Network Register<br>
if Set System Selection Preference is supported, because the<br>
functionality of the former is already available in the latter. My<br>
assumption therefore is that if we switch to use SSSP, the mode<br>
preference settings may be preserved.<br>
<br>
Anyway, if you could please do the Get System Selection Preference<br>
check before and after the Initiate Network Register, that would be<br>
awesome to confirm this.<br></blockquote><div> </div><div>Hi Aleksander! Thanks for your quick reply. I'm working with Sven on this one.</div><div><br></div><div>Yes, it seems the settings in Get System Selection Preference are also reset <br>when the network scan times out. Here is the qmicli output just after setting </div><div>the allowed mode to 4G:<br></div><div><br></div><div>$ mmcli -m 0 --set-allowed-modes 4g<br>successfully set current modes in the modem<br>$ qmicli -d /dev/cdc-wdm0 -p --nas-get-system-selection-preference<br>[/dev/cdc-wdm0] Successfully got system selection preference<br> Emergency mode: 'no'<br> Mode preference: 'lte'<br> Band preference: 'gsm-dcs-1800, gsm-900-extended, gsm-900-primary, gsm-850, gsm-pcs-1900'<br> LTE band preference: '1, 2, 3, 4, 5, 8, 12, 13, 17, 18, 19, 20, 26, 28, 39'<br> Network selection preference: 'automatic'<br> Service domain preference: 'cs-ps'<br> GSM/WCDMA acquisition order preference: 'gsm'<br> Acquisition order preference: lte, none, none, gsm<br></div><div><br></div><div>After timeout and the new Initiate Network Register:</div><div><br></div><div>$ qmicli -d /dev/cdc-wdm0 -p --nas-get-system-selection-preference<br>[/dev/cdc-wdm0] Successfully got system selection preference<br> Emergency mode: 'no'<br> Mode preference: 'gsm, lte'<br> Band preference: 'gsm-dcs-1800, gsm-900-extended, gsm-900-primary, gsm-850, gsm-pcs-1900'<br> LTE band preference: '1, 2, 3, 4, 5, 8, 12, 13, 17, 18, 19, 20, 26, 28, 39'<br> Network selection preference: 'automatic'<br> Service domain preference: 'cs-ps'<br> GSM/WCDMA acquisition order preference: 'gsm'<br> Acquisition order preference: lte, none, none, gsm<br></div><div><br></div><div>I just noticed that after completing the procedure above, I am unable to use mmcli</div><div>to set the preferred mode at all. Polling nwscanmode returns '0'. This is fixed by</div><div>restarting ModemManager.</div><div><br></div><div>$ mmcli -m 0 --set-allowed-modes 4g<br>successfully set current modes in the modem<br>$ qmicli -d /dev/cdc-wdm0 -p --nas-get-system-selection-preference<br>[/dev/cdc-wdm0] Successfully got system selection preference<br> Emergency mode: 'no'<br> Mode preference: 'gsm, lte'<br> Band preference: 'gsm-dcs-1800, gsm-900-extended, gsm-900-primary, gsm-850, gsm-pcs-1900'<br> LTE band preference: '1, 2, 3, 4, 5, 8, 12, 13, 17, 18, 19, 20, 26, 28, 39'<br> Network selection preference: 'automatic'<br> Service domain preference: 'cs-ps'<br> GSM/WCDMA acquisition order preference: 'gsm'<br> Acquisition order preference: lte, none, none, gsm</div></div><div><br></div><div>Thanks,</div><div>Fredrik</div></div>