Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Aug 2011 11:18:01 +0200
From:      =?ISO-8859-2?Q?Pawe=B3_Michalicki?= <>
Subject:   Re: TIOCGSERIAL?
Message-ID:  <>
In-Reply-To: <>
References:  <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
Hi again

Thanks for a load of replies. At least I know now, why this group is called
"freebsd-questions" and not "freebsd-answers".


W dniu 5 sierpnia 2011 22:01 u=BFytkownik Pawe=B3 Michalicki

> Hi
> First, apologies if this is the wrong group to ask my question. I looked
> through all the group titles and this one looked suitable. The question i=
> related to programming under FreeBSD.
> 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 devi=
> at the other end has an UART which is capable of wild variety of baudrate=
> including standard rates of 19200, 38400 and 57600 bits per second. In my
> program on FreeBSD I am using that last baudrate.
> However, the "wild variety of baudrates" which can be used includes also
> such baudrates as 88, 98, 110 kbps and the highest possible one is 126 kb=
> (note: no 115,2 kbps). I'd like to use 126 kbps instead of 57,6 kbps.
> Now, it is possible on Linux using ioctl(TIOCGSERIAL) and
> ioctl(TIOCSSERIAL). As I understand, using these you can very precisely
> control the serial baudrate on COM ports (or at least on USB ports with a=
> USB<->COM converter hooked up). Sadly, these do not seem available on
> FreeBSD.
> My question is: is there any equivalent of TIOCGSERIAL/TIOCSSERIAL
> available on FreeBSD, or maybe there is some special driver I could load =
> use? As I've written above, the USB<-> COM converter I use is the FTDI ch=
> but the uftdi module does not seem to provide such functionality. I do no=
> want to write my own kernel module or FTDI device driver just for that
> purpose.
> The system is FreeBSD 6.4 but (judging from grep -r TIOCGSERIAL on
> /usr/include) this applies to 8.0 as well.
> Thanks!

Want to link to this message? Use this URL: <>