HI,
Can we connect and use USB Micro Controller HID device with PIC32 to a host?
USB Micro Controller HID device works fine in windows7 but not in wince.
Kindly let us know if we have to change some settings
HI,
Can we connect and use USB Micro Controller HID device with PIC32 to a host?
USB Micro Controller HID device works fine in windows7 but not in wince.
Kindly let us know if we have to change some settings
Dear @Sarika
Your first attempt was writing a regular stream driver (not a USB driver). This will not work to communicate with your device, even though you can communicate between your application and the driver.
You should not use Prefix=HID
, this is reserved for the General HID driver, use for example Prefix=PIC
instead.
Now for your questions:
HIDDeviceAttach()
which is called when you connect a USB device.[HKLM\Drivers\HID\ClientDrivers\Keyboard]
and [HKLM\Drivers\HID\LoadClients]
D:\WINCE600\PUBLIC\COMMON\OAK\DRIVERS\USB\CLASS\HID\CLIENTS\KBDHID\
Regards, Andy
Hi andy,
First of all thanks for the feedback given… I built the class driver with the source file u had sent and i am able to get my .dll file.
Now the problem is, when i try to connect USB mouse, USB keyboard and my pic32 controller HID together and power up the colibri vybrid board none of them works.
But USB mouse and USB keyboard works without any issues when i remove pic32 controller HID.
Do we need to change any configuration?
My Driver registration is in
[HKLM\Drivers\HID\LoadClients\Default\Default\VID_PID\MyDriver]
Kindly suggest.
Dear @Sarika
Do you have a display connected to see whether there is a dialog popping up?
WinCe loads USB devices one after the other. If it doesn’t find a driver for one device, a dialog pops up to ask for the driver location.
Until this dialog is answered (which is difficult without mouse/kbd), no other USB devices are loaded.
Your driver is probably not loaded, because your registry path is wrong. It must contain the actual Vendor ID (VID) and Product ID (PID) of your device, and the path has a different format:
[HKEY_LOCAL_MACHINE\Drivers\HID\LoadClients\<VID>_<PID>\Default\Default\MyDriver]
Have a look at the USB HID touch driver to see an example:
Regards, Andy
hello andy,
There is no dialogue pop up when the device(PIC HID COntroller) is connected.
And also
\3. our PIC HID microcontroller is just emulating the keyboard interrupts… but why is it not able to communicate with already existing keyboard hid driver?
My attempt started with the following steps:
I created a new dll project in
C:\WINCE600\PLATFORM\COLIBRIVYBRIDBIN\SRC\DRIVERS\MyHidDrv
Included the dll in platform.bib and platform.reg
Registry settings is as follows.
[HKEY_LOCAL_MACHINE\Drivers\Builtin\MyHidDrv]
“Prefix”=“HID”
“Dll”=“MyHidDrv.dll”
“Index”=dword:1
I compiled and linked everything and got “MyHidDrv.dll” which will be loaded during boot up.
works fine wheni try to communicated with my application.
Now I reached a point where I need your help!
So my questions are:
How do we get to know when HID device is connected to one of the USB ports?
Is it the right thing which i ve done so far?
Later stage I learned, that I have to develop my own HID driver to access our HID device
and have to look at the sample-drivers in the platformbuilder-folder:
C:\WINCE600\PUBLIC\COMMON\OAK\DRIVERS\USB\CLASS\HID\CLIENTS
when i tried to do so, was not able to get the “MyHidDrv.dll”. Do i miss some settings to get “MyHidDrv.dll”?
Is it possible to write a custom HID driver without the Platform Builder,
e.g. only with Visual Studio 2005 VC++?
Is my custom HID driver an addon to the USBHID.dll or does it replace the
USBHID.dll?
Dear @Sarika
Can you eplain in more detail, what doesn’t work.
HID devices are supported in WinCe, but HID is a very generic specification, therefore you might need additional software to make full use of the PIC32 functions.
Regards, Andy
Dear @Sarika
Regards, Andy
HI andy,
We are able to see the keyboard interrupts when we connect the PIC to PC. But not when we connect it to toradex evaluation board.
Dear @Sarika
I cannot say whether …
To track this down, could you please install a tool like the USB Device Tree Viewer on your PC, and send me the USB descriptor information of your PIC USB device as text (simply copy the right text pane within the tool and paste it here in a comment).
Regards, Andy
pfa for link textUSB descriptor information
Dear @Sarika
The USB Descriptor shows a number of errors:
Status : 0x01806400 (DN_HAS_PROBLEM ...
Error reading descriptor : ERROR_GEN_FAILURE
String descriptors are not available (because the device has problem code CM_PROB_NOT_CONFIGURED)
So there seems to be an issue with the implementation on your PIC device. I know Windows Desktop is very forgiving, and might use the device anyway. But I assume this initial problem causes Windows CE to refuse the device.
Regards, Andy