LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
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?

Notices

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

Rep: Reputation: 15
Unhappy Sending AT commands to a SMS modem


Hello,

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 :


ATZ0
AT+CSCA?
AT+CMGF=1
AT+CNMI=2,1
AT+CMGS=+31612345678
text message that can contain almost anything
ctrl-z


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 08:10 PM.
 
Old 10-13-2005, 07:06 AM   #2
narmida
Member
 
Registered: Mar 2005
Location: Alphen aan den Rijn , netherlands
Distribution: core
Posts: 57

Original Poster
Rep: Reputation: 15
kick....sry
 
Old 09-24-2009, 01:05 PM   #3
myrmidon
Member
 
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
Hi,

try the following :

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


Reply


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 01:07 PM
sending sms linuxmandrake Linux - Software 2 12-31-2007 01:05 PM
kannel problem: fail sending sms via GPRS modem prad Linux - Software 2 12-05-2006 10: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 07:31 PM
Digiboard accel4r sending modem commands to terminal lansman Linux - Newbie 0 04-06-2003 09:58 AM


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

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