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

Hans Petter Selasky hselasky at c2i.net
Sun Oct 11 10:16:59 UTC 2009


On Sunday 11 October 2009 11:23:53 Sven Hazejager wrote:
> Hi all,
>
> I'm using a simple circuit to read led pulses from my electricity meter
> and am now using simple C code to poll the parallel port to detect a
> high/low change on pin 12. (see http://offog.org/code/electricity.html)
>
> My new server probably won't have a parallel port anymore. So the question
> is: is there a simple manner to read 1-pin high/low from USB under FBSD?
> Any examples anywhere?

usbconfig in FreeBSD-8/9 supports control requests from the command line.

usbconfig -u XXX -a YYY do_request <see help menu>

--HPS



More information about the freebsd-usb mailing list