hardware control flow RTS/CTS with LINUX

hardware control flow RTS/CTS with LINUX

Post by DELVAL Alai » Fri, 02 Oct 1998 04:00:00



Hi all,

I wrote a programm to work with a modem and every thing works fine
except the control flow with hardware RTS/CTS.
Here is the code.

Any body could help me!!!

Thanks a lot.


void CONNECT_COM()
{

  if (ioctl(serialp,TCGETA,&terminal) != 0) printf("err1\n");

   terminal.c_cflag &= ~CBAUD;
   terminal.c_cflag |= B19200;
   terminal.c_cflag |= HUPCL;
   terminal.c_cflag |= CREAD;
   terminal.c_cflag |= CS8;
   terminal.c_cflag |= CLOCAL;

   terminal.c_cflag |= CTSFLOW;
   terminal.c_cflag |= RTSFLOW;
   terminal.c_cflag |= ORTSFL;

   terminal.c_iflag = 0;
   terminal.c_lflag = 0;
   terminal.c_oflag = 0;
   terminal.c_cc[VMIN]=1;

   if (ioctl(serialp,TCSETA,&terminal) != 0) printf("err2\n");

Quote:}

 
 
 

1. hardware control flow RTS/CTS

Hi all,

I wrote a programm to work with a modem and every thing works fine
except the control flow with hardware RTS/CTS.
When CTS drops TD don't drop and data are lost.
Here is the code.

Could Any body  help me ???

Thanks a lot.


void CONNECT_COM()
{

  if (tcgetattr(serialp,&terminal) != 0) printf("err1\n");

   cfsetispeed(&terminal,B19200);
   cfsetospeed(&terminal,B19200);

   terminal.c_cflag |= HUPCL;
   terminal.c_cflag |= CREAD;
   terminal.c_cflag |= CS8;
   terminal.c_cflag |= CLOCAL;

   terminal.c_cflag |= CTSFLOW;
   terminal.c_cflag |= RTSFLOW;
   terminal.c_cflag &= ~ORTSFL;

   terminal.c_iflag = 0;
   terminal.c_lflag = 0;
   terminal.c_oflag = 0;
   terminal.c_cc[VMIN]=1;

   if (tcsetattr(serialp,TCSANOW,&terminal) != 0) printf("err2\n");

2. Startup howto? questions

3. Passing sysctl variables to kernel

4. RTS/CTS flow control

5. Newbie question: DEC video support

6. RTS/CTS flow control on serial ports

7. kernel panic: VFS: Unable to mount root fs on 09:02 ??

8. RTS/CTS flow control problems with Motorola BSP

9. Serial link with RTS/CTS high & no flow control

10. How to set up RTS/CTS flow control for bidirectional modem

11. RTS/CTS flow control (AIX V3)

12. Adding rts/cts flow control to tty ports