Paul,

Still, no joy... :(

I've inserted the following code (with m-a-n-y variations) just after the
open(...).
It still takes 5 to 15 seconds to respond to any modem control line change.
I also tried starting with a zeroed "termios" (not using tcgetattr) and set
each member.
The results are the same.  This also happens on multiple machines, too.

    struct termios                oldtio;

    tcgetattr (fd, &oldtio);                /* get current serial port
settings */
    oldtio.c_cflag |= CS8 | CLOCAL | CREAD;
    oldtio.c_cflag &= ~CRTSCTS;

    oldtio.c_iflag = IGNPAR | ICRNL;

    oldtio.c_oflag = 0;             /* Raw output. */

    tcflush (fd, TCIFLUSH);
    tcsetattr (fd, TCSANOW, &oldtio);
 
    fcntl (fd, F_SETFL, FNDELAY); 

Any other ideas or suggestions?

Rg,
Mike


-----Original Message-----
From: Paul Fulghum [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 16, 1999 5:50 PM
To: Mike Stratoti; [EMAIL PROTECTED]
Subject: Re: Slow response with TIOCMIWAIT?


From: Mike Stratoti <[EMAIL PROTECTED]>

> I don't want the driver to do any with the lines.
> No hang-up. No flow control. No processing at all.
> Just pass the state changes to my program.
> Do I have to "condition" the device driver to have the lines passed
without
> interpretation?

There are termios control flags for this.

look at the functions tcgetattr() and tcsetattr()
to get the current port attributes, modify them and
set the new values.

You use 'struct termios' with this, and one of the members
is c_cflag (control flags).

Clearing the CRTSCTS flag should remove hardware flow control.
Setting the CLOCAL flag should prevent CD changes from causing a hangup.

> Tonight, I'll try toggling only RI or DSR as you suggest.  But I prefer
> using all of the control lines.

RI has the added problem of only detecting the trailing edge transition
(just the way the 16550 works). DSR and CTS will increment the
icount for both (active and inactive) transitions.

> Below is the code I am using. (I did include it in the first message but I
> guess it was filtered out)

No it was there, I meant look at the kernel code, which I did briefly.
I think the SIGHUP signal, which is sent on CD negation, may
cause problems with the wait for signal transitions by interrupting
the ioctl() system call and restarting it. Or maybe not :)

Paul Fulghum [EMAIL PROTECTED]
Microgate Corporation www.microgate.com
9501 Capital of Texas Hwy
Austin, Texas 78759
(512)-345-7791



-
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to [EMAIL PROTECTED]

-
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to [EMAIL PROTECTED]

Reply via email to