Initial Bearer APN is incorrect

Aleksander Morgado aleksander at aleksander.es
Tue Dec 10 09:18:02 UTC 2019


Hey,

>
> I’m using Sierra EM7565 in latest openwrt with MM 1.12.0. When I start a connection using “—simple-connect” command then the “initial bearer” used is the APN which was last made active. This breaks in some private APNs which do not recognise that APN.  Please refer to below command sequence. I would have thought when we delete the bearer then the corresponding CGDCONT should have also got deleted but that’s not happening and I think this is the reason why “initial bearer” from the new connection uses the “old deleted bearer APN”
>
>
>
> # mmcli -m 0 -e
>
> successfully enabled the modem
>
>
>
> # mmcli -m 0 --simple-connect="apn=airtelgprs.com"
>
> successfully connected the modem
>
>
>
> # mmcli -m 0 --command=AT+CGDCONT?
>
> response: '+CGDCONT: 1,"IP","airtelgprs.com","0.0.0.0",0,0,0,0'
>
>
>
> # mmcli -m 0
>
>>
> Bearer   |                dbus path: /org/freedesktop/ModemManager1/Bearer/1
>
>
>
> # mmcli -m 0 --simple-disconnect=/org/freedesktop/ModemManager1/Bearer/1
>
> successfully disconnected all bearers in the modem
>
>
>
> # mmcli -m 0 --delete-bearer=/org/freedesktop/ModemManager1/Bearer/1
>
> successfully deleted bearer from modem
>
>
>
> # mmcli -m 0 --command=AT+CGDCONT?
>
> response: '+CGDCONT: 1,"IP","airtelgprs.com","0.0.0.0",0,0,0,0
>
>
>
> From above, CGDCONT is still present and not deleted from mode. I ran mm in debug mode but no output when “—delete-bearer” command is executed. Now start a new connection:
>
>
>
> # mmcli -m 0 --simple-connect="apn=jionet"
>
> successfully connected the modem
>
>
>
> # mmcli -m 0
>
> ….
>
>   3GPP EPS |     ue mode of operation: csps-2
>
>            | initial bearer dbus path: /org/freedesktop/ModemManager1/Bearer/3
>
>            |       initial bearer apn: airtelgprs.com
>
>            |   initial bearer ip type: ipv4
>
>
>
> As you can see initial bearer apn is “airtelgprs.com” which we deleted previously
>
>
>
> Any advise will be of great help.
>
>
>
> Thanks
>
> Amol
>
>
>
> Full output (and mmcli -b output reports that new apn is “jionet”)
>
>
>
> root at OpenWrt:/# mmcli -m 0
>
>   ------------------------------------
>
>   General  |                dbus path: /org/freedesktop/ModemManager1/Modem/0
>
>            |                device id: b1778145998fe05be11f9841377b5222e395cd27
>
>   ------------------------------------
>
>   Hardware |             manufacturer: Sierra Wireless, Incorporated
>
>            |                    model: Sierra Wireless EM7565 Qualcomm® Snapdragon™ X16 LTE-A
>
>            |        firmware revision: SWI9X50C_01.11.00.00
>
>            |           carrier config: default
>
>            |             h/w revision: EM7565
>
>            |                supported: gsm-umts, lte
>
>            |                  current: gsm-umts, lte
>
>            |             equipment id: 359260080211680
>
>   ------------------------------------
>
>   System   |                   device: /sys/devices/platform/soc/soc:internal-regs/f10f8000.usb3/usb5/5-1
>
>            |                  drivers: qcserial, cdc_mbim
>
>            |                   plugin: Sierra
>
>            |             primary port: cdc-wdm0
>
>            |                    ports: ttyUSB0 (qcdm), ttyUSB1 (gps), ttyUSB2 (at),
>
>            |                           cdc-wdm0 (mbim), wwan0 (net)
>
>   ------------------------------------
>
>   Numbers  |                      own: 918660286965
>
>   ------------------------------------
>
>   Status   |           unlock retries: sim-pin2 (3)
>
>            |                    state: connected
>
>            |              power state: on
>
>            |              access tech: lte
>
>            |           signal quality: 19% (recent)
>
>   ------------------------------------
>
>   Modes    |                supported: allowed: 3g; preferred: none
>
>            |                           allowed: 4g; preferred: none
>
>            |                           allowed: 3g, 4g; preferred: 3g
>
>            |                           allowed: 3g, 4g; preferred: 4g
>
>            |                  current: allowed: 4g; preferred: none
>
>   ------------------------------------
>
>   Bands    |                supported: utran-1, utran-4, utran-6, utran-5, utran-8, utran-9,
>
>            |                           utran-2, eutran-1, eutran-2, eutran-3, eutran-4, eutran-5, eutran-7,
>
>            |                           eutran-8, eutran-9, eutran-12, eutran-13, eutran-18, eutran-19,
>
>            |                           eutran-20, eutran-26, eutran-28, eutran-29, eutran-30, eutran-32,
>
>            |                           eutran-41, eutran-46, eutran-66, utran-19
>
>            |                  current: eutran-1, eutran-2, eutran-3, eutran-4, eutran-5, eutran-7,
>
>            |                           eutran-8, eutran-9, eutran-12, eutran-13, eutran-18, eutran-19,
>
>            |                           eutran-20, eutran-26, eutran-28, eutran-29, eutran-30, eutran-32,
>
>            |                           eutran-41, eutran-46, eutran-66
>
>   ------------------------------------
>
>   IP       |                supported: ipv4, ipv6, ipv4v6
>
>   ------------------------------------
>
>   3GPP     |                     imei: 359260080211680
>
>            |            enabled locks: fixed-dialing
>
>            |              operator id: 405861
>
>            |            operator name: Jio 4G
>
>            |             registration: home
>
>   ------------------------------------
>
>   3GPP EPS |     ue mode of operation: csps-2
>
>            | initial bearer dbus path: /org/freedesktop/ModemManager1/Bearer/3
>
>            |       initial bearer apn: airtelgprs.com
>
>            |   initial bearer ip type: ipv4
>
>   ------------------------------------
>
>   SIM      |                dbus path: /org/freedesktop/ModemManager1/SIM/0
>
>   ------------------------------------
>
>   Bearer   |                dbus path: /org/freedesktop/ModemManager1/Bearer/2
>

This is interesting, and from what I can tell this is specific
behavior from the modem firmware.

When a bearer is deleted from MM, there is no communication with the
modem because deleting a bearer in MM means we just delete the object
in DBus. There is no "PDP context/EPS bearer management" yet in MM
(although, see https://gitlab.freedesktop.org/mobile-broadband/ModemManager/merge_requests/179
for an initial approach doing that).

The fact that the modem decides to use as initial bearer APN the last
APN used for a connection attempt seems wrong to me. I'm not sure,
maybe you should discuss this with the manufacturer because I'm not
entirely sure that that logic makes full sense. In MBIM there are
specific service extensions that allow configuring the initial EPS
bearer settings, which are the ones ModemManager uses when you run
mmcli --3gpp-set-initial-eps-bearer-settings="apn=whatever". As a
workaround, you may want to check the settings and if they're not the
ones you want, change them with that command above.

-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list