AT+CGDCONT? in u-blox TOBY-L2

Dan Williams dcbw at redhat.com
Thu Aug 18 16:13:04 UTC 2016


On Thu, 2016-08-18 at 17:48 +0200, Aleksander Morgado wrote:
> Hey,
> 
> When listing PDP contexts on the u-blox Toby L2 module, I see that
> the
> actual APN string is suffixed with an extra string specifying MCCMNC
> of the network.
> 
> When first registered in the LTE network, the PDP context 4 gets
> activated (default EPS bearer) and shows up as follows:
> 
> debug_log(): (ttyACM2): --> 'AT+CGDCONT?<CR>'
> debug_log(): (ttyACM2): <-- '<CR><LF>+CGDCONT:
> 4,"IP","airtelwap.es.MNC001.MCC214.GPRS","10.1.115.80",0,0,0,0,0,0<CR
> ><LF>'
> 
> When I then request a new connection to the "ac.vodafone.es" APN,
> ModemManager creates a new PDP context as follows:
> 
> debug_log(): (ttyACM2): --> 'AT+CGDCONT=5,"IP","ac.vodafone.es"<CR>'
> debug_log(): (ttyACM2): <-- '<CR><LF>OK<CR><LF>'
> 
> The issue is that when I disconnect and reconnect using the same APN,
> the new list of existing APNs shows the following:
> 
> debug_log(): (ttyACM2): --> 'AT+CGDCONT?<CR>'
> debug_log(): (ttyACM2): <-- '<CR><LF>+CGDCONT:
> 4,"IP","airtelwap.es.MNC001.MCC214.GPRS","10.1.115.80",0,0,0,0,0,0<CR
> ><LF>'
> debug_log(): (ttyACM2): <-- '+CGDCONT:
> 5,"IP","ac.vodafone.es.MNC001.MCC214.GPRS","",0,0,0,0,0,0<CR><LF>'
> debug_log(): (ttyACM2): <-- '<CR><LF>OK<CR><LF>'
> 
> This is, the APN in the PDP context that I created now has the
> "MNC001.MCC214.GPRS" suffix, and the logic looking for the PDP
> context
> fails to find the same one, so a new one is created.... and at the
> end
> we get a new one for each connection attempt.
> 
> Interestingly, if the module is power cycled, the new CGDCONT? list
> does show the original APN name.
> 
> This is the first time I've seen it, so I wonder if I should just
> change the logic looking for a matching APN in the PDP context to
> match per prefix instead of per full string. E.g. Looking for
> "ac.vodafone.es" would match if "ac.vodafone.es.MNC001.MCC214.GPRS"
> is
> found.
> 
> Or, should I instead do this some u-blox specific change?

I think just prefix-matching would be pretty fragile, especially since
there are so many variants of "internet"...  If it was a generic
matcher, could it loosely match the u-blox MNC[d{3}].MCC[d{3}.WHATEVER?
 Or let's just do it in a ublox plugin.

Dan


More information about the ModemManager-devel mailing list