Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Aug 2011 21:58:41 -0700
From:      "Thomas D. Dean" <tomdean@speakeasy.org>
To:        =?UTF-8?Q?Pawe=C5=82?= Michalicki <perquam@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: TIOCGSERIAL?
Message-ID:  <1313816321.16574.11.camel@asus>
In-Reply-To: <CAJG1iMmWuqCW8CLUa-6NZgXMiwoGv5+ScEY+d4Zyw+1jfuOZEg@mail.gmail.com>
References:  <CAJG1iMmWuqCW8CLUa-6NZgXMiwoGv5+ScEY+d4Zyw+1jfuOZEg@mail.gmail.com>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
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




Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?1313816321.16574.11.camel>