benjaminaigner / Joystick

Joystick Library for Arduino (RP2040 based boards)
18 stars 1 forks source link

How to change the HID name? #5

Closed OrhanYigitDurmaz closed 1 year ago

OrhanYigitDurmaz commented 1 year ago

While used, pico appears as "PicoArduino". Searched everywhere for this to be nowhere found. I guess its hardcoded, but where?

benjaminaigner commented 1 year ago

Dear @OrhanYigitDurmaz ,

sorry for the late reply (was on holidays). This string is set in the USB descriptor of your Arduino stack (can be differ if using either Earle's or Arduino's core).

It is hardcoded indeed, but not here. A short search in files (grep -nHIirF -- PicoArduino <arduino folder>) turns out you can change the name in the file RP2040USB.cpp.

OrhanYigitDurmaz commented 1 year ago

Dear @OrhanYigitDurmaz ,

sorry for the late reply (was on holidays). This string is set in the USB descriptor of your Arduino stack (can be differ if using either Earle's or Arduino's core).

It is hardcoded indeed, but not here. A short search in files (grep -nHIirF -- PicoArduino <arduino folder>) turns out you can change the name in the file RP2040USB.cpp.

Strange. When i look at the "RP2040USB.cpp file , icant find anything about "PicoArduino". Also GitHub search doesnt work.

benjaminaigner commented 1 year ago

You are right, since last time it has changed.

It is much easier now:

open the boards.txt file and change the usb_product string for your board, e.g.:

arduino_nano_connect.build.usb_product="A different name"

OrhanYigitDurmaz commented 1 year ago

Dear @benjaminaigner

Sadly, that also doesnt work. boards.txt only have "Pico" as the usb_product and changing it had no effect.

Update: Strange, Zadig (USB Driver installation tool) sees the new name. When i encountered this issue on the Pico SDK, changing vid/pid to Arduino MCUs "32u4" worked. Let me try that.

Update 2: Yeah that worked. I dont know what happens to cause this, but using the default PID/VID from the core doesnt seem to change the name. Probably something windows related.

Also can i ask to update the library to 12 bits? That would be very helpful.

Anyways, thanks for the help!