Consuming a USB HID device in Windows CE 6.0 using C#
I am working on an embedded Windows CE project and am interested in accessing a USB HID device through one of its USB Host ports. All I really need to read are the raw HID specification packets.
On a Windows computer, I have a working program using hid.dll, but as far as I have researched, there isn't any equivalent on Windows CE. I know there is the usbhid.dll file, but I'm not sure if it is applicable for th开发者_如何学Pythonis situation. I would prefer not to write a kernel level driver, as I would like to do my coding in C#. How can I make consuming an HID device on Windows CE work?
I have no concrete experience with HID, but accessing the USB port as a COM port with a proper driver DLL (the device manufacturer might have one) might help. Theoretically you should be able to receive the device's raw data packets with a SerialPort
class that way.
Toradex released their USB sensors and peripherals as open source.
The sensors are HID devices and the freely available source code does include samples for C# and Visual Basic on Windows CE.
Oak Sensors and Interfaces
精彩评论