I have an SMS booking app running on Ubuntu and will be setting up SMS autoresponder using a HUAWEI Mobile Modem E1550.
Remove PIN from the SIM card
SIM card has to be without a PIN so if you have purchased a prepaid SIM card that has PIN enabled, you should follow instructions from your provider on how to disable the PIN.
After the PIN is disabled, put the SIM card into the modem and plug it into a Windows device.
Huawei Modem Unlocker
Choose DISABLE CD and click on UNLOCK button.
Install on Ubuntu
Before starting, make sure that you already have the HUAWEI Mobile Modem E1550 plugged into the server running Ubuntu 18.04, it should be plugged in the first USB slot.
Run apt-get update and install the following packages
sudo apt-get install -y minicom
sudo apt-get install -y smstools
sudo apt-get install -y cifs-utils
Copy app configuration files using WinSCP to /home/user/
- smsd.conf (configuration file for the USB-modem)
- sendsms (file that actually sends SMS)
- get.sh (script that mounts SMS’s from Windows to Linux device)
- getsms.sh (just starts the get.sh file in background)
then copy them to appropriate locations:
sudo cp -r /home/user/smsd.conf /etc/
sudo cp -r /home/user/get.sh /root/
sudo cp -r /home/user/smsget.sh /root/
sudo cp -r /home/user/sendsms /usr/local/bin/sendsms
and give execute permissions:
sudo chmod +x /root/smsget.sh
sudo chmod +x /root/get.sh
sudo chmod +x /usr/local/bin/sendsms
Edit rc.local file so that scripts and SMS service are started automatically with system boot:
sudo nano /etc/rc.local
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
# In order to enable or disable this script just change the execution
# By default this script does nothing.
nohup /root/smsget.sh &
Setup Minicom service
In the menu choose serial port setup then A/E:
- “A – Serial Device : /dev/ttyUSB0”
- “E – Bps/Par/Bits : 115200 8N1”
test if the minicom works by typing “AT” – should give “OK”
Test if SMS works
Try sending emails from the terminal with the command
sendsms +38163NUMBER "MESSAGE TEXT"
- +38163 with your local area code
- NUMBER with recipients phone number
- MESSAGE TEXT with the text to be sent