The Rescoot Modem Service is a Go-based monitoring tool designed to track and manage cellular modem connectivity using ModemManager, with state synchronization through Redis.
It is a free and open replacement for the unu-modem service on unu's Scooter Pro.
- Real-time modem state monitoring
- Retrieval of modem connectivity information
- Public and interface IP address tracking
- Signal quality and access technology reporting
- Redis-based state synchronization and pub/sub notifications
- ModemManager (
mmcli) - Redis
- gpsd
Assuming your mdb is connected via USB Ethernet as 192.168.7.1 and aliased as mdb;
make dist
ssh root@mdb mkdir -p /etc/rescoot /etc/librescoot
scp rescoot-modem-arm-dist root@mdb:/usr/bin/rescoot-modemThe service supports the following command-line flags:
| Flag | Default Value | Description |
|---|---|---|
-redis-url |
redis://127.0.0.1:6379 |
Redis URL |
-gpsd-server |
localhost:2947 |
GPSD server address |
-polling-time |
5s |
Polling interval for modem checks |
-internet-check-time |
30s |
Interval for internet connectivity checks |
-interface |
wwan0 |
Network interface to monitor |
The service monitors and publishes the following modem state attributes:
- Connection status
- Public IP address
- Interface IP address
- Access technology
- Signal quality
- IMEI
- ICCID
The service uses Redis to:
- Store current modem state
- Publish state change notifications on the
internetchannel
The service maintains a Redis hash internet with the following keys:
modem-state(off,disconnected,connected, orUNKNOWN)ip-address(external IPv4 address orUNKNOWN)access-tech(access tech, depending on modem & SIM support)"UNKNOWN""2G"/"GSM""3G"/"UMTS""4G"/"LTE""5G"
signal-quality(0-100, in %, or 255 if UNKNOWN)sim-imeiIMEI (unique hardware identifier) (this actually identifies the modem, but the name is kept for backward compatibility)sim-imsiIMSI (unique subscriber identity)sim-iccidICCID (unique SIM card identifier)
rescoot-modem \
-redis-url redis://redis.example.com:6379 \
-interface wwan0 \
-internet-check-time 45s \
-gpsd-server localhost:2947The service logs errors and attempts to maintain the most recent known state. If modem information cannot be retrieved or internet connectivity is lost, the service will update the state accordingly.