From owner-freebsd-hackers@FreeBSD.ORG Wed Oct 24 19:03:44 2007 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 860F116A417 for ; Wed, 24 Oct 2007 19:03:44 +0000 (UTC) (envelope-from brooks@illuminati.org) Received: from zmail.illuminati.org (mail.illuminati.org [70.42.141.33]) by mx1.freebsd.org (Postfix) with ESMTP id 5FB0F13C465 for ; Wed, 24 Oct 2007 19:03:43 +0000 (UTC) (envelope-from brooks@illuminati.org) Received: from localhost (localhost.localdomain [127.0.0.1]) by zmail.illuminati.org (Postfix) with ESMTP id 3CE4316C86DF for ; Wed, 24 Oct 2007 09:53:18 -0700 (PDT) X-Virus-Scanned: amavisd-new at X-Spam-Score: -4.397 X-Spam-Level: X-Spam-Status: No, score=-4.397 tagged_above=-10 required=6.6 tests=[ALL_TRUSTED=-1.8, AWL=0.002, BAYES_00=-2.599] Received: from zmail.illuminati.org ([127.0.0.1]) by localhost (zmail.illuminati.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fUViPGU7gJ2L for ; Wed, 24 Oct 2007 09:53:06 -0700 (PDT) Received: from zmail.illuminati.org (zmail.illuminati.org [10.32.1.33]) by zmail.illuminati.org (Postfix) with ESMTP id D3AE316C86DE for ; Wed, 24 Oct 2007 09:53:06 -0700 (PDT) Date: Wed, 24 Oct 2007 09:53:06 -0700 (PDT) From: Brooks Talley To: freebsd-hackers@freebsd.org Message-ID: <6511247.119521193244786830.JavaMail.root@zmail.illuminati.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [67.168.65.79] Subject: Getting nonstandard serial baud rates w/FTDI 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: Wed, 24 Oct 2007 19:03:44 -0000 Hi, everyone. I'm pulling my hair out in great chunks. I need to get Python 2.5, using pyserial 2.2, to open a FTDI-based usb to serial port at 250000 baud. The FTDI chip definitely supports this rate. The port mounts at /dev/cuaU0. The problem is that /usr/local/lib/python2.5/site-packages/serial/serialposix.py fails on this line: ispeed = ospeed = getattr(TERMIOS,'B%s' % (self._baudrate)) So far, I have applied these patches to uftdi.c and uftdireg.h: http://tinyurl.com/2yye2l Approaching this with a machete, I have also updated /usr/src/lib/libc/gen/termios.h to add B250000, and rebuilt world and the kernel, and confirmed that the updated termios.h made it to /usr/include and /usr/include/sys. Any ideas on how to get this to work? It doesn't seem like it should be this difficult! Thanks -Brooks