<div dir="ltr">Hello Ulrich, <div><br></div><div>I tried to apply this patch, it seems nearly all of what's contained is present in 1.8. I had some issues getting it to apply, would it be possible for you recreate this patch for me (perhaps with only the necessary elements)?</div><div><br></div><div>Ideally I would like to be using 1.12.x. I'm still having all sorts of trouble with TOBY L201, and Sara R410 when using Modem Manger. </div><div><br></div><div>Thanks, </div><div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div style="font-family:Arial,Helvetica,sans-serif;font-style:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);color:rgb(0,0,0);font-size:12.8px"><div dir="ltr"><b style="font-family:"trebuchet ms",sans-serif"><em>Cale Collins</em><br>Field Applications Engineer<br>Gateworks Corporation</b></div><div dir="ltr"><span style="font-family:"trebuchet ms",sans-serif;font-size:12.8px">(805)781-2000 x37</span><b style="font-family:"trebuchet ms",sans-serif"><br></b></div><div dir="ltr">3026 S. Higuera, San Luis Obispo, CA 93401<br><a href="http://www.gateworks.com/" style="color:rgb(17,85,204);font-size:12.8px;font-family:"trebuchet ms",sans-serif" target="_blank">www.gateworks.com</a></div></div><div style="font-size:12.8px"><br><img src="http://www.gateworks.com/templates/hathway/images/logo.png" width="200" height="31"></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Dec 10, 2019 at 3:08 AM Ulrich Mohr <<a href="mailto:u.mohr@semex-engcon.com">u.mohr@semex-engcon.com</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>
I tried to reconstruct what I did to work around the problem.<br>
<br>
1. When dial in takes place, I check upfront whether there is an active <br>
context that matches the requested one. If there is one, I use it, and <br>
skip activating another one. This prevents creating a secondary context <br>
when the default context is already active (which might fail as shown by <br>
the recent bug report -- some providers do not allow a secondary <br>
context, e.g. vodafone DE).<br>
<br>
2. I seen cases where the default context does not match the APN at all. <br>
In this case, the first step would not detect the active context as the <br>
right one and create a second one. In case I've seen that, the creation <br>
of the second context succeeded, but the context is not used by the <br>
modem (because ublox does not set routes to the secondary context). <br>
Therefore, I also adapt the routes in the modem to match the new context.<br>
<br>
I think that what I did is far from perfects, because theses two <br>
measures will fail when only one context is allowed AND the default <br>
context does not match the default one (although I never seen this so <br>
far). Also, it is not the recommended way from the ublox manuals, since <br>
they request to use set default eps bearer in case the network provided <br>
one does not work.<br>
<br>
I attach the patch I use at the moment (based on version 1.7.999.) <br>
Please be aware that this also includes (inactive) code from other <br>
things I tried, e.g. setting the default bearer as requested by the <br>
ublox manuals.<br>
<br>
That's unfortunately all I can provide at the moment, sorry for that.<br>
<br>
Best regards,<br>
<br>
Uli<br>
<br>
Am 10.12.2019 um 10:23 schrieb Aleksander Morgado:<br>
> On Fri, Dec 6, 2019 at 9:11 AM Ulrich Mohr <<a href="mailto:u.mohr@semex-engcon.com" target="_blank">u.mohr@semex-engcon.com</a>> wrote:<br>
>> Hi,<br>
>><br>
>> I am not sure, but I think that this is a problem with the UBlox modems I was facing before with a TOBY 210.<br>
>><br>
>> The problem is that the modem does an automatic registration on the LTE network using its default APN (that it gets from the network, when I understand right). That is what you see (m2m.com.attz.mnc170.mcc310.gprs) as context 4: (which is the default LTE bearer on TOBY). Unfortunately, that does not match the one your have given manually, so ModemManager tries to build up a connection using the secondary context with the APN settings you have given -- which fails, because the service provider does not allow a secondary connection while the first one is active.<br>
>><br>
>> What I am not completely clear about is, under which circumstances you get such a long default APN name (not matching the 'official' ones) from the network.<br>
>><br>
> The "long" name you get is when the bearer is already connected to<br>
> that APN, so the name includes the MCCMNC of the operator.<br>
> ModemManager already does a "loose" matching of the APNs and they<br>
> should already match that one in context 4 if available:<br>
> <a href="https://gitlab.freedesktop.org/mobile-broadband/ModemManager/blob/master/src/mm-modem-helpers.c#L1506" rel="noreferrer" target="_blank">https://gitlab.freedesktop.org/mobile-broadband/ModemManager/blob/master/src/mm-modem-helpers.c#L1506</a><br>
><br>
> As you said, MM should have attempted to use context #4 instead of #1<br>
> as #4 was already connected. The problem is that the logic looking for<br>
> which context to use stops as soon as it finds a matching one, and in<br>
> this case it found #1 before #4. We could extend the logic to "prefer"<br>
> an APN that is reported with MCCMNC if there are more than one<br>
> matching, and I believe that should work.<br>
><br>
>> @Aleksander: See <a href="https://lists.freedesktop.org/archives/modemmanager-devel/2018-August/006633.html" rel="noreferrer" target="_blank">https://lists.freedesktop.org/archives/modemmanager-devel/2018-August/006633.html</a><br>
>><br>
>> I heavily change the ublox plugin to work around that -- unfortunately I never found the time to bring it to a deliverable state, and at the moment, I can't even remember what exactly I did. But I can provide the sources if needed....<br>
> Yes, please, can you do that?<br>
><br>
><br>
-- <br>
Best regards / Mit freundlichen Grüßen / Salutations distinguées<br>
<br>
Ulrich Mohr<br>
<br>
SEMEX-EngCon GmbH<br>
Carl-Merz-Strass 26<br>
76275 Ettlingen<br>
Phone: +49 (0) 7243 5143596<br>
email: <a href="mailto:u.mohr@semex-engcon.com" target="_blank">u.mohr@semex-engcon.com</a><br>
___________________________________________<br>
Executive board: A. Stiegler, H.-J. Nitzpon<br>
Commercial register: Mannheim, HRB 718881<br>
Company domicile: Ettlingen<br>
<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>