Re: bad gsm connections

On Tue, 2017-03-07 at 16:28 +0200, matti kaasinen wrote:

I would appreciate advices how to cope bad gsm connections with NM. I
have auto set-up for gsm configuration.
Modem gets huawei_cdc_ncm and NM brings up WWAN0 interface. What I
can see
from systemd journal is that NM tries to keep connection by
unplugging and
plugging kernel driver (or somthing like that as "USB Mass Storage
detected", gets enumerated and drivers registered...).

That's the modem firmware crashing and restarting.  It then reappears
to the kernel and gets re-enumerated, and usb_modeswitch does its thing
and then eventually it comes back as a modem.  Which could be due to
any number of issues.

But the first thing to check is whether the modem has enough power. 
Laptops and embedded devices are sometimes unable to supply enough
power to the USB ports while the modem is connected.  USB modems are
even sometimes shipped with Y cables that draw power from two USB ports
to give to the modem.  If your device is a PCIe minicard, obviously you
can't use a Y cable, but the problem could be the same.  If you can try
the device in a different machine that has sufficient power, this can
isolate the problem.

It could also be a command sequence that ModemMangaer sends to the
modem, which it doesn't like and crashes.  Could also be driver issues.

Somehow this does not always work well enough, and connection does
recover before this embedded Linux card boots up.
I do also have connection monitor that tries to ping external server
and it
power sequences modem if PING does not succeed and eventually, if
lasts long enough also boots the card. Somehow, this sounds as
overkill to
have two processes executing virtually the same process. I tried to
if NM did also power sequencing, but I could not detect that.
However, I
did find
that discusses the very thing. I checked my kernel configuration and
turned out that rfkill was not enabled.

Is NM executing "wwan off" at the moments it unplugs kernel driver
(or what
looks me to unplugging it) so that I could drop that feature from
connection monitor - provided that rfkill really touches usb power?
do already have some services for usb power hanling in sysfs that my
connection monitor uses for this power sequencing.

rfkill may or may not touch USB power depending on the hardware. 
Sometimes its wired into the machine's BIOS or embedded controller,
other times it's just a signal to the device to do something but
doesn't actually shut power off to the device itself.

If a ping doesn't succeed, I'd be very curious if terminating the
connection, setting the modem to low-power mode (via mmcli or 'nmcli r
wwan off') works instead of power cycling the modem.


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