Re: Interactions with ModemManager



On Fri, 2017-04-21 at 11:32 +0100, Colin Helliwell wrote:
On 20 April 2017 at 17:28 Dan Williams <dcbw redhat com> wrote:

On Mon, 2017-04-10 at 14:40 +0100, Colin Helliwell wrote:

A couple of things I've noticed in integrating NM with
ModemManager:

1.  It seems that eth0 doesn't come up - i.e. dhcp client not
fired
off - until MM has done it's startup operations on the GSM modem.
It
so happens that my GSM has a long power-on pause, and that is
holding
up the system's eth network start-up too. Not a huge problem as a
hyper-fast startup isn't needed, but not ideal..

Missed this message... This may be due to NM's "startup" function,
where it waits for all interfaces that exist at startup to settle
before it tries to do anything with them. This tries to ensure that
composed devices (eg, bonds, bridges, teams, etc) have all the
components they need at startup.

So yeah, that could prevent things from happening if the GSM modem
takes a long time to power on. You might be able to work around
this
by setting the NM "wwan enabled" property to "off" and then having
scripts or something flip that on later? A dispatcher script could
do
that perhaps.

1.  Even after the initial 'query' start-up on the GSM, NM seems
to
leave it enabled (as per mmcli -m 0), rather than leaving it
disabled
until called upon (with a nmcli conn up XX)

NM has the 'wwan-enabled' option which controls whether it powers
up
modems on start. If that option is off, NM will leave them in
'disabled' state until the 'nmcli con up XXX'.

Try setting 'nmcli radio wwan off', ensuring the modem is disabled
in
MM, then restarting NM. Does that keep the modem disabled?

Just been having a try-out with that control. I see that the state
persists across reboot - is there a way to force a particular bootup
setting?

Yeah, you can twiddle that knob before NM starts in
/var/lib/NetworkManager/NetworkManager.state as you wish:

[main]
WWANEnabled=true   (or "false")

Just create the file if it doesn't exist, or use sed or something to
modify the value.  You could also change it with 'nmcli' at any point
during NM startup to, and NM should do the right thing.

Dan


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]