From owner-freebsd-questions@FreeBSD.ORG Fri Aug 19 09:18:02 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 48899106564A for ; Fri, 19 Aug 2011 09:18:02 +0000 (UTC) (envelope-from perquam@gmail.com) Received: from mail-gw0-f54.google.com (mail-gw0-f54.google.com [74.125.83.54]) by mx1.freebsd.org (Postfix) with ESMTP id 060B28FC12 for ; Fri, 19 Aug 2011 09:18:01 +0000 (UTC) Received: by gwb15 with SMTP id 15so1747980gwb.13 for ; Fri, 19 Aug 2011 02:18:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=t6QDttEJGq6072bzL3SibztKMtEQfEzBA+blGsLxdV4=; b=inHm3PuEwK34LV5h0yytrq/3j7sMdqD2T4zfGv8URrH5v50jNZSUIipd6yritfT0EA wLw2A4xEUsY1N4mFk3sV0b2i8ONlzM2mitUvbVUk+05G1Z1/qJ5+Smc8GvLiKpA9Mklq Z5JIS4vrU0TQKXoy4jO3bD9CnUWLkvMyyHYXI= MIME-Version: 1.0 Received: by 10.150.164.6 with SMTP id m6mr1925662ybe.298.1313745481249; Fri, 19 Aug 2011 02:18:01 -0700 (PDT) Received: by 10.151.40.20 with HTTP; Fri, 19 Aug 2011 02:18:01 -0700 (PDT) In-Reply-To: References: Date: Fri, 19 Aug 2011 11:18:01 +0200 Message-ID: From: =?ISO-8859-2?Q?Pawe=B3_Michalicki?= To: freebsd-questions@freebsd.org X-Mailman-Approved-At: Fri, 19 Aug 2011 11:24:09 +0000 Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: TIOCGSERIAL? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Aug 2011 09:18:02 -0000 Hi again Thanks for a load of replies. At least I know now, why this group is called "freebsd-questions" and not "freebsd-answers". Regards PM W dniu 5 sierpnia 2011 22:01 u=BFytkownik Pawe=B3 Michalicki napisa=B3: > 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= s > 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= ce > at the other end has an UART which is capable of wild variety of baudrate= s, > 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= ps > (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= n > 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 = and > use? As I've written above, the USB<-> COM converter I use is the FTDI ch= ip, > but the uftdi module does not seem to provide such functionality. I do no= t > 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! >