From owner-freebsd-hackers Sun Jul 23 12:01:01 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.11/8.6.6) id MAA09621 for hackers-outgoing; Sun, 23 Jul 1995 12:01:01 -0700 Received: from sequent.kiae.su (sequent.kiae.su [144.206.136.6]) by freefall.cdrom.com (8.6.11/8.6.6) with SMTP id MAA09615 for ; Sun, 23 Jul 1995 12:00:57 -0700 Received: by sequent.kiae.su id AA24568 (5.65.kiae-2 ); Sun, 23 Jul 1995 22:57:56 +0400 Received: by sequent.KIAE.su (UUMAIL/2.0); Sun, 23 Jul 95 22:57:56 +0400 Received: (from ache@localhost) by astral.msk.su (8.6.8/8.6.6) id WAA00249; Sun, 23 Jul 1995 22:55:16 +0400 To: Bruce Evans , terry@cs.weber.edu Cc: hackers@freebsd.org, harry@hgac.com, jkh@violet.berkeley.edu References: <199507231738.DAA18866@godzilla.zeta.org.au> In-Reply-To: <199507231738.DAA18866@godzilla.zeta.org.au>; from Bruce Evans at Mon, 24 Jul 1995 03:38:28 +1000 Message-Id: Organization: Olahm Ha-Yetzirah Date: Sun, 23 Jul 1995 22:55:16 +0400 (MSD) X-Mailer: Mail/@ [v2.40 FreeBSD] From: =?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?= aka "Andrey A. Chernov, Black Mage" X-Class: Fast Subject: Re: dial up at > 9600 baud Lines: 60 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Length: 2489 Sender: hackers-owner@freebsd.org Precedence: bulk In message <199507231738.DAA18866@godzilla.zeta.org.au> Bruce Evans writes: >>> The problem: initial port speed 9600, getty speed 38400 f.e., >>> port opened on carrier at 9600, modem detects it and set >>> connection to 9600 too, _then_ getty change port speed to 38400 >>> confusing modem completely. >>> >>> I understand that problem solves by locking port on 38400 >>> initially, but it isn't nice solution, getty must able >>> to open port at correct speed setted in its flags. >There's nothing really wrong with setting the initial speed to 38400 >(except 38400 is too slow - why not 115200? :-). Use >`stty 115200 >I guess I still don't understand how the modem magically detects >>the port speed when the port sets the baud before it says anything >>(like "login: "). >Perhaps getty sometimes writes something before setting the speed. >It does quite a let between the open and setting the speed. I think that getty don't play role here. Most modern modems are able to sense local interface speed somehow, maybe initial connect handshake involved or other tricks, I don't know exactly. I plan to rewrite getty to open device as non-blocked first, set up all termios flags (not speed only can play role on intelligent multipord card), then open device in blocked mode (wait for carrier). But in one moment I realize that while getty waits for carrier, some other dialout application can become active and leave serial speed into unpredictable state. This fact means two things: 1) getty can't work right without setting of initial device, it is mandatory. So getty must open _initial_ device first (for serial lines only, for other lines normal device here), and setup all termios flags on it, then open normal device in blocking mode. 2) We additionly need to restore initial serial settings in sio.c in comhardclose(), i.e. call comparam(com->it_{in,out}) there. I plan to commit proposed changes in near future, if we agree. -- Andrey A. Chernov : And I rest so composedly, /Now, in my bed, ache@astral.msk.su : That any beholder /Might fancy me dead - FidoNet: 2:5020/230.3 : Might start at beholding me, /Thinking me dead. RELCOM Team,FreeBSD Team : E.A.Poe From "For Annie" 1849