From owner-freebsd-hackers@FreeBSD.ORG Wed Oct 24 19:20:22 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 17FCF16A420 for ; Wed, 24 Oct 2007 19:20:22 +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 E5DA913C48A for ; Wed, 24 Oct 2007 19:20:21 +0000 (UTC) (envelope-from brooks@illuminati.org) Received: from localhost (localhost.localdomain [127.0.0.1]) by zmail.illuminati.org (Postfix) with ESMTP id 28BC416C86E1 for ; Wed, 24 Oct 2007 10:11:41 -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 6ZHiKSMpHa7e for ; Wed, 24 Oct 2007 10:11:29 -0700 (PDT) Received: from zmail.illuminati.org (zmail.illuminati.org [10.32.1.33]) by zmail.illuminati.org (Postfix) with ESMTP id 9CAA816C86DE for ; Wed, 24 Oct 2007 10:11:29 -0700 (PDT) Date: Wed, 24 Oct 2007 10:11:29 -0700 (PDT) From: Brooks Talley To: freebsd-hackers Message-ID: <2297017.119571193245889606.JavaMail.root@zmail.illuminati.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [71.37.13.44] Subject: Getting nonstandard baud rates w/FTDI + python 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:20:22 -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