<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, May 18, 2021 at 11:46 AM Aleksander Morgado <<a href="mailto:aleksander@aleksander.es">aleksander@aleksander.es</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hey!<br>
<br>
> We have had an active debugging session with Vodafone and we saw that the modem (a SIMCom SIM7100A) had collected multiple PDP contexts from networks along the way (4 of them):<br>
><br>
>   AT+CGDCONT?<br>
>     +CGDCONT: 1,"IP","phone","0.0.0.0",0,0<br>
>     +CGDCONT: 2,"IP","3gnet","0.0.0.0",0,0<br>
>     +CGDCONT: 3,"IP","vf-viriciti","0.0.0.0",0,0<br>
>     +CGDCONT: 4,"IP","viriciti.com.attz","0.0.0.0",0,0<br>
>   OK<br>
><br>
> A "phone" (no clue where that comes from), a "3gnet" (this seems to be an operator in China), the "vf-viriciti" (that is ours!), and a "viriciti.com.attz" (this is ours for AT&T).<br>
><br>
> Looking at the selected one:<br>
><br>
>   AT+CGACT?<br>
>     +CGACT: 1,1<br>
>     +CGACT: 2,0<br>
>     +CGACT: 3,0<br>
>     +CGACT: 4,0<br>
>   OK<br>
><br>
> The modem selected the first one! The "phone" APN... That will obviously not work in our case :)<br>
><br>
<br>
Oh, so the modem is using the "phone" APN during the network attach<br>
(initial EPS bearer settings) :)<br>
<br>
> From the ModemManager logs (below) we see that ModemManager does select the right CID (#3) when looking for the best CID matching the "vf-viriciti" APN.<br>
><br>
<br>
Yes, but that is only for the actual data connection, not for the registration.<br>
<br>
> So it seems modem is the issue here: just removing the first context, and leaving the others, solves the problem of connectivity!!<br>
<br>
Removing the first one probably ends up forcing the modem to use the<br>
empty APN during the network attach, and so it will accept whatever<br>
the network provides as initial APN, instead of requesting the<br>
explicit "phone" one.<br>
<br>
> But why? Is this just a specific SIM7100A modem issue? Is there a work-around?<br>
><br>
<br>
The workaround is to properly configure the initial EPS bearer<br>
settings; which is not trivial. In most cases, in Qualcomm based<br>
modems, when using AT commands it's the cid #1 the one associated to<br>
the initial EPS bearer settings, but that is not always like that.<br>
E.g. I believe 3GPP requests to use the special cid #0 for that, IIRC.<br>
For QMI and MBIM modems we have specific APIs to manage that, and for<br>
AT commands we have several implementations in different plugins (not<br>
in the simtech plugin though), but we should probably provide a<br>
generic one at some point.<br></blockquote><div><br></div><div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">We are thinking of updating the mm-broadband-simtech.c plugin to set the initial bearer to "apn=" (so, empty) making the first context empty:</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">  AT+CGDCONT=1,"IP","","0.0.0.0",0,0</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">We can do this by updating the mm-broadband-simtech.c plugin:</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">1) by adding logic to have the command:</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">     mmcli -m 0 --3gpp-set-initial-eps-bearer-settings="apn="</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">   to get the desired state (so an extra step from the command line), or</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">1) we put this logic somewhere else in the plugin so we do not need this initial command at all, and the procedures will do it automatically for the simtech modem.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">   Then the question then is: where or in what function in the plugin to do this? </div><br></div><div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">What would be the best approach?</div></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
> (<br>
>   little extra context: we always use NetworkManager "nmcli" to initiate the connection using the nm-ppp-plguin, issuing:<br>
>   "nmcli c add type gsm ifname ttyUSB2 apn vf-viriciti gsm.number *99***1# ipv6.method "ignore"<br>
>   where "gsm.number" is deprecated in NetworkManager<br>
> )<br>
><br>
<br>
The gsm.number setting can be removed from that line, it's not only<br>
deprecated, it's truly nowhere used inside NetworkManager.<br>
<br>
-- <br>
Aleksander<br>
<a href="https://aleksander.es" rel="noreferrer" target="_blank">https://aleksander.es</a><br>
</blockquote></div></div>