Re: talking to modems

From: Matt Lawrence (matt@technoronin.com)
Date: Fri Sep 20 2002 - 14:55:32 EDT


Well, Ruby has some very nice use-level threads. You could start a
seperate thread to check the tty and kill it if it doesn't respond within
a certain time. I did something like that when I wrote some web spiders,
if the server didn't respond within a couple of minutes, I would kill the
thread and restart it.

See, I told you that you should hire me.

-- Matt

>From my heart and from my hand, why don't people understand my intention?

On Fri, 20 Sep 2002, Jolet, John wrote:

> Here's the scenerio: i've got two 128 port async adapters, with two lines on
> each. Each line has 4 16-port RANs (concentrators) on it, and each RAN has
> 16 modems....most of these modems have ttys assigned and enabled for dial-in
> access. I need to find a way to be able to talk to the modems to make sure
> each individual modem is not "hung". I can do a pdisable, then cu -m
> -lttyname to the tty and see if the modem responds, but with 150 of them, i
> need an automated way. Currently, i've got a perl script that uses kermit
> to do this, but kermit for some reason seems to occasionally hang....then
> the script hangs. I've tried the << EOF thing with a korn shell script and
> cu, and i've tried the perl Expect module to try to use cu, but the
> keystrokes never seem to get there. I need a reliable way of sending the
> modem an at command and seeing if it responds with anything at all. And it
> needs to work 100% of the time. I can't put this into production with a
> script that may or may not hang. HELP!
>



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:16:13 EDT