Direct USB Access
-
Tuesday, August 25, 2009 7:14 AMHello,
I would like to ask you if it possible to directly communicate with a USB device without installing a driver (only thouse shipped with Windows XP, Vista or Windows 7).
I have a device connected to USB using class 0x02 (Communication and CDC Control).
(Usually, this kind of devices install a driver which exposes the device as a modem and creates a virtual COM port which can be used to communicate with the device, but I don't have any driver).
I successfully enumerate USB connected devices, detect 'my device', and now, I would like to open a communication channel with the device and send a command - the same thing a driver is doing.
Is that posible from user code?
Thank you.
All Replies
-
Tuesday, August 25, 2009 2:47 PMHi
WinUSB (http://www.microsoft.com/whdc/connect/usb/winusb_howto.mspx) or libusb-Win32 (http://libusb-win32.sourceforge.net/ ) are the two options i'm aware of.
MVP Windows Embedded -
Wednesday, August 26, 2009 6:32 AMHi,
Thanks for your response.
For both solution it is necessary to install a driver (winusb or libusb).
So, as far as I understood, it is necessary to install a driver in order to communicate with a device connected on USB interface.
You can not do it directly from user mode.
Thank you again. -
Wednesday, August 26, 2009 10:52 AMConcering the need for a driver: Yes, that's right. For both solution your're installing a 'generic' driver for the device. These drivers no nothing more than exposing the raw USB communication channels (eg Pipes) directly to an application.
The actual communication with the device can be implemented in a user mode application (see here or here).
MVP Windows Embedded


