Usenet comp.unix.osf.misc (1992-2004)
 help / color / mirror / Atom feed
* Trouble with Serial RTS-CTS-Handshake
@ 1995-11-30  5:00 Andreas Stumpf
  1995-12-06  5:00 ` A.Schindler
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Stumpf @ 1995-11-30  5:00 UTC (permalink / 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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1995-12-06  5:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-11-30  5:00 Trouble with Serial RTS-CTS-Handshake Andreas Stumpf
1995-12-06  5:00 ` A.Schindler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox