Initial EPS bearer on u-blox TOBY-L210
Ulrich Mohr
u.mohr at semex-engcon.com
Fri Aug 31 08:00:00 UTC 2018
Hey,
>> When using ModemManager with a u-blox TOBY-L210 module (router mode) to
>> connect to a LTE network, I face some problems.
>>
>>
>> What I see:
>> When the modem attaches to the network, it creates and activates a default
>> EPS bearer (with CID=4). The APN resulting for this PDP Context depends on
>> the SIM card and operator.
>> This default EPS bearer may be sufficient to get IP connectivity (seen on
>> SIM Card from eseye.com, operator Vodefone.de, AT+CGDCONT? shows
>> "eseye1.mnc058.mcc234.gprs") or can be a APN that does not route data (seen
>> on SIM Card from Telekom, operator Telekom.de, AT+CGDCONT? shows
>> "NODATA.MNC001.MCC262.GPRS").
>> When ModemManager tries to connect, it creates a new PDP context (since the
>> existing one does not match) and activates it. This succeeds, but has no
>> effect, since the modem internally does only route data from the PDP context
>> activated first (see u-blox AT command manual, section "Networking"). This
>> can be examined using the AT+UIPROUTE command.
>> In case of the Telekom SIM card, this leads to the ModemManager showing
>> "connected", but no data can be transferred.
> What MM version are you using? If the configured APN matches the
> default one from the operator, e.g. "eseye1" removing the mnc/mnc
> part, then the connection setup won't create a new PDP context and
> will use the default one.
The version I am using is 1.7.990 (sorry that I missed to mention it).
It has the relaxed APN compare, but it has no effect in my scenario
here, since the APN provided by the LTE registration does not match the
'official' APN. In case of the Telekom SIM card, it is completely
unrelated, and worse, the APN does not allow to transfer data. So
without setting the default EPS bearer using the AT+UCGDFLT, you don't
get a working data connection for the Telekom card with the current
implemenation of ModemManager at all: ModemManager will set up a
secondary APN (with the settings given by the user) and activate it, but
will not be effective because there is no route set on this secondary
bearer by the modem (I tend to consider this a bug in the modem firmware
implementation, but anway....)
That is the reason I wanted the default EPS bearer set every time a
bearer is activated so the second context is not set up at all, which
conflicts with your idea of having an extra API for the default EPS
bearer (when I got you right, the default bearer will not be set
automatically, according to your plans).
But perhaps there is another way to make it work, even without setting
the default bearer, by setting up a default route using the +UIPROUTE
command after the second bearer has been activated. This might be even
better that trying to match the default EPS bearer, since this second
PDP context can be disabled and enabled using the mechanisms already
established by ModemManager to activate and deactivate contexts.
I will give it a try and let you know the results...
>
>> The solution requested by the u-blox manual is to use the AT+UCGDFLT command
>> to configure the default eps bearer for LTE. I implemented this as first
>> step in the 3gpp activation, but it has a major drawback: The the modem has
>> to be switched to airplane mode (AT+CFUN=4) before issuing the command and
>> back afterwards (AT+CFUN=1). This is detected by the ModemManager an leads
>> to a cancellation of the 3gpp activation ( a second 3gpp activation later on
>> will succeed if the AT+UCGDFLT is not issued a second time when the default
>> EPS bearer already set).
>>
>>
>> In addition, this leads to other problems: ModemManager does not match the
>> default PDP context, so it will create a new one (which has no effect as
>> explained above). I altered the match (according to this thread:
>> https://lists.freedesktop.org/archives/modemmanager-devel/2016-August/003362.html)
>> which worked, but leads to a new problem: The default EPS context can not be
>> disabled (this is documented), so disconnecting will no longer work.
>>
> Yes, that is true. When the default EPS bearer is requested to be
> disconnected, externally in MM we will show it's disconnected but the
> actual context may be internally connected in the TOBY because the
> default EPS bearer cannot be disconnected.
What I actually see is that the MM shows as connected further one, which
e.g. prevents to activate the connection again, since it is still
active. But I will double check this observation ...
>
>> Now the question is: How can I properly implement using the default bearer
>> in ModemManager? Do you have any ideas? Or is this problem already beeing
>> addressed and I do something wrong?
>>
> So, most modems hide the fact that there is a bearer connected when
> you're registered in LTE, but if I'm not mistaken, the actual LTE
> registration sets that bearer up. This is particularly common in
> Qualcomm based devices, you get registered to LTE and you just see the
> modem as disconnected but registered to LTE. Intel-based devices, like
> the TOBY, show instead the default LTE attach bearer as connected in
> CGDCONT as soon as it's registered in the LTE network, so we end up
> with the logic in MM trying to handle that by matching the APN with
> the MNCxxx.MCCxxx.GPRS suffix as if that suffix didn't exist. Not
> ideal, but works.
As explained above, this does not work for the Telekom SIM card, since
the default EPS bearer is (in this special Telekom scenario) only
suitable to esablish another LTE bearer, but not to transfer data. So it
is actually good that it does not match, except that the route is
missing to transfer data.
>
> Ideally, and I'm going to work on that in the following weeks, we
> should have an API to allow configuring that default LTE attach APN,
> and of course that requires the device to be fully unregistered from
> the network (so the CFUN=4 comment above makes sense). This should be
> some API that is totally independent from the connection process I
> think. See e.g. what Microsoft defines in this regard for MBIM
> devices: https://docs.microsoft.com/en-us/windows-hardware/drivers/network/mb-lte-attach-operations.
> If the device allows managing the default bearer settings, we should
> expose the ability to manage them in DBus. For the case of the
> TOBY-L2, this would be done with UCGDFLT as you showed.
>
That would be a good idea, but will (as far as I understand as of today)
not solve the problem I am facing with the Telekom SIM card. But when
using the +UIPROUTE command works, there is not need for me to set the
default bearer to make the Telekom SIM card work....
--
Ulrich Mohr
email: u.mohr at semex-engcon.com
More information about the ModemManager-devel
mailing list