This is the demonstration of sending SMS using my ZTE MF-190 modem from TP-Link MR3020.
This modem have 2 serial ports, so I can send SMS and dialing internet at the same time. If your modem only have single port you need to disconnect 3G connection first.
There are few packages need to be installed so make sure you have enough memory and remaining space.
1 2 3 |
# opkg update # opkg install kmod-usb2 kmod-usb-ohci kmod-usb-serial kmod-usb-serial-option usbutils usb-modeswitch kmod-usb-storage kmod-scsi-core kmod-scsi-cdrom kmod-scsi-generic minicom # reboot |
You can check the port for the serial using “cat /proc/bus/usb/devices”
T: Bus=01 Lev=02 Prnt=02 Port=01 Cnt=01 Dev#= 4 Spd=480 MxCh= 0
Output such as above line mean port 1 and the device is “/dev/ttyUSB1”
and verify the device exist using “ls /dev/ttyUSB*”
Setup minicom
1 |
# minicom -s -c on |
Choose “Serial port setup” using arrow <down> key and press <enter> from your keyboard.
Press <a> to configure your serial device location. Press <enter> twice to go back to main screen menu, choose “Save setup as df1”
Run minicom again without -s parameter.
1 |
minicom -c on |
Okay, now you can send GSM commands
To send SMS for example to number “22188” with text “VOL STATUS”
1 2 3 |
# AT+CMGF=1 # AT+CMGS="22188" > VOL STATUS //press CTRL-Z; |
To view SMS, the SMS status can be “REC UNREAD” or “REC READ” but to view both use “ALL”
1 2 |
AT+CMGF=1 AT+CMGL="ALL" |
+CMGL is the index of SMS, you can delete the SMS using “T+CMGD=<index>”
1 |
T+CMGD=1 |
To exit minicom press <CTRL-A> followed by <Z> choose either to reset the modem or just exit.
Press <x>