Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Mar 2004 16:29:04 +1030
From:      "Daniel O'Connor" <doconnor@gsoft.com.au>
To:        freebsd-hackers@freebsd.org
Subject:   How to write a new line discipline?
Message-ID:  <200403161629.04021.doconnor@gsoft.com.au>

next in thread | raw e-mail | index | archive | help
Hi,
My company uses RS485 to talk to various pieces of hardware, and currently to 
do this we have a hacked up copy of sio which talks to a conventional RS485 
card, while this works well it would be nicer to be able to use different 485 
cards via the puc driver instead of having to use a custom driver. Our custom 
driver only understands 8250/16550/etc UARTS which is another limitation (not 
currently an issue though :)

It was suggested a while ago by phk (I think..) that a line discipline would 
be the best approach, and I think this makes sense. The protocol in question 
uses the parity bit as a 9th bit to signal an address byte (only 256 
addresses on this bus). I can't see how a line discipline can directly 
control and read the parity information, and to set various control lines 
(specifically RTS) to switch the transceiver into transmit mode when 
necessary.

The current disciplines seem to be either very very old, or 'hacks' for things 
like PPP or SLIP :(

-- 
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
  -- Andrew Tanenbaum
GPG Fingerprint - 9A8C 569F 685A D928 5140  AE4B 319B 41F4 5D17 FDD5



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200403161629.04021.doconnor>