mon / Arduino-USB-Rename

Programatically rename a USB based Arduino
MIT License
23 stars 4 forks source link

vid pid #4

Open amritgenius opened 1 month ago

amritgenius commented 1 month ago

connecting two or more avr boards with different naming is not possibile ( they all appear as the same name ) because they have same usb_pid.

mon commented 1 month ago

Which OS is this on? I vaguely recall windows being pretty good at differentiating devices based on PID/VID/Version, but I can't remember if they took strings into account. At any rate, they're often "sticky" and sometimes require a device uninstall to get the name to be re-recognised after programming.

amritgenius commented 1 month ago

am using win11, but i can confirm that also the win10 is doing the same. now am using same vid but diff pid to differentiate midi device naming of two arduino pro micro. can you please add a pid variable to library? i have tried with no luck,

mon commented 1 month ago

Changing the vid/pid is way too much effort for me, since it works in the tools that I developed this for: image

The main reason is that to change the PID using pluggableUSB you'd need to override the entire device descriptor request, which is a bit of effort. It's also noncompliant with the USB spec (since PIDs are assigned by the USB IF). The best way I found is to change the device version, but that is also part of the device descriptor.

If you'd like some pointers - I'd check out how the Arduino USB stack currently handles USB_DEVICE_DESCRIPTOR_TYPE / USB_CONFIGURATION_DESCRIPTOR_TYPE, and see if you can modify USBRename::getDescriptor to override that as well.