USB ppbus?

Ian Lepore ian at freebsd.org
Tue Dec 20 18:41:47 UTC 2016


On Tue, 2016-12-20 at 13:15 -0500, George Mitchell wrote:
> On 12/20/16 12:57, Hans Petter Selasky wrote:
> > 
> > On 12/19/16 20:19, George Mitchell wrote:
> > > 
> > > I have a USB cable that terminates in a DB25 connector.  Inside
> > > is a
> > > Prolific Technology PL2305:
> > > http://prolificusa.com/files/ds_pl2305I_v1.0.pdf
> > > It probes as a ulpt.  I would love if there existed such a thing
> > > as
> > > a uppi device.  Does it sound possible to get to such a result by
> > > extending the ppbus code to know about USB?  Or might it be
> > > simpler
> > > to try to add the ppi ioctls (PPIGDATA, etc.) to ulpt.c?   --
> > > George
> > Hi George,
> > 
> > There is currently no such thing. ulpt only provides a raw
> > character
> > device. The ppbus could possibly be implemented in userspace using
> > libcuse.
> > 
> > --HPS
> > 
> > [...]
> Thanks for the response.  I think I could kludge the ioctls I want
> into
> ulpt.c by learning more about the USB system works.  Possibly.  On a
> good day.                                                    --
> George
> 

IMO, ppbus solves a 1990s problem that we don't much have anymore:
multiplexing multiple concurrent (or time-slice-shared) users of a
single parallel port that may have multiple non-printer devices daisy-
chained on it.

If the only thing you're looking for is the ability to treat some of
the DB25 pins as gpio pins, just adding the ioctls to ulpt.c might be
the way to go.

Another possiblity, if all you're after is gpio on the end of a usb
wire, is to use an FTDI usb-serial adapter and then use either the
existing ioctl() interface in the uftdi driver (see uftdi(4) manpage),
or libusb and libftdi (I'm not sure the latter has ever been ported to
freebsd).

-- Ian



More information about the freebsd-hackers mailing list