[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [PATCH] BusyBox 1.19.4 + 1.21.0 stty add RS485 config options
From:       Denys Vlasenko <vda.linux () googlemail ! com>
Date:       2013-05-19 13:05:38
Message-ID: 201305191505.38590.vda.linux () googlemail ! com
[Download RAW message or body]

On Saturday 18 May 2013 22:17, Angeli Janos wrote:
> Dear Denys,
> 
> On 2013.05.17. 18:25, Denys Vlasenko wrote:
> > On Tue, May 7, 2013 at 10:00 PM, Angeli Janos <angelo@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.

I see.

The point is, I prefer for busybox commands to be similar to the
"standard" commands (where "standard" is defined as "commands
which are found on the most popular Linux distributions")

Please submit your patches to the upstream projects first,
so that they are accepted by standard tools.

Then the corresponding support can be added to busybox.

Re stty: stty seems to be oriented to setting termios parameters.

Hardware-dependent paramentes for serial ports are set by another tool,
setserial. From my POV rs485 support would look more natural there.

-- 
vda
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic