Telegram SMS
Introduction
This program enables you to manage your SMS via a Telegram bot, including tasks such as receiving and sending SMS. To use this program, you will need a Telegram account and a Telegram bot. You can create a Telegram bot by interacting with BotFather and following the provided instructions.
I have thoroughly tested this program and found it to work well. However, its compatibility with your system may vary. Should you encounter any issues, please do not hesitate to inform me.
Tested Devices
- Qualcomm 410 WiFi Stick (Doesn't support USSD commands)
- Quectel EM12-G
Installation & Usage
You can obtain the latest release from the releases page.
If you have already installed Go (Golang) on your system, you can also install the latest version using the following command:
go install github.com/damonto/telegram-sms@latest
Sometimes, you might need to set executable permissions for the binary file using the following command:
chmod +x telegram-sms
Once done, you can run the program with root privileges:
sudo ./telegram-sms -token=YourTelegramToken -chat-id=YourTelegramChatID
If your modem supports AT+CCHO/AT+CGLA/AT+CCHC
, and your SIM card is a removable eUICC, you can use the -euicc
flag to enable eUICC features.
sudo ./telegram-sms -token=YourTelegramToken -chat-id=YourTelegramChatID -euicc
If you wish to run the program in the background, you can utilize the systemctl
command. Here is an example of how to achieve this:
- Start by creating a service file in the
/etc/systemd/system
directory. For instance, you can name the file telegram-sms.service
and include the following content:
[Unit]
Description=Telegram SMS Manager
After=network.target
[Service]
Type=simple
User=root
Restart=on-failure
ExecStart=/your/binary/path/here/telegram-sms -token=YourTelegramToken -chat-id=YourTelegramChatID
RestartSec=10s
TimeoutStopSec=30s
[Install]
WantedBy=multi-user.target
- Then, use the following command to start the service:
sudo systemctl start telegram-sms
- If you want the service to start automatically upon system boot, use the following command:
sudo systemctl enable telegram-sms