-   Linux - Hardware (
-   -   Sending AT commands to a SMS modem (

narmida 10-12-2005 07:28 PM

Sending AT commands to a SMS modem

Im trying hard to configure a SMS MODEM the GM862
This is a simpel modem with a mobile card connected to my ttyS0

i can put the command manualy in with minicom and this works.
Now i want to automate this function to send is out in a script

The commands that needed to be send to the modem are :

text message that can contain almost anything

The 1st 4 AT commands are to set the sms etc and set the sms to plain txt
the 5th is the mobile #
the 6th line is the SMS itself
the 7th is the end of that txt and must close with a CTRL-Z

now i have tried it with runscript (ofcourse with the send cmd) but this doesnt work then i tried it with minicom -S
but then it wont exit ofcourse no idea how i do this.

the most important thing is after the txt mesage i have to close with a CTRL-Z also know as /z or ^z

im lost anyone ideas how to solve this issue.
Note the txt message must be at the end variable

thnx for the help

hmm maybe the programming section was more wise ....

narmida 10-13-2005 07:06 AM


myrmidon 09-24-2009 01:05 PM


try the following :


echo "ATZ0" > /dev/ttyACM0      # or echo -e "ATZ0\r" > > /dev/ttyACM0
echo "AT+CSCA?" > /dev/ttyACM0  # or echo -e "AT+CSCA?\r" > /dev/ttyACM0
echo "AT+CMGF=1" > /dev/ttyACM0  # or echo -e ... You got the picture
echo "AT+CNMI=2,1" > /dev/ttyACM0      # or echo -e ....You got the picture
echo "AT+CMGS=+31612345678" > /dev/ttyACM0 # or echo -e ...You got the picture
echo -e "text\32" > /dev/ttyACM0

cheers ...

All times are GMT -5. The time now is 04:30 AM.