Three years ago I moved from fiber to LTE mobile for my home internet needs. I pay a quarter of the cost compared to fiber. I consume 300 GB per month.
First I used an off the shelf Cat4 Huawei LTE router with max speed of 30 mbps. Then I moved to a Raspberry Pi 4b with a USB M.2 adapter. As a modem I have been using the Cat16 Fibocom L860-GL. With my low cost data sim I can get max 100 mbps.
I wanted a router firmware that supports LTE modems out of the box. So I chose GoldenOrb or ROOter, a fork of OpenWrt. I was happy with it, however this month I moved to OpenWrt 23.05. It is specifically built with added packages like modemmanager, 3ginfo-lite, internet-detector and xmm-modem to support several LTE modems out of the box.
Main reason to move to OpenWrt 23.05 is that it supports Intel i-225 Ethernet NICs [kmod-igc]. I bought a mini PC with these NICs. Then I configured it as a backup OpenWrt router, in case the Pi dies. Had I stayed with GoldenOrb, I would need to compile a v21+ build with added kernel modules. Much more work than only installing an image and adding packages.
After 3 weeks of using OpenWrt 23.05 I donāt miss any functionality of GoldenOrb. This Openwrt build has all the functionality I need. I did not need to configure anything to get the modem working.
I added a few packages like uhubctl to do a power toggle of the usb modem to recover an internet connection. I added luci-app-commands to filter the syslog using shell script buttons to view the internet connection status, the modem status etc. Easier than having to scroll through the syslog. Having a LTE connection, it is also useful to install SQM and cake-autorate in order to minimize buffer bloat.
Finally I added a persistent logfile to the internet-detector package, so I can review per month the amount of power toggles or reboots necessary to recover an internet connection. Because the memory based syslog is cleared on a reboot.
There were a few modem related issues I have had and most of them I could resolve:
- Too many USB disconnects.
If your usb modem has a few USB disconnects [shown in syslog] a day, it is likely that the power supply is not sufficient [low voltage]. The piās red led will turn on [not blink or off], if the power is OK. In my case I use a 5V 3A charger connected to a battery powered DC UPS of 15W that supplies enough power to the Pi. On average the Pi with L860 modem consumes about 5-6W. My alder lake mini PC with the modem consumes a bit more [8-10W].
- Modem to USB 3 port is not stable.
I wanted to connect the modem to usb 3, so it will get more power from the Pi than with usb 2 [900 vs 500 mA]. The L860 can consume on average 700mA when in CA mode of band 40. My usb modem adapter supports USB 3.
However, when connected to a USB 3 port, I get this bug. It will āUSB disconnectā after half to a few hours of internet connection and also show the kernel warning. This bug seems unresolved after first reported in 2019. And it does happen only to specific usb devices, like with my specific usb adapter with the L860. The piās usb ports nor the L860 modem have low power management function, so this could not be the reason. However, according to the hardware specs of L860, it only supports USB 2.
Using usb 2 I donāt get any usb disconnects. So I assume the Pi is delivering the required power to the L860. Lsusbās MaxPower [ lsusb -d -v | grep MaxPower ] for this modem device will show 100mA. This is much too low for a L860. The Pi 4B can supply max 1.2A to all 4 usb ports combined. 1-2W is used for fans on the Pi and on the modem.
- internet connection is down after 24 hrs
Internet is down after almost exactly 24 hrs. Without showing any syslog error like āUSB disconnectā. Most likely the provider initiates this disconnect.
Tue Dec 19 09:54:38 2023 daemon.notice netifd: Network device 'eth1' link is down
Tue Dec 19 09:54:54 2023 daemon.notice internet-detector[3702]: internet: Disconnected
Fortunately OpenWrt has a package called internet-detector. This package monitors the internet with pings. It can also reset the modem or reboot the router, in case the connection is down. In my case I added a user defined script doing a power toggle on the usb port of the modem. Power toggles are faster than modem resets.
Tue Dec 19 09:54:56 2023 user.notice internet-detector: powertoggle usb modem 1-1.4
Tue Dec 19 09:55:07 2023 kern.info kernel: [86302.709866] usb 1-1.4: USB disconnect, device number 3
..
Tue Dec 19 09:55:08 2023 kern.info kernel: [86303.473898] usb 1-1.4: New USB device found, idVendor=8087, idProduct=095a, bcdDevice= 3.50
Tue Dec 19 09:55:08 2023 kern.info kernel: [86303.473917] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Tue Dec 19 09:55:08 2023 kern.info kernel: [86303.473922] usb 1-1.4: Product: MODEM + 2 CDC-ACM + 3 CDC-NCM + SS
Tue Dec 19 09:55:08 2023 kern.info kernel: [86303.473927] usb 1-1.4: Manufacturer: Intel Corp.
..
Tue Dec 19 09:55:23 2023 daemon.notice internet-detector[3702]: internet: Connected
Sometimes, after a provider initiated reset, the router will lose connection with the usb modem. Then power toggles will have no effect. Fortunately with internet-detector I can set in addition to the power toggle a router reboot, after the internet is down for more than it takes to power toggle a connection, letās say 2 minutes.