Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 May 1996 13:48:35 +0200 (MET DST)
From:      Darek Misiak <damis@szc.ternet.pl>
To:        Brett Glass <Brett_Glass@ccgate.infoworld.com>
Cc:        hardware@freebsd.org
Subject:   Re: Inteligent cards and PPP
Message-ID:  <Pine.BSI.3.93.960506134525.4073B-100000@gryf>
In-Reply-To: <9604068313.AA831382900@ccgate.infoworld.com>

next in thread | previous in thread | raw e-mail | index | archive | help


On Sun, 5 May 1996, Brett Glass wrote:

> Send me your rc.serial; I'll have a look. I needed to make minor changes to
> the code myself.
> 
> 

You welcome :

default() {
	# Reset everything changed by the other functions to initial defaults.
	for i in $*
	do
		comcontrol /dev/ttyd$i dtrwait 300 drainwait 0
		comcontrol /dev/ttyA0$i dtrwait 300 drainwait 0
		stty </dev/ttyid$i -clocal  crtscts  hupcl 9600 reprint ^R
		stty </dev/ttyiA0$i -clocal crtscts hupcl 9600 reprint ^R
		stty </dev/ttyld$i -clocal -crtscts -hupcl 0
		stty </dev/ttylA0$i -clocal -crtscts -hupcl 0
		stty </dev/cuaia$i -clocal  crtscts  hupcl 9600 reprint ^R
		stty </dev/cuala$i -clocal -crtscts -hupcl 0
	done
}

maybe() {
	# Special settings.
	for i in $*
	do
		# Don't use ^R; it breaks bash's ^R when typed ahead.
		stty </dev/ttyid$i reprint undef
		stty </dev/ttyiA0$i reprint undef
		stty </dev/cuaia$i reprint undef
		# Lock clocal off on dialin device for security.
		stty </dev/ttyld$i clocal
		stty </dev/ttylA0$i clocal
		# Lock the speeds to use old binaries that don't support them.
		# Any legal speed works to lock the initial speed.
		stty </dev/ttyld$i 300
		stty </dev/ttylA0$i 300
		stty </dev/cuala$i 300
	done
}

modem() {
	# Modem that supports CTS and perhaps RTS handshaking.
	for i in $*
	do
		# may depend on modem
		comcontrol /dev/ttyd$i dtrwait 100 drainwait 180
		comcontrol /dev/ttyA0$i dtrwait 100 drainwait 180
		# Lock crtscts on.
		# Speed reasonable for V42bis.
		stty </dev/ttyid$i crtscts 57600
		stty </dev/ttyiA0$i crtscts 57600
		stty </dev/ttyld$i crtscts 
		stty </dev/ttylA0$i crtscts
		stty </dev/cuaia$i crtscts 57600
		stty </dev/cuaA0$i crtscts 57600
		stty </dev/cuala$i crtscts
	done
}

mouse() {
	# Mouse on either callin or callout port.
	for i in $*
	do
		# Lock clocal on, hupcl off.
		# Standard speed for Microsoft mouse.
		stty </dev/ttyid$i clocal -hupcl 1200
		stty </dev/ttyld$i clocal  hupcl
		stty </dev/cuaia$i clocal -hupcl 1200
		stty </dev/cuala$i clocal  hupcl
	done
}

terminal() {
	# Terminal that supports CTS and perhaps RTS handshaking
	# with the cable or terminal arranged so that DCD is on
	# at least while the terminal is on.
	# Also works for bidirectional communications to another pc
	# provided at most one side runs getty.
	# Same as modem() except we want a faster speed and no dtrwait.
	modem $*
	for i in $*
	do
		comcontrol /dev/ttyd$i dtrwait 0
		comcontrol /dev/ttyA0$i dtrwait 0
		stty </dev/ttyid$i 115200
		stty </dev/ttyiA0$i 115200
		stty </dev/cuaia$i 115200
		stty </dev/cuaA0$i 115200
	done
}

Specialix ports are A01-A08

Regards
Darek





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSI.3.93.960506134525.4073B-100000>