Re: manage a modem connection



Hey,

I have a "e3372h-153" Huawei 4G USB dongle.

This dongle works with the "huawei_cdc_ncm" kernel driver.

Once connected,  two devices appear : /dev/ttyUSB0 and
/dev/cdc-wdm1.
These ones are used to talk to the modem itself.

There is also a network interface appearing, which is (I
believe)
related to the driver "huawei_cdc_ncm" and the NCM protocol :

wwx001e101f0000: flags=4098<BROADCAST,MULTICAST>  mtu 1500
        ether 00:1e:10:1f:00:00  txqueuelen 1000  (Ethernet)

I am able to connect the modem with "mmcli ...", yet still I
have
to configure
the corresponding network interface in order to access the
web.

When using only ModemManager/mmcli this is expected, yes. You
need to
look for the connected bearer details (e.g. mmcli -b 0 probably)
and
then apply the IP addressing changes showed there.


I cannot find any bearer.


When using NetworkManager, you should get a bearer object once you're connected.

But this
interface does not show up with "nmcli device show". I am
however
able to
issue "dhclient wwx001e101f0000" and it works.


NetworkManager does not refer to the modem based on the network
interface it exposes, it refers to the modem based on the
primary
control port exposed by the modem (e.g. cdc-wdm0 probably).


Ok, I understand, "nmcli -m 0" gives :

  System   |               device:
  /sys/devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.1/1-1.1.3
           |              drivers: huawei_cdc_ncm, option1
           |               plugin: huawei
           |         primary port: ttyUSB0
           |                ports: cdc-wdm1 (at), ttyUSB0 (at),
           wwx001e101f0000 (net)

so, there are two control ports and one data port. NetworkManager
defaults to the primary port :

ttyUSB0: déconnecté
        "Intel Sunrise Point-LP 3.0 xHCI"
        gsm (huawei_cdc_ncm, option1), hw


What ModemManager version are you using?
I think at some point the logic changed so that the cdc-wdm port is
only set as primary port if there is no other port explicitly flagged
as primary. That shouldn't be a problem to bring the connection up
with the net port, though (I think!)


I also tried "nm-connection-editor". This one finds the modem
(gsm) but it seems to
settle a connection through ppp.I would prefer a connection
through wwx001e101f0000
because it uses the NCM protocol, known to be faster than PPP.


This is the way to go. If ModemManager doesn't use the cdc-wdm
port
plus the network interface for the connection, there must be a
reason
for that, we need to find why.

Do the cdc-wdm and the net port show up in the list of ports
reported
in "mmcli -m 0"?


yes, but I tried again, nm-connection-editor lets me choose
"Mobile Connection",
but I see settings for PPP.


Oh, but you seeing settings for PPP doesn't mean the connection will
be using PPP. If ModemManager decides at runtime that the connection
goes through the net port, the PPP settings will be ignored.

Then, how come that I cannot see and configure wwx001e101f0000
with nmcli, just like
any other network (wired, wifi) interface ?

Because that interface is a modem network interface, and so the
main
interface that NetworkManager would refer to is the control
port, not
the data port (as the data port is chosen dynamically on
runtime).

Ok, I understand.

Maybe this is because NetworkManager sees ttyUSB0 first and then
thinks
it is a PPP connection. How could I make NetworkManager consider
only
cdc-wdm1 (in my c

As said before, NetworkManager is not thinking it will be a PPP
connection, NM cannot know in advance what kind of connection it will
be. Well it could, but it doesn't really do any guess. Instead NM
waits for the bearer object exposed by MM to know which kind of
connection it will be.

Please try to connect the modem using NetworkManager, ignore the PPP
settings in nm-connection-editor, and get the output of mmcli -b 0 to
see what the bearer settings are (once connected!). If the settings in
the bearer object say that PPP is requested over the ttyUSB, then
please rerun everything while gathering MM+NM debug logs, to try to
see why exactly the net port was ignored:
https://www.freedesktop.org/wiki/Software/ModemManager/Debugging/


-- 
Aleksander
https://aleksander.es


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