Getting a Huawei E3327 USB 4G modem to work with Raspberry Pi 4 running DietPi (Debian)
0
votes
0
answers
205
views
I want a Huawei E3327 to work as a fallback on a Raspberry Pi 4B.
The modem shows constant cyan light, which means that there es a 4G connection established (I previously configured APN using a windows machine).
I successfully used usb_modeswitch to switch the modem in the right state, and a a new network interface
eth1
shows up.
I configured a static IP, my /etc/network/interfaces
looks like:
# Drop-in configs
source interfaces.d/*
# Ethernet
allow-hotplug eth0
iface eth0 inet dhcp
address 192.168.0.100
netmask 255.255.255.0
gateway 192.168.0.1
#dns-nameservers 192.168.0.1
# WiFi
allow-hotplug wlan0
iface wlan0 inet dhcp
address 192.168.0.100
netmask 255.255.255.0
gateway 192.168.0.1
#dns-nameservers 192.168.0.1
wireless-power off
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
# hotspot
iface wlan1 inet static
address 192.168.42.1
netmask 255.255.255.0
gateway 192.168.42.1
dns-nameservers 192.168.42.1
#HUAWEI E3372
allow-hotplug eth1
iface eth1 inet static
address 192.168.8.100
netmask 255.255.255.0
network 192.168.8.0
broadcast 192.168.8.255
There is also the internal WiFi connection of the RasPi and an external USB WiFi dongle configured as a hotspot, which works.
The problem: I can only ping 8.8.8.8
when there is a wifi connection. The huawei modem does not seem to work.
Without the wifi connection I get Network is unreachable
when I try ping 8.8.8.8
with established wifi connection, ip address
shows:
1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: eth0: mtu 1500 qdisc mq state DOWN group default qlen 1000
link/ether d8:3a:dd:01:c0:55 brd ff:ff:ff:ff:ff:ff
3: wlan0: mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether d8:3a:dd:01:c0:56 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.136/24 brd 192.168.0.255 scope global dynamic wlan0
valid_lft 603872sec preferred_lft 603872sec
4: wlan1: mtu 2312 qdisc mq state UP group default qlen 1000
link/ether 34:60:f9:64:4f:98 brd ff:ff:ff:ff:ff:ff
5: eth1: mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 00:1e:10:1f:00:00 brd ff:ff:ff:ff:ff:ff
inet 192.168.8.100/24 brd 192.168.8.255 scope global eth1
valid_lft forever preferred_lft forever
How can I make the modem work and act as a fallback when there is no WiFi connection?
Asked by elsni
(144 rep)
Jun 1, 2023, 11:28 AM