Thanks, that's what I neeeded. The expect script works great!
On 13 Feb 1998, Carey Evans wrote: > Steve Hsieh <[EMAIL PROTECTED]> writes: > > > No difference. Does it work on your modem port? > > > > raindrop:~> stty 115200 echoe -echo -clocal raw < /dev/ttyS0 > > raindrop:~> stty 115200 echoe -echo -clocal raw < /dev/ttyS0 > > It won't ever work because the shell tries to open /dev/ttyS0 without > O_NONBLOCK being one of the flags, and in this case it will wait for > carrier detect before the open() returns. > > A small program to open the device with O_NONBLOCK and set CLOCAL > before passing control to the original command could be useful. I'll > see if I have some spare time to work on it. > > You could also open the file with NONBLOCK set in expect (see "man > 3tcl open"): > > set tty [open /dev/ttyS0 {RDONLY NONBLOCK}] > exec stty 115200 -echoe -echo raw <@ $tty > close $tty > > -- > Carey Evans http://home.clear.net.nz/pages/c.evans/ > > GNU GPL: "The Source will be with you... always." > > > -- > TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to > [EMAIL PROTECTED] . > Trouble? e-mail to [EMAIL PROTECTED] . > -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .