Question about 3gpp-profile-manager to select proper PDP context ID
Aleksander Morgado
aleksander at aleksander.es
Sat Feb 12 00:02:06 UTC 2022
Hey,
>
> I'm struggling to connect to a private Vodafone APN using MM and NM.
>
> Modem Telit LE910-EU1 (MBIM)
> ModemManager 1.18.6
> libmbim 1.18.4
> libqmi 1.30.2
> NetworkManager 1.22.10
>
> My problem is, that the bearer gets connected, but not assigned an IP address.
> To make it work, I was told to use PDP context ID 3 instead of 1 for this private APN.
>
Daniele, Carlo, would you know why CID 3 is so important to make this work?
Could it be that is the default context for the initial defaut EPS
bearer settings?
Carsten, could you try to setup the APN settings you require with
--3gpp-set-initial-eps-bearer-settings instead?
E.g. mmcli -m a
--3gpp-set-initial-eps-bearer-settings="apn=apn.vodafone.de,ip-type=ipv4,allowed-auth=pap,user=abc,password=def"
If that doesn't work, you can always reset them with
--3gpp-set-initial-eps-bearer-settings=""
> When searching the internet, I've found this older thread about selecting a CID.
> https://lists.freedesktop.org/archives/modemmanager-devel/2021-February/008420.html
>
> With MR 179 merged, this feature should be available now.
> Unfortunately, the documentation about 3gpp-profile-management is a little bit
> poor and mmcli --help-3gpp-profile-manager leaves me with some questions.
>
> Is the 3gpp-profile-manager 'profile-id' corresponding with the PDP context ID (CID)
> which can be set by AT+CGDCONT?
>
At least that is what we try, yes. We're a bit limited here to what
the actual protocol allows us to do, but IIIRC, whenever possible, the
profile id is equal to the cid in +CGDCONT.I
> From the merge request discussion, I've noticed, that one cannot specify a specific
> profile-id when creating a new profile.
> Do I have to create empty profiles until getting to the profile ID to use?
>
Yeah, this is a limitation in the generic QMI services I think, which
we inherited in our API. Sierra Wireless has its own QMI service
additions to provide a method that allows creating profiles with a
specific ID, but those are not generic.
> For instance:
>
> root at dev:~# mmcli -m 0 --3gpp-profile-manager-set=""
> ---------------------------
> 3GPP profile manager | set: profile-id: 1
> | apn-type: default
> root at dev:~# mmcli -m 0 --3gpp-profile-manager-set=""
> ---------------------------
> 3GPP profile manager | set: profile-id: 2
> | apn-type: default
Yes. It's a bit of a hack if you're looking to update a specific CID,
but should work. As long as you want to edit a CID with a low number
:)
> root at dev:~# mmcli -m 0 --3gpp-profile-manager-set="apn=apn.vodafone.de,ip-type=ipv4,allowed-auth=pap,user=abc,password=def"
> error: couldn't set profile: 'GDBus.Error:org.freedesktop.libmbim.Error.Core.InvalidMessage: Couldn't validate update of profile '3': cannot read string data (6 bytes) (274 < 278)'
>
Oh, that's an error deep in the MBIM protocol. Could be a bug in the
message format, or a malformed response sent by the module (I would
bet on the latter 😀). Can you gather ModemManager *debug* logs while
you run that operation? See
https://modemmanager.org/docs/modemmanager/debugging/
> I wonder, what are the correct options to be passed to 3gpp-profile-manager-set?
> My first assumption is to use the same options as for create-bearer.
>
> After deleting all profiles, I can use the same settings
> for profile 1 and 2 with success, but for profile 3 it fails.
>
> root at dev:~# mmcli -m 0 --3gpp-profile-manager-delete=3
> successfully deleted the profile
> root at dev:~# mmcli -m 0 --3gpp-profile-manager-delete=2
> successfully deleted the profile
> root at dev:~# mmcli -m 0 --3gpp-profile-manager-delete=1
> successfully deleted the profile
> root at dev:~# mmcli -m 0 --3gpp-profile-manager-set="apn=apn.vodafone.de,ip-type=ipv4,allowed-auth=pap,user=abc,password=def"
> ---------------------------
> 3GPP profile manager | set: profile-id: 1
> | apn: apn.vodafone.de
> | allowed-auth: pap
> | user: abc
> | password: d
> | apn-type: default
>
> Why are the last two characters of the given password "def" not shown?
> I've tried with password='def' (in single quotes), but that doesn't help.
>
That's the same bug as above.
> root at dev:~# mmcli -m 0 --3gpp-profile-manager-set="apn=apn.vodafone.de,ip-type=ipv4,allowed-auth=pap,user=abc,password=def"
> ---------------------------
> 3GPP profile manager | set: profile-id: 2
> | apn: apn.vodafone.de
> | allowed-auth: pap
> | user: abc
> | password: d
> | apn-type: default
> root at dev:~# mmcli -m 0 --3gpp-profile-manager-set="apn=apn.vodafone.de,ip-type=ipv4,allowed-auth=pap,user=abc,password=def"
> error: couldn't set profile: 'GDBus.Error:org.freedesktop.libmbim.Error.Core.InvalidMessage: Couldn't validate update of profile '3': cannot read string data (6 bytes) (358 < 362)'
>
> Is this a bug?
>
Yes.
> I've found, that setting profile ID 3 only succeeds, if only "apn=apn.vodafone.de" is given.
>
> root at dev:~# mmcli -m 0 --3gpp-profile-manager-delete=3
> successfully deleted the profile
> root at dev:~# mmcli -m 0 --3gpp-profile-manager-set="apn=apn.vodafone.de"
> ---------------------------
> 3GPP profile manager | set: profile-id: 3
> | apn: apn.vodafone.de
> | apn-type: default
>
>
> If I try to give a username, it fails.
>
> root at dev:~# mmcli -m 0 --3gpp-profile-manager-delete=3
> successfully deleted the profile
> root at dev:~# mmcli -m 0 --3gpp-profile-manager-set="apn=apn.vodafone.de,user=abc"
> error: couldn't set profile: 'GDBus.Error:org.freedesktop.libmbim.Error.Core.InvalidMessage: Couldn't validate update of profile '3': cannot read string data (6 bytes) (352 < 354)'
>
I think this is still the same error as above.
> If I could manage to set profile-id 3 properly with the requested APN settings, do I have to create
> the bearer pointing to the profile-id in this way?
>
> mmcli -m 0 --create-bearer="profile-id=3"
>
Yes.
--
Aleksander
https://aleksander.es
More information about the ModemManager-devel
mailing list