From: andreas@cubes.s.bawue.de (Andreas Stumpf)
Subject: Trouble with Serial RTS-CTS-Handshake
Date: 1995/11/30 [thread overview]
Message-ID: <1995Nov30.072435.4749@cubes.s.bawue.de> (raw)
Hi all,
I have serious trouble doing Hardware-Handshake on a serial device. I'm using
a device which requires RTS-CTS-Handshake and have written a program doing this
It works fine at my ALPHA-Station 4/166 with OSF 3.0
Now I've installed the program on another machine (ALPHAserver with digital
UNIX 3.2) and the following happens:
RTS drops, when the first characters are sent to the device.
I have no idea how to influence this behaviour.
Following I've listed the code fragment which sets the device-characteristics:
caesar = open ( Device, O_RDWR | O_NOCTTY );
Check ( 0, "open() Caesar", __LINE__ );
/* Attribute der Device holen */
if (tcgetattr(caesar, &term) < 0) {
Check ( 0, "tcgetattr(caesar)", __LINE__ );
exit(0);
}
memcpy ( &saved_term, &term, sizeof(struct termios) );
term.c_cflag &= ~CSIZE; term.c_cflag |= CS8; /* Charactersize 8 */
term.c_cflag |= CREAD;
flow = CRTSCTS;
term.c_cflag |= flow;
term.c_cflag &= ~CLOCAL;
term.c_iflag &= ~( IXOFF | IXON );
term.c_lflag |= MDMBUF;
term.c_lflag &= ~( ECHO | ISIG );
term.c_iflag |= (IGNPAR | IGNBRK ); /* Parity und Breaks interessieren
nicht */
term.c_iflag &= ~(ISTRIP | IUCLC | ICRNL ); /* der Treiber soll keine
Characters modifizieren */
term.c_iflag &= ~BRKINT;
term.c_oflag &= ~(OLCUC | OPOST );
/* not shown: turning off all special characters like this:
term.c_cc[VINTR] = vdisable; */
term.c_cc[VMIN] = 0;
term.c_cc[VTIME] = 90;
/* 9600 Baud */
if ( cfsetospeed ( &term, B9600 ) < 0) {
Check ( 0, "cfsetospeed()", __LINE__ );
exit(0);
}
if ( cfsetispeed ( &term, B9600 ) < 0) {
Check ( 0, "cfsetispeed()", __LINE__ );
exit(0);
}
if ( tcsetattr ( caesar, TCSANOW, &term) < 0) {
Check ( 0, "tcsetattr(caesar)", __LINE__ );
exit(0);
}
==============================================================================
Andreas Stumpf, Stuttgart, Germany
Phone/FAX: +49 711 630171
Compuserve: 100013,2607
Email: andreas@cubes.sdata.de
==============================================================================
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: 2.6.2i
mQCNAzBe4/IAAAEEAJjiI9GMKzHJv4jnOmKbOXNns6mQsMDc++tFvzGCSeADB0XI
doYjRE2oZZ0JDf7TCVM9U3PTSNzufoJIMrzGJQ9/8OrNI8BMX6CJn5vqfNYVqxu/
7QH9FTdL8dlYh26yWwmzjewJk3xD0Q1gZ12MJSehOCgYPkNhXwvz+JVZWKpJAAUR
tCdBbmRyZWFzIFN0dW1wZiA8YW5kcmVhc0BjdWJlcy5zZGF0YS5kZT4=
=gp+K
-----END PGP PUBLIC KEY BLOCK-----
==============================================================================
--
==============================================================================
Andreas Stumpf, Stuttgart, Germany
Phone/FAX: +49 711 630171
Compuserve: 100013,2607
next reply other threads:[~1995-11-30 5:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1995-11-30 5:00 Andreas Stumpf [this message]
1995-12-06 5:00 ` Trouble with Serial RTS-CTS-Handshake A.Schindler
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox