Using Sony Ericsson GM29 GPRS modem on Linux to send text messages.
I use this kind of code which I get from usenet but I have modified it for my own purpose:
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
<span id="more-820"></span>
close session
exit
You can write your message directly to this script if you want. You just have to change this line:
to look more like this:
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:
and then it sends message “Offline” to my phone. Of course this was just a really basic example =)

