From owner-freebsd-questions@FreeBSD.ORG Sat Aug 20 04:58:42 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E18A1065672 for ; Sat, 20 Aug 2011 04:58:42 +0000 (UTC) (envelope-from tomdean@speakeasy.org) Received: from mail8.sea5.speakeasy.net (mail8.sea5.speakeasy.net [69.17.117.53]) by mx1.freebsd.org (Postfix) with ESMTP id 6CBA88FC17 for ; Sat, 20 Aug 2011 04:58:42 +0000 (UTC) Received: (qmail 25948 invoked from network); 20 Aug 2011 04:58:41 -0000 Received: from 24-113-112-30.wavecable.com (HELO [192.168.2.2]) (tomdean@[24.113.112.30]) (envelope-sender ) by mail8.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 20 Aug 2011 04:58:41 -0000 From: "Thomas D. Dean" To: =?UTF-8?Q?Pawe=C5=82?= Michalicki In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Organization: Home Date: Fri, 19 Aug 2011 21:58:41 -0700 Message-ID: <1313816321.16574.11.camel@asus> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 8bit Cc: freebsd-questions@freebsd.org Subject: Re: TIOCGSERIAL? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: tomdean@speakeasy.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Aug 2011 04:58:42 -0000 On Fri, 2011-08-05 at 22:01 +0200, Paweł Michalicki wrote: > I have a certain device which can be hooked to a PC via RS232 connection. > Since my PC does not have a true COM port, I am using an USB<->COM > converter, which contains the FTDI chip. I wrote a program to handle the > communications via the /dev/cuaU0, and all this works very well. The device > at the other end has an UART which is capable of wild variety of baudrates, > including standard rates of 19200, 38400 and 57600 bits per second. In my > program on FreeBSD I am using that last baudrate. What USB<-->serial adapter are you using? I use the pl2303. The baud rate for devices like the pl2303 is controlled in sys/dev/usb/serial/uplcom.c, I think. Look at uplcom.c, the comments at the top and lines 608..620. -or- grep uplcom_rates sys/dev/usb/serial/* -A10 You can insert your baud rate in that data structure and rebuild the kernel or module. Maybe. tomdean