[ale] chatting to my modem

Geoffrey Myers geof at abraxis.com
Fri Aug 29 16:25:58 EDT 1997


c_fowler at hotmail.com wrote:
> 
> I want my linux box to dial my pager number and send certain number codes
> to my pager when things happen.  I do not want to buy a commercial software
> package to do this.  I think I can do it with a combination of scripting and
> some program taht can talk to the modem and send at commands.  Does anyone know
> how to do this?

This came up once before,,, I think.  I currently do this with a call to
'cu.'  Not the tool of choice for a lot of folks, but hey it works.  I
had it set up to page me whenever someone logged into my box and
whenever the machine was rebooted.  I then set it up to page me every
hour on the quarter hour when I was having problems with my pager and
wanted to verify that it was functioning properly.  It's called from
cron and is very simplistic.  You can get it done with three lines of
code as follows:

cu -l /dev/cua0 "555,555-1234---$CODETOSEND" &
sleep 25
kill $!

Now it's not very elegant, but it works and works well.  The $CODETOSEND
is the digital sequence you send to the pager.  I've found that I must
explicitly kill the cu call as indicated above.  The '---' between the
pager number and the $CODETOSEND basically provides the time for the
pager system to answer the phone.  I had to play with it to get the
right length of the pause.  You may have to tweek it as well.  Good
luck.

> 
> Thanks,
> Christopher Fowler
> ----------------------------------
> E-Mail:  c_fowler at hotmail.com
> Date: 29-Aug-97
> Time: 10:39:01
> 
> This message was sent by XFMail
> ----------------------------------

-- 
Until later:
Geoffrey Myers   geof at abraxis.com	http://www.abraxis.com/geof

	Opinions expressed by me are mine, all mine, only mine.....






More information about the Ale mailing list