[PATCH] BusyBox 1.19.4 + 1.21.0 stty add RS485 config options

Angeli Janos angelo at angelo.hu
Sat May 18 20:17:00 UTC 2013


Dear Denys,

On 2013.05.17. 18:25, Denys Vlasenko wrote:
> On Tue, May 7, 2013 at 10:00 PM, Angeli Janos <angelo at angelo.hu> wrote:
>> I've added stty RS485 config options for serial devices/drivers which are
>> supporting the ioctl based configurations documented in:
>> https://www.kernel.org/doc/Documentation/serial/serial-rs485.txt
>>
>> I've tested the patches in my workstation (Linux Debian squeeze 2.6.32-5-686
>> kernel), and with my Freescale iMX286 based embedded board too.
>>
>> I'll be happy if this patches can be the official part of the BusyBox
>> packages. (This work is a part of my project: adding RS485 support for
>> Freescale mxs-auart serial driver)
> You are adding rs-485 support to stty.
> Are you sending patches to coreutils' stty too?
> Are they accepted?
No, I haven't sended it yet. I've already checked the original coreutils 
stty source code, It's a little bit different from Your BusyBox version, 
but I can make a patch for it and send it to the list. (Maybe the RS-485 
configurations can be useful for non embedded systems too.)

> If coreutils stty doesn't have these options,
> I wonder now used of "standard" tools set rs-485 parameters -
> which tool they are using?
Currently very few serial drivers supports the RS485 operating mode, but 
I think it is a very important feature in embedded systems. (Originally 
only the crisv10.c and atmel_serial.c driver supported the RS-485, but 
now I've modified the Freescale mxs-auart.c driver to support RS-485 too.)

There is no toolset for setting the RS-485 options in these drivers, the 
necessary ioctl calls are handled in the application C code, but I'm 
think it can be useful if we can setup and check this with stty from 
command line.

This stty functions was tesed on my Armadeus (Freescale iMX28) board, 
You can have look how this new options works: 
http://www.armadeus.com/wiki/index.php?title=RS-485


Unfortunatly We found a bug in my patch: I used a wrong include, which 
don't have the required definitions in old linux kernels (pre 2.6.35), 
so please ignore my current patches. Now I have the fixed version, I'll 
send it to the BusyBox list today.

Thanks.

Best Regards,
Janos Angeli



More information about the busybox mailing list