<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small">Hi Aleksander,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Thank you for your insights.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">For now, we have solved the problem by clearing the first PDP context using +CGDCONT and then forcing the modem to reregister to the network in our connection script.</div><div class="gmail_default" style="font-size:small">This way the modem uses the empty PDP context as the correct initial bearer and we are able to connect via PPP.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">However, I want to eventually use the new profile management APIs to set the PDP context correctly. Just to make it more robust.</div><div class="gmail_default" style="font-size:small">Looking forward to ModemManager v1.18 :)<br></div><div class="gmail_default" style="font-size:small"><br></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr" style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><div>Geert Lens</div><div><br></div></div></div></div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 21 May 2021 at 09:47, 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 Simon,<br>
<br>
><br>
> 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:<br>
> AT+CGDCONT=1,"IP","","0.0.0.0",0,0<br>
> We can do this by updating the mm-broadband-simtech.c plugin:<br>
> 1) by adding logic to have the command:<br>
> mmcli -m 0 --3gpp-set-initial-eps-bearer-settings="apn="<br>
> to get the desired state (so an extra step from the command line), or<br>
<br>
We should really implement some generic implementation for this,<br>
instead of doing it differently for every plugin out there. There are<br>
not many differences in between what plugins should do to configure<br>
with CGDCONT, the key thing that may be different is what cid to<br>
select in each case (e.g. Cinterion plugin has some rules for this<br>
based on the operator). As a default, though, when no custom rules are<br>
needed, it probably makes sense to have some logic that defaults to<br>
cid=1 (or maybe try first with cid=0 to see if that's supported), and<br>
then it would be used by all plugins with AT commands.<br>
<br>
If you're using MM git master and want a quick approach to solve this<br>
problem, you can use the new profile management APIs with mmcli; e.g.:<br>
$ mmcli -m 0 --disable<br>
$ mmcli -m 0 --set-power-state-low<br>
$ mmcli -m 0 --3gpp-profile-manager-set="profile-id=1,apn="<br>
$ mmcli -m 0 --enable<br>
<br>
This sequence above should be, in your specific case, the same as if<br>
we did --3gpp-set-initial-eps-bearer-settings="apn=" once the logic is<br>
implemented in the simtech or generic plugins.<br>
<br>
> 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.<br>
<br>
This solution would not be upstreamable though, if you can have a<br>
patch doing that for yourself, that would be fine, but I'm not totally<br>
sure whether the simcom device will automatically<br>
unregister/reregister with the new initial EPS bearer settings if you<br>
just run the +CGDCONT (which is why in the sequence above we put the<br>
modem in low-power mode first). I guess you can test that yourselves.<br>
<br>
> Then the question then is: where or in what function in the plugin to do this?<br>
><br>
<br>
If you decide to keep your own patch doing that in your MM build, you<br>
can really place the method anywhere :) If you want to have some clean<br>
place to add it, you could subclass setup_ports() in the simtech<br>
plugin, which is the first method really run during initialization,<br>
and do that there.<br>
<br>
> What would be the best approach?<br>
<br>
Ideally, as said above, a generic implementation for all AT modems,<br>
that the simtech plugin (and all the others) would inherit from the<br>
generic modem :)<br>
<br>
-- <br>
Aleksander<br>
<a href="https://aleksander.es" rel="noreferrer" target="_blank">https://aleksander.es</a><br>
_______________________________________________<br>
ModemManager-devel mailing list<br>
<a href="mailto:ModemManager-devel@lists.freedesktop.org" target="_blank">ModemManager-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel</a><br>
</blockquote></div></div>