fildunsky/luci-app-5gmodem
À propos
LuCI app for m2, pcie, usb modems: Network status, signal, operator, IP, band management, TTL fix, modem auto-detect, SMS, USSD, AT
Systèmes et infrastructureWhat you can do
- Easy create modem interface button (Modem Settings) — sets up a network interface for the modem automatically.
- Dual modem mode and uplink switcher
- Dual sim and eSIM switch tested and working with the Fibocom FM350-GL (AT) and Foxconn T99W175 / Thales MV31-W (MBIM) — install our patched lpac for your platform from the lpac-build releases (see the eSIM / lpac section below)!
- Network — advanced signal level, operator, technology with carrier aggregation (e.g. LTE-A | B1 + B40 / B7 / B3), interface IPv4/IPv6, connection statistics and modem temperature (if the modem reports it).
Progression mesurée des étoiles
- in 24h
- +1
- in 7 days
- +1
- in 15 days
- Historique en cours
- in 1 month
- Historique en cours
Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.
README.md
Originalluci-app-5gmodem
Русская версия · 简体中文 · 日本語 · Tiếng Việt · Bahasa Indonesia
A LuCI app for 4G/5G modems on OpenWrt. It merges 3ginfo-lite, sms-tool-js and some pieces of modemband into a single app.
Installation
Use the signed feed for a fresh installation or to verify your first upgrade from an older version. Keep the same package name to preserve your edition and settings. Use luci-app-5gmodem-lite in the commands if you already use Lite or want a fresh Lite installation.
Copy the commands from this project’s README. They check the pinned SHA-256 fingerprint of the public key before importing it and enabling the feed.
Older in-app updaters can find the new packages under their usual names. The old updater does not verify the publisher’s signature on that first update. Use the commands below if you want signature verification from the first upgrade.
Installation and upgrades add the bundled public key and register the signed 5gmodem feed with the system package manager. On opkg, automatic feed registration requires signature checking to be enabled. Existing repository entries are preserved.
APK · OpenWrt 25.12
(
set -eu
feed=https://fildunsky.github.io/luci-app-5gmodem
work=$(mktemp -d)
trap 'rm -rf "$work"' EXIT
key_sha256=f9df764078e9b7a12e522591d502f7f1ccb66d3ef84803e92c18f756ad44c045
wget -O "$work/5gmodem.pem" "$feed/keys/5gmodem.pem"
printf '%s %s\n' "$key_sha256" "$work/5gmodem.pem" | sha256sum -c -
mkdir -p /etc/apk/keys /etc/apk/repositories.d /etc/5gmodem/feed-apk
cp "$work/5gmodem.pem" /etc/5gmodem/feed-apk/5gmodem.pem
cp "$work/5gmodem.pem" /etc/apk/keys/5gmodem.pem
config=/etc/apk/repositories.d/customfeeds.list
grep -Fxqs "$feed/apk/packages.adb" "$config" ||
printf '\n%s\n' "$feed/apk/packages.adb" >> "$config"
apk update
apk add --upgrade luci-app-5gmodem
)
OPKG · OpenWrt 24.10
(
set -eu
feed=https://fildunsky.github.io/luci-app-5gmodem
work=$(mktemp -d)
trap 'rm -rf "$work"' EXIT
key_sha256=fa14a4a77e6da0a81bc4a8ac21add85269222b342b9bcea9c7b41619cdfdda11
wget -O "$work/5gmodem.pub" "$feed/keys/5gmodem.pub"
printf '%s %s\n' "$key_sha256" "$work/5gmodem.pub" | sha256sum -c -
grep -q '^option check_signature' /etc/opkg.conf
mkdir -p /etc/5gmodem
cp "$work/5gmodem.pub" /etc/5gmodem/feed-usign.pub
opkg-key add /etc/5gmodem/feed-usign.pub
printf 'src/gz 5gmodem %s/opkg\n' "$feed" > /etc/opkg/5gmodem.conf
opkg update
opkg install luci-app-5gmodem
)
Once the feed is connected, use the in-app updater or your package manager. The feed also supplies the available luci-i18n-5gmodem-* translation packages. For offline installation, use a local copy of the signed feed and import the same verified public key. The release also includes a signed ipk-sha256sums manifest for verifying individual IPK files before installation.
Full includes ModemManager and the QMI/MBIM packages. Lite is for devices with limited storage and uses the modem’s AT port for metrics, SMS and band control. Keep Full on routers that depend on its connection packages.
Pulling data out of the app from your own service? Smart home, an external display, someone else's dashboard, a hand-written script - it is all in one place: Telemetry: how to consume the metrics. Field format, the consumer contract, and four delivery options - file, SSH, MQTT, HTTP.
Modem not working or not supported?
Send a diagnostic report: that is how new modems get added and bugs get fixed.
- In LuCI open Modem → 5G Modem → Modem, find Diagnostic report and press Collect logs - the file downloads to your computer. If the page does not open, run this over SSH and copy the file from the router:
/usr/share/5gmodem/collect.sh run > /tmp/5gmodem-diag.txt - Open an issue with the modem model and what goes wrong, and attach the file.
The report contains the IMEI, IMSI, ICCID and the carrier name, but no passwords or Wi-Fi keys. If you do not want to publish the identifiers, blank them out in the file before attaching.
Features
- Easy create modem interface button (Modem Settings) — sets up a
networkinterface for the modem automatically. - Dual modem mode and uplink switcher
- Dual sim and eSIM switch tested and working with the Fibocom FM350-GL (AT) and Foxconn T99W175 / Thales MV31-W (MBIM) — install our patched
lpacfor your platform from the lpac-build releases (see the eSIM / lpac section below)! - Network — advanced signal level, operator, technology with carrier aggregation (e.g.
LTE-A | B1 + B40 / B7 / B3), interface IPv4/IPv6, connection statistics and modem temperature (if the modem reports it). - Band & mode management — pick the network mode (Auto / 2G / 3G / 4G / 4G+5G / 5G) and toggle individual LTE/NR bands.
- TTL fixing — force incoming/outgoing IPv4 TTL and IPv6 hop-limit on the modem interface (via an
nftablesinclude infw4). - Cell tower map — the Cell ID is a button that opens the tower on 4cells.ru.
- Modem restart — one-click soft radio restart
AT+CFUN=4,1and modem resetAT+CFUN=1,1. - SMS Inbox / Send, USSD and AT tabs, each with a collapsible per-tab settings panel. Optional e-mail forwarding of incoming SMS and LED/notification support.
- Telegram bot — incoming SMS reach the chat from every modem, and
/sms,/statusand/modemwork from the chat. - Neighbour cells — a table under carrier aggregation: the serving cell and its neighbours with PCI, channel and levels (Fibocom FM350-GL, QMI modems).
- APN database update button — refresh the world operator database (GNOME MBPI + AOSP) without reinstalling the app.
- Port auto-detect — the AT port and network interface are detected automatically; can be set manually.
- USB sticks that have no AT ports (Huawei HiLink and relatives) are supported too — see below.
- Telemetry for smart homes — a flat JSON at
/tmp/5gmodem/tele.json(signal, operator, mode, aggregation, rates, SMS count) plus optional MQTT publishing with Home Assistant auto-discovery; see docs/telemetry.md. 5gtop— a terminal dashboard with the same data, for when you are on SSH and not in a browser.
Tested:
I've added new features to them (compared to 3ginfo and modemband)
- Fibocom FM350-GL
- Fibocom L850 (Intel XMM)
- Fibocom L860 (Intel XMM)
- Compal RXM-G1 (SG500M2-X)
- Telit LM960A18
- SIMCOM SIM7100E
- SIMCOM SIM7600E-H
- Quectel EC21-E
- Quectel EP06-E
- MeigLink SLM770A-R
- Foxconn T99W175 / Thales MV31-W (Snapdragon X55)
- Dell DW5821e / Foxconn T77W968 (Snapdragon X20)
- HP lt4120 / Foxconn T77W595 (Snapdragon X5)
- Sierra Wireless EM9190
- Huawei E3372 (HiLink)
- Tenda MF6 (ZTE ZX297520V3 Mi-Fi, USB 19d2:1557) — signal, battery, SMS and reboot over its web API; bands and network mode over AT in debug mode
- Cheap Qualcomm MDM9600 / MDM9610 Android sticks (PIXLINK, ALEKA UV310 and relatives), including their "modem only" (QMI) mode
- UFI003 (Qualcomm MSM8916 Android stick, USB 05c6:90b4) — signal over AT, temperature and SINR over ADB, network mode; also the same stick running OpenWrt, whose on-board modem is driven through ModemManager (bands, network mode, SMS, manual network selection)
- Many more untested, but should support all the modems handled by the upstream forks.
Fixed from user reports
I do not own these. Their owners sent logs and AT output, and the fixes shipped:
- Telit FN990A28 — clean start without the "SIM in illegal state" power-cycle loop, band and network-mode control, carrier aggregation
- Quectel RM520N-GL — model and firmware strings
- Foxconn T99W373 — carrier aggregation in 5G NSA
- NTmore NTLM-500 (Altair ALT3800, from the Skylink H1 home router) — signal, serving and neighbour cells, per-antenna levels, temperature, TX power, path loss, band selection
- Tri Cascade VOS 5G / SG500M2-X (Compal RXM-G1, USB 05c6:9091, ModemManager over QMI) — recognised by model, so the interface is built on
proto=modemmanagerinstead of theuqmipath its firmware does not serve; the ADB interface is released from the serial driver. Known limitation: source-specific IPv6 defaults (default from …) stay with netifd and are not re-ranked by the internet-priority feature - Fibocom NL668-EAU (USB 2cb7:0110) — signal and cell metrics, LTE bands, network mode including 2G
- SIMCom SIM7906 / SIM7912 (USB 1e0e:9001) — signal, bands, carrier aggregation
Added from vendor documentation
No hardware and no reports for these yet: the profiles follow the vendors' AT command guides and were checked against the sample answers printed in them. Logs from owners are welcome.
- Foxconn T99W373 / Thales MV32-W (Snapdragon X62) — bands for LTE, 5G NSA, 5G SA and WCDMA, cell lock, network mode, 5G mode, full cell and antenna metrics
- Other Altair ALT3100 / ALT3800 modems (USB vendor 216f): Yota 4G LTE (Swift WLTUBA-107), NTmore JMR814 — the NTLM-500 profile, used whenever the stick exposes an AT port
Added from 4pda forum reports
No hardware here: the profiles follow the stick replies and status pages that owners posted on the 4pda forum.
- Huawei E3372h in the HiLink "Gateway NCM" stick mode (USB 12d1:155a) — the E3372 AT profile: signal, band, EARFCN, temperature
- Yota sticks without AT ports: Gemtek WLTUBA-107/115 and WLTUBQ-108 (USB 15a9:002d, 15a9:003a), Yota LU150 on GCT GDM7240 (USB 1076:8002) — signal, cell and SIM data from the stick's own status page
- Flashing and boot modes (Qualcomm EDL and crash dump, Huawei needle and fastboot modes, Sierra QDL, MediaTek BootROM, the Alcatel updater port) are no longer shown as modems
USB sticks with no AT ports (HiLink)
Sticks like the Huawei E3372 keep the IP stack themselves: the router only sees an Ethernet card, and everything else lives behind the stick's own web interface. There are no AT ports at all, so the usual polling has nothing to talk to.
The app handles them anyway:
- the modem is recognised by its USB descriptor (a stick that simply has no driver bound yet is not mistaken for one) and gets a DHCP interface;
- metrics, SMS and the operator name are read over the stick's HTTP API;
- if the stick can expose serial ports (Huawei calls it debug mode), the app switches it there automatically and then drives it like any other modem — which is where TAC, band, EARFCN, USSD and the AT console come from. The mode is reset whenever the modem reboots, so it is re-applied on every appearance. There is a checkbox in Modem Settings if you would rather it did not.
Bands and network mode for such a stick are changed through its API rather than
AT^SYSCFGEX: the AT route makes the modem drop its USB composition and fall
out of debug mode.
ZTE-based sticks (Tenda MF6 and relatives) are different: debug mode is switched on
by a web command and survives reboots, and bands are set over AT (AT+ZLTEBAND)
— their web API has no band settings. If the stick's web interface has a
password, enter it on the Modem page: without it these sticks give out nothing.
Buttons
5gtop
A terminal dashboard, for when you are on SSH rather than in a browser. Same data as the web pages, same backend — no extra polling of the modem.
5gtop # English
5gtop ru # Russian
Tabs: Network, Cell info, Modem, SMS, USSD, AT console,
and eSIM when an eUICC is present. Keys are single-press (no Enter): the
highlighted letter in each tab name switches to it, Tab cycles modems in dual
modem setups, t runs the speed test, r refreshes, q quits. The layout
follows the terminal width and falls back to a narrow mode on small screens.
eSIM / lpac
The eSIM tab (download / enable / disable / delete profiles, notifications) needs lpac. The official OpenWrt 25.12 lpac (2.3.0) has a broken stdio backend, so we ship a patched build — fildunsky/lpac-build — with the native AT-driver robustness PRs, bare-CCHO support, and a loader fix for OpenWrt. It is a general-purpose build carrying every APDU backend (AT, QMI, uqmi, MBIM), so the app picks the right transport per modem: AT for Fibocom FM350-GL, MBIM/QMI for Qualcomm SDX55 modules such as Foxconn T99W175 / Thales MV31-W.
.apk files are named lpac-<openwrt>-<target>-<subtarget>.apk; 24.10.x builds are .ipk. Older releases used an lpac-fm350-* prefix.
Download your platform's .apk from the latest lpac-build release:
| File | Arch | Typical devices |
|---|---|---|
lpac-25.12.5-mediatek-filogic.apk |
aarch64_cortex-a53 | WH3000 & new WiFi6 routers with USB |
lpac-25.12.5-rockchip-armv8.apk |
aarch64 | NanoPi R2S/R4S/R5S |
lpac-25.12.5-bcm27xx-bcm2711.apk |
aarch64_cortex-a72 | Raspberry Pi 4 |
lpac-25.12.5-armsr-armv8.apk |
aarch64_generic | VMs / containers / generic ARM64 |
lpac-25.12.5-armsr-armv7.apk |
arm | generic ARM32 |
lpac-25.12.5-ramips-mt7621.apk |
mipsel_24kc | Xiaomi / GL.iNet / Netgear |
lpac-25.12.5-ath79-generic.apk |
mips_24kc | older MIPS routers with USB |
lpac-25.12.5-x86-64.apk |
x86_64 | mini-PC / VM routers |
Use the publisher’s verification instructions before installing a standalone lpac build.
Tested modems
| Modem | APDU transport | What was verified |
|---|---|---|
| Fibocom FM350-GL | at (native AT driver) |
full cycle — read eUICC, download / enable / disable / delete profiles, notifications |
| Foxconn T99W175 / Thales MV31-W | mbim (via mbim-proxy) |
eUICC read: EID, chip info, profile list, free memory. Profile download not confirmed yet |
The transport is picked automatically from the interface protocol, so you normally do not set it by hand. On the MBIM path the eUICC is reachable regardless of which SIM slot is active, so the physical SIM stays online while you work with the eSIM.
lpac is an optional dependency — the eSIM tab appears only when it is installed and an eUICC is present; the rest of the app works without it.
Build from source
The package builds with the standard OpenWrt SDK. As a feed:
# in your OpenWrt — "modem" here is just a feed name you pick
echo "src-git modem https://github.com/fildunsky/luci-app-5gmodem.git" >> feeds.conf.default
./scripts/feeds update modem
./scripts/feeds install luci-app-5gmodem
make package/luci-app-5gmodem/compile V=s
CI (.github/workflows/build.yml) builds .ipk/.apk on every tag and attaches them to the release; it can also be triggered manually from the Actions tab.
Permissions
The app runs as root and exposes its capabilities through the ACL group
luci-app-5gmodem (/usr/share/rpcd/acl.d/). That group is root-equivalent,
which matters before granting it to anyone but a full administrator:
- it allows sending any AT command to the modem (via
atcmd.sh- the AT console needs that by design). Thesms_toolbinary itself is no longer in the ACL: through it the browser could also runsend,delete alland reach foreign/dev/*, with nothing able to check the arguments; - writing
/etc/crontabs/root— removed. That right existed only for the SMS-notifier restart schedule;smscron.shnow owns it, touching just its own line and validating the interval. Other cron jobs are neither read nor changed. A full administrator still has that capability - through LuCI's own "Scheduled Tasks" page, which is where it belongs; - reading the
5gmodemconfig exposes the SMTP password for SMS forwarding if one is set (OpenWrt keeps passwords in/etc/configin clear text, the same way it keeps the Wi-Fi key).
Do not grant this group to a restricted role such as "an operator who may only look at the modems". There is no way around it: argument filtering lives in the page, and the page runs in the user's browser. Such a role would need its own set of narrow calls, not a subset of this group.
Credits
Based on the work of Rafał Wabik (IceG) and Cezary Jackiewicz. Signal-bar math adapted from koshev-msk. Licensed under GPL-3.0.
Explorer des projets similaires
Chargement…