Specifying bearer IPv4 method

Aleksander Morgado aleksander at aleksander.es
Wed Jun 15 19:05:15 UTC 2022


Hey Tim,

> > The user selection of the IP type to use can be done either in
> > Simple.Connect() or in Modem.CreateBearer():
>
> > The user will select IP type to use in either MMBearerProperties or
> > MMSimpleConnectProperties and then MM will expose which one was agreed
> > with the network in the read-only MMBearerIpConfig.
>
> The IP type isn't quite what I'm looking for. The issue is that, after
> setting the type to IPv4, I'm unsure how to set the MMBearerIpMethod:
>   https://www.freedesktop.org/software/ModemManager/api/1.8.0/ModemManager-Flags-and-Enumerations.html#MMBearerIpMethod
>

Oh, that's indeed a completely different thing, I may have misread
your original email.
The issue with the IP method is that it's something ModemManager will
select for you, based on the ports it was able to detect in the modem.
In other words, this is not a setting the user can choose. E.g. if MM
detects a modem that we know can do DHCP on the net interface, the IP
method will be DHCP; if MM doesn't detect any net interface, it will
default to PPP, and so on.

> Looking through the MMBearerProperties documentation, I'm unable to
> see how to set the MMBearerIpMethod. This means that sometimes it
> comes up as IPv4/PPP rather than IPv4/Static.
>

That is likely because the necessary port probing is failing
somewhere, or ports are not being notified to ModemManager on time.
E.g. if you have a QMI modem and *sometimes* we cannot detect the QMI
port properly, it's very likely it'll default to PPP. The solution
here is to fix that failing port probing, if there is any. If you can
gather MM debug logs on a test run where it did a fallback to PPP, we
can try to see why that happened, see
https://modemmanager.org/docs/modemmanager/debugging/.

One known cause for such behavior I think was with very slow systems
in which the kernel reported ports with a lot of time in between
reports. On such a system, MM may end up thinking that all the modem
ports were already notified by the time it tries to detect the correct
support for the different features. I think a recent fix was already
included in some 1.18.x release to handle that in a better way.



--
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list