Simple manner to read 1-pin high/low from USB under FBSD?

Hiroharu Tamaru tamaru at
Sun Oct 11 18:25:55 UTC 2009


At Sun, 11 Oct 2009 18:56:16 +0200 (CEST), Sven Hazejager wrote:
> On Sun, 11 Oct 2009, Hans Petter Selasky wrote:
> >> Thanks for your reply, would I need some GPIO device like this:
> >>
> >
> > I don't know. You need to ask the manufacturer. Ask them if  the control
> > endpoint is used to turn on/off the pin(s) you want.
> Well, I only need to read high/low, not to set anything... I've mailed the 
> manufacturer for info, thanks for suggesting.

I once considered replacing ppi(4) functionalities with usb-
to-parallel converters as well.  They seem to follow the USB
Printer Class specification.

According to the protocol description, they seem to be
rather intelligent in processing the handshake and do not
allow the host to program each bits like ppi(4) interface
does.  However, they do seem to support couple of input pins
like "paper empty", "select" and "error" (pin 12, 13, and
15, IIRC).  So, for your use, probably they may be good

I myself didn't actually try them, 'cause I needed more bits
in and out anyway.  YMMV, but just FYI.

I'd be interested in success stories with USB GPIO devices
as well, so if you'd try it, please send in your experiences
too. I haven't looked at the device you mentioned, but if
they release a spec sheet like the one I mentioned above,
you should be able to used them fine.

Hiroharu Tamaru

More information about the freebsd-usb mailing list