Flickr Photos

Roe Deer
Leopard in the rain
Lion mum taking care of cubs
Male Lion
Lion Cubs Playing
Leopard
Lazy Spotted Hyena
Female Lion
Cheetah
Golden Jackal
Golden Jackal
Young Cheetah

Sony Ericsson GM29 on Linux

Using Sony Ericsson GM29 GPRS modem on Linux to send text messages.

Sony Ericsson GM29

I use this kind of code which I get from usenet but I have modified it for my own purpose:

#! /usr/bin/kermit +
set port /dev/ttyS0
set speed 9600
if fail {                      # Check that port was obtained
     exit 1 \m(port): \v(setlinemsg)
}

set carrier-watch off
set session-log text
log session output
output AT+CMGF=1\13
input /nomatch 10
output AT+CSDH=1\13
input /nomatch 10
output AT+CSMP=17,167,0,0\13
input /nomatch 10
output AT+CMGS="phone_number"\13
input /nomatch 10
output \&_[1]\26
input /nomatch 10
output +CMGS: 15\13

close session
exit

You can write your message directly to this script if you want. You just have to change this line:

output \&_[1]\26

to look more like this:

output My Message\26

but I use \&_[1] because I want to give message as command line parameter.
Example if I want to send text message to my phone when my Linux server is offline I just have to write script which notice if my server is offline and then
run this script:

sms.sh Offline

and then it sends message “Offline” to my phone. Of course this was just a really basic example =)

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>