question

CHLee-1165 avatar image
0 Votes"
CHLee-1165 asked rahul-ramadas answered

HidD_GetProductString with classic Bluetooth device

I'm now developing a Bluetooth hid device.
However, when I use pyhidapi to get the product string, it returns None.
After dig in the source code, I found they use HidD_GetProductString to get the product string.
And after asking my first question in the forum, I know that this function currently not support the BLE HID device.
So I changed to use Bluetooth Classic HID but still, no product string can be retrieved.
May I know where do this function gets the product string if the HID device is a Bluetooth Classic HID device?

windows-apiwindows-hardwarewindows-hardware-code-general
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

rahul-ramadas avatar image
1 Vote"
rahul-ramadas answered

Referencing the Bluetooth HID 1.1.1 spec from here: https://www.bluetooth.com/specifications/specs/human-interface-device-profile-1-1-1/

The product string returned will be the value of the SDP attribute called "Service Name" in table 5.3 (section 5.3.3) of the spec. HidD_GetManufacturerString will return the value of the SDP attribute called "Provider Name". However, note that the spec says that those attributes are optional, so it is possible that your device does not have those attributes.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.