What's new

How to enable mobile network on Ubuntu Server using Huawei E3372

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

BosseSwede

Regular Contributor
I have a Huawei E3372 USB dongle for connecting to LTE 4G mobile networks.
With this I use a SIM from a Swedish provider.
When I plug this into a Raspberry Pi4 device it connects in about 20-30 seconds and I can use it to communicate on the Internet.
The command ifconfig shows both eth0 and eth1 in the list on RPi4.

Now I would like to use it on my Ubuntu Server 20.04.3 (no desktop available) so I plugged it into USB2 on that computer.
And after the usual time the dongle blue light came on indicating it has connected.
But the connection does not appear inside Ubuntu!

So I would like to know if there is someone here who has succeeded in making it operate on an Ubuntu Server?

Information:
On the RPi4 the plugging in of the dongle causes a new network adapter to appear as eth1 and it is given a private IP address as shown:
Code:
$ ifconfig
(other devices removed)
eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.8.106  netmask 255.255.255.0  broadcast 192.168.8.255
        inet6 fe80::f979:ae78:fd83:1c35  prefixlen 64  scopeid 0x20<link>
        inet6 2a02:aa1:1023:596e:c830:58b7:43d:a7b0  prefixlen 64  scopeid 0x0<global>
        inet6 2a02:aa1:1023:596e:10:2030:4050:2  prefixlen 128  scopeid 0x0<global>
        ether 00:1e:10:1f:00:00  txqueuelen 1000  (Ethernet)
        RX packets 30  bytes 3617 (3.5 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 71  bytes 8835 (8.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
But on the Ubuntu server the ifconfig command does only show eth0, which is my wired connection.

I have checked more on Ubuntu with the dongle connected:
Code:
$ lsusb
(other devices removed)
Bus 001 Device 009: ID 12d1:14db Huawei Technologies Co., Ltd. E353/E3131

$ ip a
(other devices removed)
9: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:1e:10:1f:00:00 brd ff:ff:ff:ff:ff:ff

$ dmesg | grep 12d1
[144432.545519] usb 1-1: New USB device found, idVendor=12d1, idProduct=1f01, bcdDevice= 1.02

$ sudo ip link
(other devices removed)
9: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 00:1e:10:1f:00:00 brd ff:ff:ff:ff:ff:ff

As you can see the dongle seems to exist but is not in a usable state...

I have tried in vain to find a solution by googling, mostly I get to Windows related posts or to very old Ubuntu discussions...

How can I enable the eth1 interface on this Ubuntu Server 20.04.3?
 
Have you tried network manager?

sudo nmcli connection add type ethernet con-name huawei ifname eth1 sudo nmcli c up huawei

That should get you going...
 
Thanks, but:
Code:
$ sudo nmcli connection add type ethernet con-name huawei ifname eth1
sudo: nmcli: command not found
Notice that the device is a *server* and there is no desktop or corresponding programs...

After checking with google it turns out that networkmanager is only installed on Desktop versions of Ubuntu, and this is a Server installation so it apparently uses something called "netplan" instead.
 
Last edited:
I tried this sequence and got a bit further, but yet not working...
Code:
$ sudo ip link set eth1 up
$ sudo ip link
...
9: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether 00:1e:10:1f:00:00 brd ff:ff:ff:ff:ff:ff

$ sudo ifconfig eth1
eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 00:1e:10:1f:00:00  txqueuelen 1000  (Ethernet)
        RX packets 13  bytes 1664 (1.6 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

So it seems like it is somehow running but not usable...
What else do I have to do to get it going?
Note:
My LAN does not use IPv6 and my router DHCP just provides IPv4 addresses for the internal LAN.
The E3372 OTOH does act as a router with a DHCP handing out IPv4 addresses to clients (the computer it is plugged into).
 
Notice that the device is a *server* and there is no desktop or corresponding programs...

After checking with google it turns out that networkmanager is only installed on Desktop versions of Ubuntu, and this is a Server installation so it apparently uses something called "netplan" instead.

have you tried apt install network-manager modemmanager

modemmanager should pull in the other dependencies - qmi-tools and mbim along with the associated libraries.

Modem Manager should configure the modem out of the box, it should "just work"...

Network Manager does not require desktop, the commands I provided earlier are fine for CLI - there is also an ncurses based text UI that some might find handier than nmcli (nmcli is great for scripts, nmtui is perhaps easier to understand otherwise).

best of luck!
 
The E3372 OTOH does act as a router with a DHCP handing out IPv4 addresses to clients

ah.. the Huawei modem is in hilink mode - which means NAT - you might look to see about getting the stick firmware (it will convert from hilink to something perhaps much more useful) - google "e3372 stick mode" for details there...
 
ah.. the Huawei modem is in hilink mode - which means NAT - you might look to see about getting the stick firmware (it will convert from hilink to something perhaps much more useful) - google "e3372 stick mode" for details there...
Yes it uses eth1 when used on my RaspberryPi3 and it displays an IP address in the private range, so it implements a NAT "router" of sorts towards the RPi3. I can use that connection to go to the internet from the RPi but it depends on the way routing is set up. I have to fix the metric for the adapters to get the traffic to the correct interface.

Anyway I have now installed network manager on my Ubuntu box where the E3372 is now connected using:
Code:
sudo apt install network-manager
And it showed in the dialogs that it also installs modem-manager without explicitly mentioning it in the apt command.
Now when I call nmcli I get this:
Code:
$ nmcli
wlan0: disconnected
        "Realtek RTL8822CE"
        wifi (rtw_pci), 30:C9:AB:EB:13:C7, hw, mtu 1500

eth0: unmanaged
        "Realtek RTL8111/8168/8411"
        ethernet (r8169), A4:AE:12:7F:4D:C3, hw, mtu 1500

eth1: unmanaged
        "Huawei E353/E3131"
        ethernet (cdc_ether), 00:1E:10:1F:00:00, hw, mtu 1500

lo: unmanaged
        "lo"
        loopback (unknown), 00:00:00:00:00:00, sw, mtu 65536

tun0: unmanaged
        "tun0"
        tun, sw, mtu 1500

tun1: unmanaged
        "tun1"
        tun, sw, mtu 1500

Use "nmcli device show" to get complete information about known devices and
"nmcli connection show" to get an overview on active connection profiles.

Consult nmcli(1) and nmcli-examples(7) manual pages for complete usage details.
The interface I use toward the Ubuntu box is eth0, which attaches to my LAN.
What does "unmanaged" mean on all of the above listed devices?
I don't really think there is a WiFi on this computer, I have not seen any antenna connector and the box is fully metal...
It is a Lenovo IdeaCentre3 07A DA05 minitower.
 
What does "unmanaged" mean on all of the above listed devices?

Take a look at /etc/ModemManager/ModemManager.conf

if ifupdown says that managed is false, change that to true... and then restart ModemManager

nmcli should then indicate that the interfaces are now managed...

BTW - it does look like you have a realtek wifi PCI card on the machine - you can do an LSPCI and it should indicate that it is there along with the realtek ethernet interface...

if you want - install the driver, it's in the ubuntu repos...

apt install rtl8821ce-dkms

note - if you have secure boot enabled in UEFI, this will block the kernel mod from loading...
 
Last edited:
Take a look at /etc/ModemManager/ModemManager.conf

if ifupdown says that managed is false, change that to true... and then restart ModemManager

nmcli should then indicate that the interfaces are now managed...

BTW - it does look like you have a realtek wifi PCI card on the machine - you can do an LSPCI and it should indicate that it is there along with the realtek ethernet interface...

if you want - install the driver, it's in the ubuntu repos...

apt install rtl8821ce-dkms

note - if you have secure boot enabled in UEFI, this will block the kernel mod from loading...
I tried to do as you suggested but:
Code:
$ ll /etc/ModemManager
ls: cannot access '/etc/ModemManager': No such file or directory
So neither the conf file nor the directory itself exists on my system...

Next:
Code:
$ ifupdown
ifupdown: command not found
What gives here?

Regarding the WiFi device, I do not really need it because this is a server which should be hard wired to the LAN.

Checking ModemManager:
Code:
$ journalctl -u ModemManager
-- Logs begin at Wed 2021-07-07 04:06:02 CEST, end at Mon 2021-12-20 21:17:01 CET. --
Dec 20 13:55:29 ubuntuserv systemd[1]: Starting Modem Manager...
Dec 20 13:55:29 ubuntuserv ModemManager[146389]: <info>  ModemManager (version 1.16.6) starting in system bus...
Dec 20 13:55:29 ubuntuserv systemd[1]: Started Modem Manager.
Dec 20 13:55:32 ubuntuserv ModemManager[146389]: <info>  [base-manager] couldn't check support for device '/sys/devices/pci0000:00/0000:00:>
Dec 20 13:55:32 ubuntuserv ModemManager[146389]: <info>  [base-manager] couldn't check support for device '/sys/devices/pci0000:00/0000:00:>
Dec 20 13:55:32 ubuntuserv ModemManager[146389]: <info>  [base-manager] couldn't check support for device '/sys/devices/pci0000:00/0000:00:>
lines 1-7/7 (END)
-- Logs begin at Wed 2021-07-07 04:06:02 CEST, end at Mon 2021-12-20 21:17:01 CET. --
Dec 20 13:55:29 ubuntuserv systemd[1]: Starting Modem Manager...
Dec 20 13:55:29 ubuntuserv ModemManager[146389]: <info>  ModemManager (version 1.16.6) starting in system bus...
Dec 20 13:55:29 ubuntuserv systemd[1]: Started Modem Manager.
Dec 20 13:55:32 ubuntuserv ModemManager[146389]: <info>  [base-manager] couldn't check support for device '/sys/devices/pci0000:00/0000:00:01.2/0000:02:00.0': not supported by any plugin
Dec 20 13:55:32 ubuntuserv ModemManager[146389]: <info>  [base-manager] couldn't check support for device '/sys/devices/pci0000:00/0000:00:01.3/0000:03:00.0': not supported by any plugin
Dec 20 13:55:32 ubuntuserv ModemManager[146389]: <info>  [base-manager] couldn't check support for device '/sys/devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb1/1-1': not supported by any plugin

Has it really been initialized properly?
And is it in use if the system uses netplan, like Ubuntu server 20 does?
 
my bad... trying to do too many things at once...

/etc/NetworkManager/NetworkManager.conf

That should work...

netplan - depends on your preference - it's new, and nice to play if one is doing docker, etc...

It is not required in any case... my preference is not to use netplan as this involves systemd-networkd, and i'd rather not have systemd doing more than it has to...

To use NetworkManager, your /etc/netplan/*.yaml file should look like:

network:
version: 2
renderer: NetworkManager

--

sudo netplan generate
sudo netplan apply

reboot

then NetworkManager should work.
 
Today I tried the E3372 on my HP laptop running Ubuntu Desktop 20.04.3.
I just plugged it into an USB3 port and watched the green light turn blue after some time.
Then I inspected the system:
Code:
$ dmesg
usb 3-1: new high-speed USB device number 2 using xhci_hcd
usb 3-1: New USB device found, idVendor=12d1, idProduct=1f01, bcdDevice= 1.02
usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 3-1: Product: HUAWEI_MOBILE
usb 3-1: Manufacturer: HUAWEI_MOBILE
usb 3-1: SerialNumber: 0123456789ABCDEF
usb-storage 3-1:1.0: USB Mass Storage device detected
scsi host6: usb-storage 3-1:1.0
usbcore: registered new interface driver usb-storage
usbcore: registered new interface driver uas
usb 3-1: USB disconnect, device number 2
usb 3-1: new high-speed USB device number 3 using xhci_hcd
usb 3-1: New USB device found, idVendor=12d1, idProduct=14db, bcdDevice= 1.02
usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 3-1: Product: HUAWEI_MOBILE
usb 3-1: Manufacturer: HUAWEI_MOBILE
cdc_ether 3-1:1.0 eth0: register 'cdc_ether' at usb-0000:26:00.0-1, CDC Ethernet Device, 00:1e:10:1f:00:00
usbcore: registered new interface driver cdc_ether
cdc_ether 3-1:1.0 enx001e101f0000: renamed from eth0

$ifconfig
#removed unrelated information
enp0s25: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.119.241  netmask 255.255.255.0  broadcast 192.168.119.255
        inet6 fe80::5563:40d3:9d8e:2689  prefixlen 64  scopeid 0x20<link>
        ether ec:9a:74:fb:b9:cf  txqueuelen 1000  (Ethernet)
        ...
enx001e101f0000: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.8.107  netmask 255.255.255.0  broadcast 192.168.8.255
        inet6 2a02:aa1:1022:ee57:77a2:c1af:7efd:9a78  prefixlen 64  scopeid 0x0<global>
        inet6 2a02:aa1:1022:ee57:10:2030:4050:2  prefixlen 128  scopeid 0x0<global>
        inet6 fe80::5af8:89eb:9702:4ab  prefixlen 64  scopeid 0x20<link>
        inet6 2a02:aa1:1022:ee57:8d6e:bcb4:2019:df47  prefixlen 64  scopeid 0x0<global>
        ether 00:1e:10:1f:00:00  txqueuelen 1000  (Ethernet)
        RX packets 1010  bytes 218837 (218.8 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1282  bytes 179158 (179.1 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlo1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.119.184  netmask 255.255.255.0  broadcast 192.168.119.255
        inet6 fe80::c164:cdcb:8e7b:ad4c  prefixlen 64  scopeid 0x20<link>
        ether 08:11:96:6f:63:4c  txqueuelen 1000  (Ethernet)
        ...

$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         router.asus.com 0.0.0.0         UG    100    0        0 enp0s25
default         www.huaweimobil 0.0.0.0         UG    101    0        0 enx001e101f0000
default         router.asus.com 0.0.0.0         UG    600    0        0 wlo1
link-local      0.0.0.0         255.255.0.0     U     1000   0        0 enp0s25
192.168.8.0     0.0.0.0         255.255.255.0   U     101    0        0 enx001e101f0000
192.168.119.0   0.0.0.0         255.255.255.0   U     100    0        0 enp0s25
192.168.119.0   0.0.0.0         255.255.255.0   U     600    0        0 wlo1

So it seems like I now have 3 active network adapters:
enp0s25 - the regular Ethernet NIC
enx001e101f0000 - the mobile broadmand NIC
wlo1 - the WiFi of the laptop

Questions:
1) How can I test this via the PuTTY connection to the laptop?
If I simply make a web call, how can I make sure it uses the enx001e101f0000 interface (E3372 device)?

2) Since this looks like it works on the Ubuntu Desktop system, how can I make it work also on the Ubuntu Server system?
(This is really the topic of this thread)
 
Last edited:

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top