How to get data from others hid inbox driver in my hid device driver? RRS feed

  • Question

  • Dear all,

    I have three hid device, 

      01.hid sensor device(Windows hid inbox driver).

      02.hid bluetooth device(Windows hid bluetooth inbox driver).

      03.hid device(The hid device driver wrote by myself).

    In my hid-device driver, I need to get datas from hid sensor device and hid bluetooth device, combine 
    these data with my driver data, and report to hid class driver. Here some questions to ask,

      01.I use WinObj to find symlinks as device names for hid sensor device and hid bluetooth device, can I             use this value as parameter for "WDF_IO_TARGET_OPEN_PARAMS_INIT_OPEN_BY_NAME" ?                       Is this value fixed or assigned by os dynamicly?

      02.Can I use remote io target to get data from hid sensor device and hid bluetooth device? If not, How             can I get these data?

      03.Can I use "WdfIoTargetSendInternalIoctlSynchronously" to send         "IOCTL_HID_GET_REPORT_DESCRIPTOR" request to hid sensor? If not, how can I do with this function?

    The architecture show as below:

    Thanks for your help,

    Friday, June 8, 2018 9:24 AM

All replies

  • 1) you can use a device interface instance name to open the remote io target by name.  you cannot hard code this name, you can call IoGetDeviceInterfaces with the HID device interface guid to get the list of HIDs.  for each open, you would open a remote io target, query to see what UP it is and close it if it is not the HID of interest.  You will then call IoRegisterPlugPlayNotification to be notified of new HIDs that show up after your query.

    2) a remote io target is the right way to read data from the HID. you can send read, write, ioctls.

    3) IOCTL_HID_GET_REPORT_DESCRIPTOR is private between the HID port driver and miniport, you can't send this IOCTL to another HID stack. you have to use to the documented IOCTLs that you can send from UM like IOCTL_HID_GET_COLLECTION_DESCRIPTOR, as documented here 

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Friday, June 8, 2018 5:43 PM
  • Hi Doron,

    I use IoGetDeviceInterfaces to get symboliclinklist, and I call "WDF_IO_TARGET_OPEN_PARAMS_INIT_OPEN_BY_NAME" with my hid-sensor device name : \??\HID#Vid_8087&Pid_0AC2#6&16a07bfd&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
    and followed by "WdfIoTargetOpen", the status return STATUS_INVALID_DEVICE_REQUEST,

    my code show as below

      OpenParams.FileAttributes = FILE_ATTRIBUTE_NORMAL;
      OpenParams.ShareAccess = FILE_SHARE_READ;
      Status = WdfIoTargetCreate(DeviceHandle, WDF_NO_OBJECT_ATTRIBUTES, &IoTarget);

    even i change  


    The status also return STATUS_INVALID_DEVICE_REQUEST, It seem like hid sensor inbox driver does not support this request, right? How do I get hid sensor data in my device driver, if hid sensor inbox driver not support wdfIoTargetOpen?

    best regards,


    Friday, June 15, 2018 5:39 AM