← Projects
raspberry-pi intermediate 1 hr ago ◯ 4 min read

Building a Raspberry Pi SMS and Cellular Shop Alert Gateway with a GSM/LTE HAT

Build time: 2-3 hours
Tools needed: Raspberry Pi 4 or Zero 2W, screwdriver for HAT standoffs, laptop for initial SSH setup, multimeter (optional, for power troubleshooting)
Parts List
raspberry pisms gatewaygsmltesim7600gammucellularshop alertsmqttproject

WiFi-based shop alerts — a push notification when a print finishes, a Telegram bot when the CNC hits an alarm, an email when the laser's air assist pressure drops — all share one failure mode: they're useless the moment your internet connection goes down, which is exactly when you most want to know something went wrong unattended. A cellular SMS gateway sidesteps that single point of failure entirely. This build turns a Raspberry Pi and a cheap LTE HAT into a standalone text-message alert system that works as long as there's cell coverage, completely independent of your home network, router, or ISP.

This isn't the same ground as this site's existing ESP32 cellular connectivity guide, which covers adding a SIM7000/SIM800L module directly to a sensor-style microcontroller project. This build is specifically a Pi-based gateway: a single always-on box that other devices on your network can hand alerts to (over MQTT, a webhook, or a simple file watch) and that turns them into outbound texts, plus receives inbound commands by SMS when you're away from the shop entirely.

Parts and Hardware

Software Setup

Once the HAT is seated and the SIM installed, Raspberry Pi OS will usually expose the modem as a set of /dev/ttyUSB* serial ports. You have two realistic paths for SMS handling:

ApproachGood forTrade-offs Gammu + gammu-smsdA dedicated SMS daemon with a simple SQLite/MySQL outbox and inbox you can script against from any languageGammu's modem compatibility list is older-school AT-command focused; works well with SIM7600 but configuration is all in one gammu-smsdrc file ModemManager + mmcliComes pre-integrated with most Pi OS network stacks already, good if you also want the modem for data/SSH fallbackSMS handling via mmcli is more manual — no built-in daemon/queue, you're polling and parsing yourself

Gammu is the more direct path if SMS is the whole point: install it, point gammu-smsdrc at the correct serial device and baud rate, set the service running, and gammu-smsd-inject becomes your one-line way to send a text from any script or cron job. Inbound messages land in a simple inbox folder or database table you can poll.

Wiring It to the Shop

The gateway earns its keep by being the thing everything else reports to. A few practical patterns:

Reliability Notes

Treat this as safety-adjacent infrastructure, not a toy: if you're using it to alert on things like an unattended laser or an overheating enclosure, its own uptime matters. Put the Pi on a UPS HAT so a brief power blip doesn't take down your only out-of-band channel at the same moment something else fails, and add a watchdog cron job that pings the modem (mmcli -m 0 or a Gammu status check) and restarts the service if it's gone unresponsive — cellular modems occasionally wedge after a signal dropout and need a power-cycle or service restart to recover. Budget for SMS costs or plan limits if you expect frequent alerts; most prepaid IoT SIMs price per-message or per-month-allotment rather than unlimited.

Done once, this becomes one of the more quietly useful boxes in a shop: it doesn't do anything flashy, it just keeps working when the WiFi-dependent half of your home automation setup doesn't.