[RFC] PDA as a TCP graphic tablet?
Glynn Clements
glynn at gclements.plus.com
Thu Dec 29 04:46:37 PST 2005
Guennadi Liakhovetski wrote:
> > > If there is already a driver I could reasonable (ab)use, ideally it should
> > > only use read/write on the fd. If it uses ioctl's, well, that would mean I
> > > would have to write a kernel driver too. Not too dramatic, but not exactly
> > > the ideal solution.
> >
> > Have the server-side client use a pty, which X should be able to use
> > in the same way as a physical serial port.
>
> Aha, thanks, wouldn't think of a pty myself. Wouldn't an xserver
> accept a named pipe/socket?
Named pipes are unidirectional, so they won't work if the driver
assumes a bidirectional data flow (even if it's only sending an
initialisation sequence then receive-only thereafter).
Sockets can't be opened with open(); you have to use connect(). A
driver written for a serial device will use open().
Neither of those will work if the driver uses tty ioctls (e.g. setting
the baud rate or enabling "raw" mode) and aborts on failure.
If you were modifying an existing driver, the above issues could
probably be eliminated with a minimal amount of effort. But that
doesn't help if you want to use an unmodified driver.
The advantage of a pty is that it's behaviour is almost
indistinguishable from a physical serial interface, so anything which
works with serial interface will probably work just as well with a
pty.
> Anyway, the main question remains - which X-driver to attach the
> "graphic tablet"?
If it was me, from amongst the drivers which can use a serial
interface, I'd just use whichever one had the easiest protocol to
implement (i.e. either the simplest or the best documented protocol).
I don't have much experience with graphics tablets, so I can't say
which driver that would be.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the xorg
mailing list