RE: Handling RTS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It has been known since long ago that this behaviour (which is required to
properly handle many RS485 devices) is not implemented by the serial driver.

So yes, you will have to implement it.
There are several ways to do it, by creating a new line discipline as
suggested by Russell King, or a new termios behaviour, or a new serial
ioctl.

In any case you will also need to add support for this in the 8250 driver
itself. You can do this
 - by using special features of 82950 uarts (I did this once),
 - or by implementing RTS toggleing in software, which
    (1) is more difficult because there is no UART interrupt
        at the end of the byte serialization process,
    (2) is more flexible because you may want to handle a
        configurable delay between RTS rise/data/RTS fall,
    (3) is the only way with the 16C550 and earlier devices.

Jean-Pierre Tosoni

> -----Original Message-----
> From: linux-serial-owner@xxxxxxxxxxxxxxx
> [mailto:linux-serial-owner@xxxxxxxxxxxxxxx]On Behalf Of
> JZabalza@xxxxxxxxxxx
> Sent: Monday, January 21, 2008 12:57 PM
> To: linux-serial; linux-serial-owner@xxxxxxxxxxxxxxx
> Subject: RE: Handling RTS
>
>
> linux-serial-owner@xxxxxxxxxxxxxxx escribió el 14/01/2008 16:05:03:
>
> > > From: linux-serial-owner@xxxxxxxxxxxxxxx [mailto:linux-serial-
> > > owner@xxxxxxxxxxxxxxx] On Behalf Of JZabalza@xxxxxxxxxxx
> > > Sent: January 10, 2008 3:27 AM
> > > To: linux-serial
> > > Subject: RE: Handling RTS
> > >
> > >         Thanks for your response. I have a PC, so dmesg said
> > >
> > >                 serial8250: ttyS0 at I/O 0x3f8 (irq = 4)
> is a 16550A
> > >
> > >         How I said, I just handle RTS but from userland.
> This means a
> big
> > > latency between RTS activation and begin out data. I want
> only reduce
> this
> > > latency activating RTS on driver. My question is, is this
> *protocol*
> > > implemented actually or I must implement them.
> >
> > I'm not an expert on the current 8250 driver, but I believe
> you will
> have to
> > implement your 485 control.
> >
>
>         I'm not an expert too, but my question is, if is
> posible and good
> idea modify common layer of serial linux driver (serial_core.c) to
> implement a **walky-talky** protocol with RTS line, this is,
> activate RTS
> when there are chars to transmit and deactivate when there is not any
> character.
>
> Thanks.
>
>
> José Luis Zabalza
>
> -
> To unsubscribe from this list: send the line "unsubscribe
> linux-serial" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

-
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux