How to write a new line discipline?

Daniel O'Connor doconnor at gsoft.com.au
Tue Mar 16 05:11:15 PST 2004


On Tue, 16 Mar 2004 19:04, Bernd Walter wrote:
> Don't forget that there are chips (e.g. uftdi(4) based) that can
> control txenable themself without OS interaction.
> You can't expect the userland software to know.

Well, no, but I envisage this is something the line discipline does when it 
needs to write to the bus, some of the cards we get do automatic direction 
control, some don't.

> Using an USB RS232 Interface with an RTS controlled RS232-RS485
> converter is unlikely to work in many cases for timing reasons.

Yes :(

> I needed half-duplex RS485 for modbus which fortunately is a 8 bit
> protocoll, but does addressing by using strict bus idle times.
> It was very tricky to do the timing good enough in userland.
> Currently I'm using uftdi(4) based chips, but I think the next
> generation will be a special kernel driver for self build modbus USB
> devices to allow interleaving support for higher throughput.
> I think other RS485 protocolls might be better with special non tty
> based kernel drivers too.
> uart(4) layering seems to be a good starter for connecting such a
> driver to various generic interfaces without loosing the ability to
> have protocoll specialized hardware.

I have a new PCI card on the back burner, although I would be interested in 
seeing more details on your USB approach if possible as it would be nice to 
control our own supply of this hardware (nothing sucks more than not being 
able to buy vital equipment..)

-- 
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


More information about the freebsd-hackers mailing list