8000 usb_hid.set_interface_name() doesn't work · Issue #9847 · adafruit/circuitpython · GitHub
[go: up one dir, main page]

Skip to content
usb_hid.set_interface_name() doesn't work #9847
Open
@podpah

Description

@podpah

CircuitPython version

Adafruit CircuitPython 9.2.1 on 2024-11-20; Raspberry Pi Pico with rp2040

Code/REPL

# in boot.py file
import usb_hid
import supervisor
supervisor.set_usb_identification(manufacturer='HyperX', product='Pulsefire Haste 2', vid=0x0951, pid=0x16e4)

    usb_hid.disable()
    usb_hid.enable((usb_hid.Device.MOUSE,), boot_device=2)
    usb_hid.set_interface_name("HyperX Pulsefire Haste 2")

(some of the above is indented as it's in an if statement but it runs just fine, I've just omitted the rest of the boot.py for brevity)

Behavior

# Powershell
> Get-PnpDevice -InstanceId 'USB*' -Status OK
OK         HIDClass        USB Input Device                                                                 USB\VID_0951...
:: Cmd
> wmic path Win32_PnPEntity where "DeviceID like 'USB%'" get Name, DeviceID
USB\VID_0951&PID_16E4\425030503137330F         USB Input Device

Description

I am trying to change the interface name with usb_hid.set_interface_name in my boot.py but it does not take effect. I had a look at #9130 (comment) and added the supervisor.set_usb_identification which changed the PID/VID as shown in the PS/Cmd output but it did not affect the device name.

There are no other mounted devices with the PID/VID as I disable storage, cdc and midi. I've tried to set the interface name before enabling the device but that does not work either.
There are no errors shown on boot_out.txt and my code.py runs as intended

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0