Hi,
I have a firmware that is recognized as a HID device. Below is the HID report descriptor being used:
0x05U, 0x81U, /* Usage Page (Vendor defined) /
0x09U, 0x82U, / Usage (Vendor defined) /
0xA1U, 0x01U, / Collection (Application) /
0x09U, 0x83U, / Usage (Vendor defined) */
0x09U, 0x84U, /* Usage (Vendor defined) /
0x15U, 0x80U, / Logical Minimum (-128) /
0x25U, 0x7FU, / Logical Maximum (127) /
0x75U, 0x08U, / Report Size (8) /
0x95U, 64, / Report Count (64) /
0x81U, 0x02U, / Input (Data, Variable, Absolute) */
0x09U, 0x84U, /* Usage (Vendor defined) /
0x15U, 0x80U, / Logical Minimum (-128) /
0x25U, 0x7FU, / Logical Maximum (127) /
0x75U, 0x08U, / Report Size (8) /
0x95U, 64, / Report Count (64) /
0x91U, 0x02U, / Output (Data, Variable, Absolute) /
0xC0U / End collection */
Now, I am trying to create a function driver to extend its functionality. Below are the steps I've followed so far:
- Created a default KMDF driver using Visual Studio.
- Set power policy ownership to
FALSE
using:
WdfDeviceInitSetPowerPolicyOwnership(DeviceInit, FALSE);
(Without this, the system bugchecks.)
3. Bypassed the device I/O control. When a request is received, I use WdfRequestSend
with SEND_AND_FORGET
.
With this setup, the device enumerates as a HID device in Device Manager. However, when I try to get the device's capabilities (GetCaps) from a user-mode application using the following code:
PHIDP_PREPARSED_DATA preparsedData;
if (HidD_GetPreparsedData(deviceHandle, &preparsedData))
{
HIDP_CAPS caps;
if (HidP_GetCaps(preparsedData, &caps) == HIDP_STATUS_SUCCESS)
{
// Processing caps
}
}
The application hangs, and I don’t see any logs from the driver when this call is made.
What could be causing this issue?
TIA,
Chandra