1832645 Members
3073 Online
110043 Solutions
New Discussion

kermit vs uucp

 
SOLVED
Go to solution
Todd Bowden
Valued Contributor

kermit vs uucp

Im trying to come up with a way to test modems automatically.

We have 48 modems attached to a 64 port mux card in an L3000. I would like to automate using kermit to test out the modems to see if they accept "AT" commands and then exit, is this possible? If so how?

Todd
8 REPLIES 8
Rick Garland
Honored Contributor

Re: kermit vs uucp

If all you need to do is test for the AT response you can use the "cu" command.

There are many scripting langauges that will accomplish this feat. A shell script will work, perl, expect, etc...


Rick Garland
Honored Contributor

Re: kermit vs uucp

Something else - you can configure the /etc/uucp/Systems file and then add an entry in the cron to connect to the modem. From there you can collect the return responses from the modem.
Todd Bowden
Valued Contributor

Re: kermit vs uucp

I have tried scripting it but have not gotten it to work. I try giving it the AT commands but it doesnt seem to see them.
Darren Prior
Honored Contributor

Re: kermit vs uucp

Hi Todd,

I recommend the "Using C-Kermit" book by da Cruz/Gianone published by Digital Press. There's a lot of info in there about writing scripts and getting Expect-type functionality.

regards,

Darren.
Calm down. It's only ones and zeros...
Todd Bowden
Valued Contributor

Re: kermit vs uucp

So does no one in the forums test out their modems? If so how are you doing it? Im just looking for a simple way to send AT commands to a modem and get back an OK. I have had problems with sending AT commands to some of our modems and get a Lost Carrier. So now Im trying to come up with a simple way of testing them. I guess its not so simple, except if you do it manually.
D Block 2
Respected Contributor

Re: kermit vs uucp

You might want to RESET, besides ATTENTION (AT).

You might want to even force a Dial on one modem to your office phone, and get NO-HandShake/Modem present...

There has to be some public domain software to do what your expect.. have you search under google.com or maybe even Linux to get the "cu" source code.

The problem with Cu, I think it reads from standard-input... would be nice to change this to read from a script, much like, what uucp does.

a Great Reference Book:

UNIX Network Programming, W. Richard Stevens, Prentice Hall, 1990. ISBN 0-13-949871-1.


Golf is a Good Walk Spoiled, Mark Twain.
Darren Prior
Honored Contributor
Solution

Re: kermit vs uucp

Hi Todd,

I'm not sure I understand why you need to test the modems on a regular basis. If they are used for dial in via a getty then they should be configured such that they reset back to the correct settings when the line drops. If it's dial out usage, then your application should be closing the port correctly when it has finished. Prevention is better than cure ;)

Anyway, here's a basic Kermit script I've just put together. It could be improved by adding exit codes and formatting the text a little but it should give you a starting point:

set line /dev/tty1p0
set speed 9600
output at\13
input 5 ok
if success echo Modem OK
else echo Modem problem
exit

You can run this by using kermit -y
You can then write a loop that creates the script file and uses the appropriate device file and speed for each one, before it gets run by kermit.

regards,

Darren.
Calm down. It's only ones and zeros...
Todd Bowden
Valued Contributor

Re: kermit vs uucp

Darren,

That was exactly what I needed. I intend on getting this book, but needed something to just test AT commands to our modems. A few months ago we had problem with 7-10 of our modems that became unresponsive. HP came out with first a MUX patch and then said we needed to add a MUX panel terminator. Of course now we need to be able to test these modems just to be proactive. The only way to get these modems back was to reboot the system. Thanks again.

After doing some testing with this I found again 3 of our modems are not responding again. The problem is when I send an AT command to the modem it gives me "Lost Carrier" and then disconnects me right away.