Re: irda: is it tty or netdevice or both? [was Re: TTY_FLIPBUF_SIZE too low causing dataloss on too

Dag Brattli (dagb@cs.uit.no)
01 Jun 1999 19:58:19 +0100


Pavel Machek <pavel@atrey.karlin.mff.cuni.cz> writes:

> > So IrDA SIR mode uses async mode which and has to be framed and stuffed in
> > software. MIR and FIR mode are however handled in hardware, and those chips
> > has very frame oriented interfaces. So we don't really need any
>
> >From what I seen (pc87108, tir2000), even at MIR/FIR speeds hardware
> looks like serial with length-of-packet added. I actually implemented
> tir2000 FIR driver as tty - it adds frame begining/end when it
> absolutely musts. Being tty has certain advantages in my eyes: most
> interesting is "i'm able to test it with simple commands like cat and
> echo". Also, being tty I could try to run something else than irda
> over that line (for example scarab).

Being network device also has certain advantages since you can get direct
access to the driver through the packet interface. Implementing the
irdadump program (works like tcpdump) was very easy since I got almost
everything for free.

I guess that the issue of being char or net device is really about being
point-to-point or more like a multiple access MAC layer. IrDA is both and
can function in connected reliable, unconnected reliable, connected
unreliable, and unconnected unreliable mode. IrDA v2 known as AIR will also
support multipoint which is not that easy to put over the TTY abstraction.

Some people complain about the many and complicated layers of IrDA, so I
really don't understand why the same people wants to have the TTY subsystem
underneath ;-)

> > HDLC TTY handling. In my view IrDA device drivers are network device
> > drivers, irtty is actually a line discipline in bottom and a network device
>
> Is it possible to write tty-over-netdevice driver? I would quite like
> to be able to transfer data over point-to-point ethernet using zmodem
> protocol ;-).

I have to run IrDA over 100 Mbps Ethernet until I get some VFIR equipment
(16Mbps), so I can test if the stack is working OK for such speeds as
well. Should be easy to write a small IrDA/Ethernet driver which wraps over
a the original Ethernet driver. Only need to set the frame type to IrDA, so
that the frames are delivered to the right handler. Haven't done it yet
tho'

-- Dag

-- 
   / Dag Brattli                   | The Linux-IrDA Project               /
  // University of Tromsoe, Norway | Infrared communication for Linux    //
 /// http://www.cs.uit.no/~dagb    | http://www.cs.uit.no/linux-irda/   ///

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/