Hello driver developers out there,
I’m writing a driver for a HID device which can be connected via USB or Bluetooth (BTH).
I know that each device has a unique serial number (in addition the serial number is different for USB and BTH connection). I can read this serial numbers with an user app very easy via HidD_GetSerialNumberString().
I like to know this serial number in my driver for licensing reasons. My driver will be licensed to the device serial numbers so the driver needs to verify if a “licensed” device is connected.
I have a working lower HID filter driver.
How do I read the device serial number?. There is IOCTL_HID_GET_SERIALNUMBER_STRING but as far as I understand I can’t talk to “my” HID-Class driver as my lower filter driver can pass the IoControlCode only down the stack, not upwards.
I search a lot but couldn’t find any hint which pointed me to a workable direction.
-
Is there a way to talk to “my” HID-Class driver instance from my lower filter driver to obtain the serial number the same way as the user app?
-
If I can’t talk to my HID-Class driver, I know how to get the USB Serial number from the URB descriptor. But how on earth how do I get the serial number when connected via BTH?
Note: I am intercepting the device control via EvtIoDeviceControl and EvtIoInternalDeviceControl, so I can listen to all communication, but not sure if this helps.
Any hints would be highly appreciated.
Thanks