PDA

View Full Version : Generic USB Device communication



Gavin Harper
24th August 2010, 13:22
Hello,

I have been fighting with reading generic USB data in a Qt project on Windows.

I have investigated libUSB, WinUSB, WDK and hooking but they all seem grossly overkill for what I wish to do.

I essentially want to read the raw byte stream from a generic, already installed USB device such as interrupts from a mouse or graphics tablet and display this data in my application. A low rent sniffer of sorts but just for one specific device. (The device is unimportant, the USB Data-> Qt app is since eventually this will be modified to accommodate a specific device with its own driver.)

Since I do not need to control the temporary device and my interactions with it at this stage in development are read only... what would the simplest way in Qt to obtain this data be?

Thank you very much!

squidge
24th August 2010, 23:09
You've already looked at them: libUSB, WinUSB, etc.

Qt hides all this from the user - you typically don't get any usb data from the mouse/etc, you just get the filtered and processed input events instead. You don't even know (or care) if the mouse is a usb, ps2 or serial device.