Consuming a USB HID device in Windows CE 6.0 using c#
-
25-09-2019 - |
Question
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 spec packets. On a windows computer, I have a working program using hid.dll, but as far as I have researched, there is no equivalent on CE. I know there is the usbhid.dll, but I'm not sure if it is applicable for this situation. I would prefer not to write a kernel level driver, as I would like to do my coding in c#. Has anyone had experience consuming an HID device on Windows CE?
Solution
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.
OTHER TIPS
Toradex released their USB Sensors and Peripherals into Open Source. The Sensors are HID devices and the free available source code does include samples for C# and VB on Win CE.