Subject: Re: Problems with sending commands to modem/serial device
To: AS <astaude@silas-1.cc.monash.edu.au>
From: Frederick Bruckman <fredb@fb.sa.enteract.com>
List: port-i386
Date: 07/14/1998 12:44:49
On Mon, 13 Jul 1998, AS wrote:
> I have two modems connected to my NetBSD box.
> tty00 has my connection to the Net.
> tty01 is a dial in modem.
> I am trying to send a command to my modem connected to tty01
> to put it into auto-answer mode.
>
> For example:
>
> echo "ATZM1L2&D2%C1S0=2Q1" > /dev/tty00
>
> doesn't seem to work. It just sits there and hangs...
> I have to send the process a HUP to recover it.
Try "cu". There's an evil trick to get cu to talk to a modem...
$ cu -l /dev/tty01 --nostop
~[]z
$ stty -f /dev/tty01 clocal
$ fg %cu
ATZ
etc.
~[].
That way you can type AT&V to see if your settings took. What you're doing
should probably work, except that some modems don't like to have anything
following ATZ on the same line--it may take a second to accomplish the
reset, during which time your commands are ignored.