Repository navigation
Telegram Alerts and Monitoring
Fresnel features an automated alerting system that delivers real-time notifications to your Telegram account or channel regarding network health, data consumption, and carrier SMS messages.
To enable Telegram alerts, you need two credentials:
- Telegram Bot Token
- Target Chat ID
- Open Telegram and search for
@BotFather. - Send
/newbotand follow the prompts to choose a name and username (e.g.,MyFresnelGatewayBot). - BotFather will provide an HTTP API token formatted like:
7123456789:AAFlX_xxxxxxxxxxxxxxxxxxxxxxxxxxx
- Search for
@userinfoboton Telegram and click Start. - Note your numerical
Id(e.g.,987654321). - If sending to a private channel or group:
- Add your bot to the group as an Administrator.
- Send a test message in the group.
- Check
https://api.telegram.org/bot<YOUR_TOKEN>/getUpdatesto find the channelchat_id(starts with-100).
- Open your Fresnel Cloud Dashboard at
http://<your-vps-ip>:8000. - Navigate to Settings
$\rightarrow$ Telegram Alerts. - Enter your Bot Token and Chat ID.
- Click Save & Test Connection.
- Your bot will instantly transmit an initial confirmation alert:
🚀 Telegram Connected
Your Fresnel 5G Modem VPS cloud notification bot is now connected and operational!
┌──────────────────────────────────────────────────────────┐
│ Telegram Bot Alerts │
├──────────────────────────────────────────────────────────┤
│ 🚨 Modem Offline Warning (Heartbeat lost > 5m) │
│ ✅ Modem Recovered (Back online, band n78, RSRP -85dBm) │
│ 📉 Proactive RF Degradation (SINR < 4 dB warning) │
│ 🔄 Cell Flapping Alarms (Rapid eNB/CID handoff churn) │
│ 🌙 Automated Midnight Daily Digest (00:00:01 IST) │
│ ✉️ Real-Time Carrier SMS & OTP Instant Forwarding │
│ 🌡️ Overheating Warning (Baseband DSP > 75°C) │
└──────────────────────────────────────────────────────────┘
- The cloud server tracks last-seen timestamps for all connected modems.
- If no telemetry is received for 5 minutes, a high-priority warning is fired:
⚠️ Modem Disconnected
DeviceSG500M2-X(IMEI 8600...) has stopped transmitting telemetry. - Upon reconnection, a recovery alert summarizes downtime duration and re-attached RF metrics.
-
RF Degradation Warning: If the cellular Signal-to-Interference-plus-Noise Ratio (SINR) falls below 4 dB for consecutive samples, a warning is dispatched before connection collapse:
📉 Radio Link Degradation Warning
SINR has degraded to2.4 dBon serving celln78(PCI 412). Radio conditions are interference-limited. -
Cell Flapping Alert: Detects rapid ping-pong cell handoffs across multiple towers (
eNB/CID) within short time windows, indicating borderline coverage or antenna misalignment.
Every midnight at 00:00:01 IST, the background worker thread compiles the past 24-hour cycle and transmits a formatted digest:
- Daily Traffic: Total Downloaded (GB) and Uploaded (GB) with wire-speed precision.
-
SLA Uptime: Rolling 24-hour availability percentage (e.g.
99.98%) and recorded outage counts. - Speed Records: Today's peak download and upload bitrates.
- RF Health Summary: Average RSRP, SINR, and serving primary band.
- Defensive Decoding: Ingests both plain-text and hex-encoded SMS messages directly from baseband memory without corruption.
- Instant Forwarding: Carrier text messages, recharge receipts, and authentication OTPs are forwarded to Telegram instantly.
- Quota Tracking: Automatically scrapes remaining high-speed daily/monthly quota and warns 3 days and 1 day before plan expiration.
- Triggers notifications if baseband DSP temperature exceeds 75°C or PA thermistors exceed 85°C, advising on fan ventilation or heatsink checks.
Next Step: Learn how to troubleshoot errors and recover modems in Troubleshooting & Recovery.
Fresnel 5G Cellular Gateway Suite
Dedicated to the public domain under the Unlicense.
⚠️ Disclaimer: Low-level cellular baseband commands interact directly with modem hardware and firmware. Use at your own risk.
Main Codebase: github.com/pranabeshsingh/Fresnel