Skip to content

How to set HID properties manufacturer_string and product_string #139

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ThomasAtBBTF opened this issue Oct 17, 2021 · 1 comment
Open

Comments

@ThomasAtBBTF
Copy link

How can one set the HID 'manufacturer_string' and 'product_string' for the (BLE) HID device which is created using the HIDService()?

Setting the Bluetooth Name which shows up in the host while pairing is easy and documented.

But how to set the HID device properties I have no idea where to look.

Printing these properties on the host is easy like so:

import hid
    infos = hid.enumerate(0, 0)
    for info in infos:
        print(info['manufacturer_string'], info['product_string'], info['path'])

hid library from: https://pypi.org/project/hid/

@dhalbert dhalbert transferred this issue from adafruit/Adafruit_CircuitPython_HID Oct 20, 2021
@dhalbert
Copy link
Collaborator

Transferring to https://github.com/adafruit/Adafruit_CircuitPython_BLE, because this is a BLE question. The mechanism is different for BLE HID.

These kinds of strings are provided by the Device Information Service, which is available in this library.: https://github.com/adafruit/Adafruit_CircuitPython_BLE/blob/main/adafruit_ble/services/standard/device_info.py There is clearly a manufacturer string. It's not clear to me what corresponds to the "product string", but it might be the "model number" string. There is no UUID named "product name" or simlar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants