Beaglebone Black - SIMCOM LTE modem rndis disconnect on ETH0 auto config

Hello everyone,
I have recently purchased a beaglebone black and experimenting with IoT applications through connecting a SIMCOM 4G dongle through USB connection. I’m creating a Internet router which provides internet access to LAN clients via ETH0 and WAN access to beaglebone via LTE SIMCOM7600 dongle.

I observed two cases while operating LTE modem with beaglebone black

CASE 1:
With network interfaces configured as follows, Beaglebone black is connected to Internet, able to ping and appears in network interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback


# The primary network interface
#auto eth0
iface eth0 inet static
  address 192.168.4.1
  netmask 255.255.255.0
  gateway 192.168.4.1
  #broadcast 192.168.4.255
#auto usb2
#iface usb2 inet dhcp

debian@beaglebone:~$ lsusb
Bus 001 Device 002: ID 1e0e:9011 Qualcomm / Option
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
debian@beaglebone:~$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.225.1   0.0.0.0         UG    0      0        0 usb2
192.168.6.0     0.0.0.0         255.255.255.0   U     0      0        0 usb1
192.168.7.0     0.0.0.0         255.255.255.0   U     0      0        0 usb0
192.168.225.0   0.0.0.0         255.255.255.0   U     0      0        0 usb2
192.168.225.1   0.0.0.0         255.255.255.255 UH    0      0        0 usb2
debian@beaglebone:~$ ping google.com
PING google.com(bom07s33-in-x0e.1e100.net (2404:6800:4009:826::200e)) 56 data bytes
64 bytes from bom07s33-in-x0e.1e100.net (2404:6800:4009:826::200e): icmp_seq=1 ttl=116 time=56.1 ms
64 bytes from bom07s33-in-x0e.1e100.net (2404:6800:4009:826::200e): icmp_seq=2 ttl=116 time=55.1 ms
^C
--- google.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 3ms
rtt min/avg/max/mdev = 55.121/55.613/56.105/0.492 ms
debian@beaglebone:~$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=112 time=63.9 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=112 time=42.4 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=112 time=40.5 ms
^C
--- 8.8.8.8 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 6ms
rtt min/avg/max/mdev = 40.480/48.917/63.897/10.621 ms
debian@beaglebone:~$ ifconfig
eth0: flags=-28605<UP,BROADCAST,RUNNING,MULTICAST,DYNAMIC>  mtu 1500
        inet 169.254.128.70  netmask 255.255.0.0  broadcast 169.254.255.255
        inet6 fe80::42bd:32ff:fe25:179b  prefixlen 64  scopeid 0x20<link>
        ether 40:bd:32:25:17:9b  txqueuelen 1000  (Ethernet)
        RX packets 104  bytes 11848 (11.5 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 47  bytes 11189 (10.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 55

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 156  bytes 11660 (11.3 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 156  bytes 11660 (11.3 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

usb0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.7.2  netmask 255.255.255.0  broadcast 192.168.7.255
        ether 40:bd:32:25:17:9d  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        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

usb1: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.6.2  netmask 255.255.255.0  broadcast 192.168.6.255
        ether 40:bd:32:25:17:a1  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        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

usb2: flags=-28605<UP,BROADCAST,RUNNING,MULTICAST,DYNAMIC>  mtu 1500
        inet 192.168.225.35  netmask 255.255.255.0  broadcast 192.168.225.255
        inet6 2409:4040:d89:3964:6c14:b5ff:fe69:1522  prefixlen 64  scopeid 0x0<global>
        inet6 fe80::6c14:b5ff:fe69:1522  prefixlen 64  scopeid 0x20<link>
        ether 6e:14:b5:69:15:22  txqueuelen 1000  (Ethernet)
        RX packets 106  bytes 17328 (16.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 160  bytes 29392 (28.7 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


CASE 2:
When network interfaces are configured as follows

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback


# The primary network interface
auto eth0
iface eth0 inet static
  address 192.168.4.1
  netmask 255.255.255.0
  gateway 192.168.4.1
  #broadcast 192.168.4.255
#auto usb2
#iface usb2 inet dhcp

debian@beaglebone:~$ lsusb
Bus 001 Device 002: ID 1e0e:9011 Qualcomm / Option
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
debian@beaglebone:~$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         0.0.0.0         0.0.0.0         U     0      0        0 eth0
link-local      0.0.0.0         255.255.0.0     U     0      0        0 eth0
192.168.4.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
192.168.6.0     0.0.0.0         255.255.255.0   U     0      0        0 usb1
192.168.7.0     0.0.0.0         255.255.255.0   U     0      0        0 usb0
debian@beaglebone:~$ ping google.com
PING google.com(bom07s26-in-x0e.1e100.net (2404:6800:4009:81c::200e)) 56 data bytes
64 bytes from bom07s26-in-x0e.1e100.net (2404:6800:4009:81c::200e): icmp_seq=1 ttl=57 time=59.1 ms
64 bytes from bom07s26-in-x0e.1e100.net (2404:6800:4009:81c::200e): icmp_seq=2 ttl=57 time=37.5 ms
64 bytes from bom07s26-in-x0e.1e100.net (2404:6800:4009:81c::200e): icmp_seq=3 ttl=57 time=35.8 ms
^C
--- google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 5ms
rtt min/avg/max/mdev = 35.773/44.119/59.078/10.603 ms
debian@beaglebone:~$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
From 192.168.4.1 icmp_seq=1 Destination Host Unreachable
From 192.168.4.1 icmp_seq=2 Destination Host Unreachable
From 192.168.4.1 icmp_seq=3 Destination Host Unreachable
From 192.168.4.1 icmp_seq=4 Destination Host Unreachable
^C
--- 8.8.8.8 ping statistics ---
6 packets transmitted, 0 received, +4 errors, 100% packet loss, time 60ms
pipe 4
debian@beaglebone:~$ ifconfig
eth0: flags=-28605<UP,BROADCAST,RUNNING,MULTICAST,DYNAMIC>  mtu 1500
        inet 192.168.4.1  netmask 255.255.255.0  broadcast 192.168.4.255
        inet6 fe80::42bd:32ff:fe25:179b  prefixlen 64  scopeid 0x20<link>
        ether 40:bd:32:25:17:9b  txqueuelen 1000  (Ethernet)
        RX packets 337  bytes 28714 (28.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 450  bytes 46013 (44.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 55

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 217  bytes 17829 (17.4 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 217  bytes 17829 (17.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

usb0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.7.2  netmask 255.255.255.0  broadcast 192.168.7.255
        inet6 fe80::78be:29ff:fecf:98a7  prefixlen 64  scopeid 0x20<link>
        inet6 2409:4040:d87:122b:78be:29ff:fecf:98a7  prefixlen 64  scopeid 0x0<global>
        ether 7a:be:29:cf:98:a7  txqueuelen 1000  (Ethernet)
        RX packets 134  bytes 16568 (16.1 KiB)
        RX errors 120  dropped 0  overruns 0  frame 0
        TX packets 194  bytes 33283 (32.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

usb1: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.6.2  netmask 255.255.255.0  broadcast 192.168.6.255
        ether 40:bd:32:25:17:9d  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        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

debian@beaglebone:~$ ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: can0: <NOARP,ECHO> mtu 16 qdisc noop state DOWN mode DEFAULT group default qlen 10
    link/can
3: can1: <NOARP,ECHO> mtu 16 qdisc noop state DOWN mode DEFAULT group default qlen 10
    link/can
4: eth0: <BROADCAST,MULTICAST,DYNAMIC,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 40:bd:32:25:17:9b brd ff:ff:ff:ff:ff:ff
5: usb0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 1000
    link/ether 7a:be:29:cf:98:a7 brd ff:ff:ff:ff:ff:ff
6: usb1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000
    link/ether 40:bd:32:25:17:9d brd ff:ff:ff:ff:ff:ff
7: usb2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 40:bd:32:25:17:a1 brd ff:ff:ff:ff:ff:ff
debian@beaglebone:~$ lsusb -t
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=musb-hdrc/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Communications, Driver=rndis_host, 480M
    |__ Port 1: Dev 2, If 1, Class=CDC Data, Driver=rndis_host, 480M
    |__ Port 1: Dev 2, If 2, Class=Vendor Specific Class, Driver=option, 480M
    |__ Port 1: Dev 2, If 3, Class=Vendor Specific Class, Driver=option, 480M
    |__ Port 1: Dev 2, If 4, Class=Vendor Specific Class, Driver=option, 480M
    |__ Port 1: Dev 2, If 5, Class=Vendor Specific Class, Driver=option, 480M
    |__ Port 1: Dev 2, If 6, Class=Vendor Specific Class, Driver=option, 480M
debian@beaglebone:~$

In second case, rndis interfaces stops to function , even-though it is visible in USB options and AT commands are working fine.

If anyone could recreate this issue to troubleshoot might help.

Does this USB dongle have a orderable part number, where did you get it? It looks like it shows up as a normal usb device so should be easy to configure, so not sure what is going on. I’d like to test it locally…

Regards,

I have ordered 4G dongle from Waveshare. Link is as follows
Waveshare 4G dongle.
Also, where do we find the rndis enabled for USB0(default 192.168.7.2), could have added a eth0 interface at that location instead of /etc/network/interfaces
People have used connman for configuration in the past, but the files have changed in the recent years.

Thanks, taking a look at that model…

Prior to Bullseye, the usb0/usb1 interfaces was configured under /opt/scripts/

With Bullseye, I’ve moved it systemd-networkd…

eth0 -> /etc/systemd/network/eth0.network
usb0 (Windows - 192.168.7.x) -> /etc/systemd/network/usb0.network
usb1 (Mac - 192.168.6.x) -> /etc/systemd/network/usb1.network
wlan0 -> /etc/systemd/network/wlan0.network

Regards,