Re: Reading from USB devices
- From: Chuck Robey <chuckr@xxxxxxxxxxx>
- Date: Mon, 21 Jul 2008 11:05:33 -0400
-----BEGIN PGP SIGNED MESSAGE-----
Lowell Gilbert wrote:
Andrew Falanga <af300wsm@xxxxxxxxx> writes:
I'd like to read data from a USB device that is not a thumb drive.
How would I do this? For instance, it's an oximeter for reading
biometrics. What libraries exist for reading things like VID/PID, and
most importantly, reading the data from the device?
Start with usb(4). HID devices tend to be easier to deal with than
others, but I doubt your instruments are in that category.
Actually, if it was a thumb drive, yes it would surely not be a hid device, but
an oximeter? Seems like it stands a very good chance, and it's easy enough to
check, just see if it can run the uhid driver. If it comes up as the uhid (just
kill off the ugen for a run) then it's a uhid.
I disagree that its all that easy even then, because you need to know how to
read the report descriptor. Kai Wang's krepdump util will give you the report
descriptor in binary, and if you needed help in parsing it, I wrote a helpful
demonstration hid parser, in python (with a nice GUI), if you have python with
tkinter working, then give me a email, I'll email the stuff to you, it's only a
If you read that descriptor, it gives you enough info to be able to parse the
stuff coming from the oximeter, so just loop a C program using read(), to pick
up the bytes. All the info needed to do that's in the report descriptor.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
freebsd-questions@xxxxxxxxxxx mailing list
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"
- Prev by Date: Re: What price at the license of FreeBSD 7?
- Next by Date: Re: Monitoring CPU temperature: mbmon shows 201 degrees C
- Previous by thread: Re: Reading from USB devices
- Next by thread: Need help to compile netlogin client