From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 16 03:35:41 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 232731065670 for ; Mon, 16 Aug 2010 03:35:41 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.freebsd.org (Postfix) with ESMTP id 778818FC08 for ; Mon, 16 Aug 2010 03:35:39 +0000 (UTC) Received: from ur.gsoft.com.au (Ur.gsoft.com.au [203.31.81.44]) (authenticated bits=0) by cain.gsoft.com.au (8.14.4/8.14.3) with ESMTP id o7G3Z8vD031525 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Mon, 16 Aug 2010 13:05:14 +0930 (CST) (envelope-from doconnor@gsoft.com.au) Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: multipart/signed; boundary=Apple-Mail-4-827314308; protocol="application/pkcs7-signature"; micalg=sha1 From: "Daniel O'Connor" In-Reply-To: <4C67F1BD.9000003@prt.org> Date: Mon, 16 Aug 2010 13:05:08 +0930 Message-Id: References: <4C66D2CF.9040408@prt.org> <20100814220929.GI2978@hoeg.nl> <4C672EE1.60101@prt.org> <4C67F1BD.9000003@prt.org> To: Paul Thornton X-Mailer: Apple Mail (2.1081) X-Spam-Score: -2.51 () ALL_TRUSTED,BAYES_00,T_RP_MATCHES_RCVD X-Scanned-By: MIMEDefang 2.67 on 203.31.81.10 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Ed Schouten , freebsd-hackers@freebsd.org Subject: Re: Problem detecting and reacting to serial break X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2010 03:35:41 -0000 --Apple-Mail-4-827314308 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 15/08/2010, at 23:25, Paul Thornton wrote: > With Linux, it all works as expected - but the linux tcsetattr doesn't > like the nonstandard baud rate either. However, in linux I used > setserial to set a base baud rate of 24000000 and a divisor of 96 to = get > 250k baud rate. When I run, I have a stable buffer dump displayed = which > always starts with byte 1; so I'm happy that in theory my code is > correct and the hardware is behaving as expected. I had a quick look at the uftdi driver and while it has code for setting = break (uftdi_cfg_set_break), there doesn't seem to be any in the read = call back routine to handle break, hence the TTY layer will not see = them. The Linux driver does (obviously :) support it and it doesn't look too = tricky so you could probably fix it up. It would be nice if the man page mentioned the lack of break support ;( -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C --Apple-Mail-4-827314308--