Back to Home

LTE Monitoring: dBm to Bars for Routers

The article describes the implementation of signal level and LTE network type monitoring for smartphones and routers. Unification of RSRP/RSSI metrics into visual indicators, polling protocols for Keenetic, Cudy, TP-Link, Huawei. Scaling to 800 devices with daily data charts.

LTE Monitoring: from dBm to Real-Time Charts
Advertisement 728x90

Monitoring LTE Modem Signal: From dBm to Visual Indicators

A background service for Android collects data on signal strength and network type every minute. The data is logged to a text file for each SIM card. At the end of the cycle, a daily graph of the metrics is generated. The service requires a persistent notification and is resilient to screen-off on most devices, but may stop on some models (e.g., Honor).

Router support extends functionality: MikroTik uses a built-in script for logging, with data sent via email. For budget models (Keenetic, Cudy, TP-Link, Huawei), network polling is implemented via API or proprietary protocols with response normalization.

Normalizing Signal Strength

Signal strength is unified into a 5-level indicator scale (bars) based on RSRP or RSSI. Priority is given to RSRP when available:

Google AdInline article slot
  • RSRP > -80 dBm or RSSI > -65 dBm = 5 bars
  • RSRP > -90 dBm or RSSI > -75 dBm = 4 bars
  • RSRP > -100 dBm or RSSI > -85 dBm = 3 bars
  • RSRP > -110 dBm or RSSI > -95 dBm = 2 bars
  • RSRP > -120 dBm or RSSI > -120 dBm = 1 bar

If these metrics are unavailable, the router's native indicator is used. This allows for data comparison between devices without engineering applications.

Classifying Network Types

Network types are mapped to a simplified scale: 5G, 4G, 3G, 2G, xG (no connection). Different manufacturers return numerous variants requiring mapping.

For the Huawei E3372H-320 firmware, there are 51 codes, including:

Google AdInline article slot
var MACRO_NETWORK_TYPE_GPRS = '2';
var MACRO_NETWORK_TYPE_EDGE = '3';
var MACRO_NETWORK_TYPE_WCDMA = '4';
var MACRO_NETWORK_TYPE_HSDPA = '5';
var MACRO_NETWORK_TYPE_HSUPA = '6';
var MACRO_NETWORK_TYPE_HSPA = '7';
// ... up to var MACRO_NETWORK_TYPE_EX_NR = '111';

Keenetic distinguishes 5G, 4G+, 4G, 3G WCDMA/HSPA+/DC-HSPA+, 2G EDGE/GPRS. Cudy: NR5G/5G NSA/SA, LTE/LTE-A/CA, 3G HSPA+, 2G GSM/EDGE. TP-Link TL-MR150: "GSM","WCDMA","4G LTE","TD-SCDMA","CDMA 1x","CDMA 1x Ev-Do","4G+ LTE".

Router Polling Protocols

Polling occurs every minute with a 12-second timeout. A maximum of 30 parallel threads allows monitoring up to 150 devices on an unstable network, and up to 800 on a stable local network.

  • Keenetic: API requests with re-authentication (code 401). Involves obtaining a salt, encrypting credentials, and parsing JSON.
  • Cudy LT500 V2.0: Requesting a token, encrypting login/password, followed by a GET for parameters.
  • TP-Link TL-MR150: Proprietary format:
1&1\r\n[WAN_LTE_LINK_CFG#2,1,0,0,0,0#0,0,0,0,0,0]0,0\r\n[LTE_NET_STATUS#2,1,0,0,0,0#0,0,0,0,0,0]1,0\r\n

Four layers of encryption are applied before sending. Huawei (CPE B593s-22, E3372H-320) — no authentication required.

Google AdInline article slot

MikroTik: A script on the device generates a log, which is transmitted via email.

SIM cards in a smartphone are detected automatically; routers are added manually. Support for multiple modems in Keenetic (via USB).

Scaling and Limitations

Testing on fake/offline devices reveals performance impacts: offline routers slow down the polling of online ones. A local network is recommended; for remote access, use a VPN tunnel.

Supported models:

  • MikroTik — all with LTE interface (script)
  • Keenetic — with LTE/USB modems
  • Cudy LT500 V2.0
  • TP-Link TL-MR150 v2
  • Huawei CPE B593s-22
  • Huawei E3372H-320

The service is stable on Android 10+ (Huawei, Xiaomi), but problematic on Honor with the screen off. For reliability, do not turn off the display.

Key Takeaways

  • Unifying RSRP/RSSI into a 5-level scale simplifies analysis without losing accuracy.
  • Mapping 50+ network types to 5 categories ensures cross-device compatibility.
  • Parallel polling of up to 800 routers with a 12-second timeout is suitable for large networks.
  • Lack of authentication on Huawei speeds up integration.
  • Local monitoring minimizes latency; use VPN for remote access.

— Editorial Team

Advertisement 728x90

Read Next