[Rxtx] Baud rate problem

Marcin depmar at poczta.onet.pl
Sat Apr 28 01:22:17 MDT 2012


I also have problems with 38400 baud rate on Linux. It works fine with
2.1.7r2 but not with 2.2-pre2.

-----Original Message-----
From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of
Mike Markowski
Sent: Friday, April 27, 2012 11:42 PM
To: rxtx at qbang.org
Subject: Re: [Rxtx] Baud rate problem

If you ever need 38400 baud tested, please let me know.  I have a device
that uses that baud.  At the moment, it communicates fine with 2.1.7r2 but
not 2.2-pre2.

Thanks,
Mike

On 04/22/2012 01:36 PM, Trent Jarvi wrote:
>
> 38400 should be supported on Linux.  Testing baudrate code in rxtx 
> isnt very easy because testing is usually done with a loopback 
> connector.  The baudrate always matches itself.
>
> A serial port has a crystal that is used to generate a baudbase.  
> 128000 is fairly common.  The frequency is then divided to produce 
> lower baudrates.  Divide by 1 and its 128000.  Divide by 13 and you 
> get 9600.
>
> The BaudBase and Divisor are in the structure returned from  ioctl( 
> fd, TIOCGSERIAL, &sstruct );.
>
> When the baudrate is set to B38400 (a C define used for 38400 
> baudrates), you can modify the divisor to generate rates that are not 
> predifined in the C header files.
>
> BaudRate = BaudBase/Divisor.
>
> Many common rates are predifined for programmers but the struct is 
> there for other rates.
>
_______________________________________________
Rxtx mailing list
Rxtx at qbang.org
http://mailman.qbang.org/mailman/listinfo/rxtx




More information about the Rxtx mailing list