Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Hardware
User Name
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?


  Search this Thread
Old 10-12-2005, 08:28 PM   #1
Registered: Mar 2005
Location: Alphen aan den Rijn , netherlands
Distribution: core
Posts: 57

Rep: Reputation: 15
Unhappy 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 ....

Last edited by narmida; 10-12-2005 at 09:10 PM.
Old 10-13-2005, 08:06 AM   #2
Registered: Mar 2005
Location: Alphen aan den Rijn , netherlands
Distribution: core
Posts: 57

Original Poster
Rep: Reputation: 15
Old 09-24-2009, 02:05 PM   #3
Registered: May 2005
Distribution: redhat 9 , fedora 5,6,7,DSL,Debian 3, mandrake 9.2 , knoppix 3.8, red hat 7.3
Posts: 38

Rep: Reputation: 15

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 ...


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Are there any free SMS sending software for linux Agent007 Linux - General 3 12-31-2007 02:07 PM
sending sms linuxmandrake Linux - Software 2 12-31-2007 02:05 PM
kannel problem: fail sending sms via GPRS modem prad Linux - Software 2 12-05-2006 11:21 AM
IRDA modem does work, but pppd can't use it (it hangs when sending AT commands) motyl Linux - Hardware 1 04-30-2004 08:31 PM
Digiboard accel4r sending modem commands to terminal lansman Linux - Newbie 0 04-06-2003 10:58 AM > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 03:39 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration