SMSBerry is a set of scripts to turn your Raspberry Pi and a Huawei USB stick into a fully functional SMS gateway. This setup leverages Gammu for managing SMS services and provides a straightforward way to handle incoming SMS messages on your Raspberry Pi.
- Raspberry Pi (tested on Raspberry Pi OS)
- Huawei USB stick (configured for SMS-only use, without internet or ModemManager)
- setup1.sh: Initial Raspberry Pi system preparation
- setup2.sh: Configures the USB stick and sets up a symbolic link for SMS handling
- setup3.sh: Installs and configures Gammu for SMS gateway functionality
This script ensures that the Raspberry Pi is up-to-date and ready for SMSBerry setup:
- Performs a system update and upgrade.
- Reboots the system to apply updates.
bash setup1.sh
This script configures the Huawei USB stick for SMS use only on the Raspberry Pi:
- Sets
HuaweiAltModeGlobal
to enable compatibility with the USB device. - Disables
ModemManager
to prevent conflicts with the SMS setup. - Installs
gawk
, required for identifying the modem’s USB Vendor and Product IDs. - Creates a udev rule that:
- Establishes a symbolic link
/dev/sms-proxy
for the USB stick. - Automatically reloads the Gammu SMS service (
gammu-smsd
) when the modem is connected.
- Establishes a symbolic link
bash setup2.sh
This script completes the SMSBerry setup by:
- Installing Gammu and Gammu-SMSD.
- Configuring Gammu to communicate with the Huawei USB stick via
/dev/sms-proxy
. - Creating a
process_sms.sh
script that handles incoming SMS messages by:- Reading the sender’s number and message content.
- Logging the SMS data for easy monitoring.
- Configuring Gammu-SMSD to use the
process_sms.sh
script to process received SMS.
bash setup3.sh
- Run each setup script in order.
- Once the setup is complete, SMS messages sent to the Huawei USB stick will automatically be logged by Gammu on the Raspberry Pi.
- Ensure
gammu-smsd
is running and enabled to manage incoming messages. - To view SMS logs, use
journalctl -xef
.
Transform your Raspberry Pi into a dedicated SMS gateway with SMSBerry! 🍓📲