Cross-compiled qmicli with Cell Broadcast (CBS/ETWS/CMAS) monitoring support.
A patched build of libqmi's qmicli tool that adds three new WMS commands for Cell Broadcast reception:
--wms-set-event-report- Enable MT message event reporting--wms-set-broadcast-activation- Activate Cell Broadcast reception on the modem--wms-monitor- Monitor for incoming CBS/ETWS/CMAS messages in real-time
It also improves the existing --wms-get-cbs-channels output to show the broadcast activation state.
These complement the existing CBS commands already in libqmi main:
--wms-set-cbs-channels- Configure which CBS channel IDs to receive--wms-get-cbs-channels- Query current CBS channel configuration
Cell Broadcast is the backbone of emergency alert systems worldwide (EU-Alert, CMAS/WEA in the US, Israel's Home Front Command alerts, Japan's ETWS, etc.). While phones handle these natively, embedded devices with QMI modems (routers, IoT gateways) have no built-in way to receive them.
This project bridges that gap - giving any QMI-capable device the ability to receive cell broadcast alerts directly from the cellular network, with no internet connection required.
The patches have been submitted upstream to libqmi on freedesktop.org GitLab (issue #131).
See patches/ for the 4-commit patch series against libqmi main:
0001- Show broadcast activation state in--wms-get-cbs-channelsoutput0002- Add--wms-set-event-reportcommand0003- Add--wms-set-broadcast-activationcommand0004- Add--wms-monitorcommand with CBS/ETWS/CMAS indication decoding
The included Dockerfile cross-compiles for MIPS 32-bit big-endian soft-float (musl), targeting embedded devices like the Ubiquiti UniFi LTE Backup Pro. To target a different architecture, adapt the Dockerfile's cross-compiler toolchain and meson cross-file.
Requires Docker:
./build.shThis builds a statically linked qmicli binary in a Docker container using:
- musl.cc MIPS cross-compiler toolchain
- zlib, libffi, PCRE2, GLib (all static)
- libqmi from git main (with CBS patches applied)
Output goes to ./output/qmicli (and ./output/qmi-proxy).
Copy the binary to your device:
scp output/qmicli user@device:/tmp/# Check current CBS channel config
/tmp/qmicli -d /dev/cdc-wdm0 --device-open-proxy --wms-get-cbs-channels
# Set CBS channels to receive
/tmp/qmicli -d /dev/cdc-wdm0 --device-open-proxy --wms-set-cbs-channels=4370-4383
# Activate broadcast reception
/tmp/qmicli -d /dev/cdc-wdm0 --device-open-proxy --wms-set-broadcast-activation
# Enable event reporting
/tmp/qmicli -d /dev/cdc-wdm0 --device-open-proxy --wms-set-event-report
# Monitor for incoming Cell Broadcast messages (Ctrl+C to stop)
/tmp/qmicli -d /dev/cdc-wdm0 --device-open-proxy --wms-monitorReplace /dev/cdc-wdm0 with your QMI device path.
| Channel | Purpose |
|---|---|
| 4370 | Presidential Alert (highest severity) |
| 4371-4372 | Extreme alerts |
| 4373-4378 | Severe alerts |
| 4379 | AMBER alerts |
| 4380-4382 | Test/exercise |
| 4383 | EU-Alert Level 1 |
| Channel | Country | Purpose |
|---|---|---|
| 919 | Israel | Home Front Command emergency alerts |
| 50 | India | Disaster alerts |
| 4396 | Netherlands | NL-Alert |
This project was originally built to enable red-alert CBS integration on a UniFi LTE Backup Pro. The red-alert CBS integration parses the --wms-monitor output to track Israeli emergency alert state in real-time. See the CBS integration docs for details.
Dockerfile- Multi-stage Docker build for cross-compilationbuild.sh- Build script (wraps Docker build + binary extraction)patches/- git format-patch series against libqmi mainqmicli-wms-patched.c- Full patched source file for reference
GPL-2.0 © 2025 seidnerj (patches); see LICENSE for original libqmi contributors.
This software is provided "as is" without warranty of any kind. See LICENSE for full terms.