A Bash script to send SMS messages using Gammu. This script allows users to quickly send text messages through a modem connected to their system.
- Send SMS: Easily send SMS to any destination number in international format.
- ICCID and Operator Information: Automatically retrieves and displays ICCID and operator name from the connected modem.
- Logging: Logs details of sent messages, including timestamps, to a log file.
To use this script, you need:
- A USB modem or a GSM module connected to your system (e.g., Huawei E-3531, ZTE MF-627, Huawei K3765, or Huawei E392 for LTE).
- Gammu installed on your system. (e.g.,
sudo apt install gammu
) - Modem Manager installed.
- The install script will automatically detect if Gammu and Modem Manager are installed, and if not, it will install them for you.
It will also check for connected modems and configure Gammu accordingly. You can modify the Gammu configuration file later by doing:sudo nano /etc/gammurc
.
To install the script, run the following command:
sudo bash -c "$(wget -O - https://github.com/anthonyborriello/fast-sms/raw/main/install_fastsms.sh)"
Run the script using the following command:
./fastsms.sh
or
bash fastsms.sh
Follow the prompts to enter the message text and the destination phone number.
All sent messages and their details will be logged in a file named sms_log.txt
located in the same directory of fastsms.sh
Use Gammu commands
sudo gammu getallsms
The SMS messages are stored in specific folders from 1 to 3
; it depends on the device.
sudo gammu deleteallsms 1
sms_test.sh
can be used to quickly test Gammu.
Usage:
./smstest.sh +390123456789
This project is licensed under the MIT License - see the LICENSE file for details.
Antonio Borriello antonioborriello.wordpress.com