-
Notifications
You must be signed in to change notification settings - Fork 420
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
is it possible to Rename the HID Controller #14
Comments
I have not been able to figure out how to do this yet, but it seems like it should be possible. I am leaving this issue open as a future enhancement. If anyone knows how to do this, let me know. |
At one time I tought that recompiling boot loader would be enough: But apparently not: However I never tried to do it myself. |
Have you tried to change the string in HID.h or HID.cpp ? I think i saw something like this somewhere in the Arduino IDE base libraries.. |
I found some steps for changing the name, courtesy of this YouTube video: https://www.youtube.com/watch?v=nrT7WXFEEZI
However, this changes the name for ALL "Arduino Leonardo" devices. I'm not sure how to change the name for just one specifically. The joystick devices seem to identify to windows based on VID and PID. If there were some way to safely change these, it might be possible to name them individually. However, based on some of my previous experiments, extreme care must be taken here. If you change the VID or PID of the hardware Leonardo, you run the risk of the Arduino IDE not recognizing it for sketch uploads anymore. There might be a way to modify it for just the joystick device, but I don't know enough about HID to say. Hopefully @MHeironimus or someone else with more talent than me can use this as a starting point. |
Unfortunately I couldn’t figure out how it can be influenced from within the sketch. This will modify the name for all devices programmed. So if you want to have Name A, B and C for your devices you need to change the “boards.txt” to “A”, program the A device, then change the boards.txt to “B” then program the B device etc. The boards.txt can be found in the Arduino installation folder, for instance: In case you’re device is reported as "Arduino Micro", then you need to change the “Arduino Micro” entry , in case its an Arduino Leonardo then change the appropriate usb_product entry. For instance to change a Arduino Leonardo rename the entry: |
@bjoernboeckle Thank you for posting your findings. |
Hi, Thanks for the Tip with the Product Name change. It was working perfectly for me also. However, the 3 Joysticks itself are still named Arduino Leonardo. Please refer to attached Pictures. Therefore i'm still struggeling within my Flight Simulator to find correct Joystick, as i have connected 3 Leonardo Boards with 3 Joysticks each. Within Game, they are all named "Arduino Leonardo" :-) |
You are legally not allowed to change the name and use Arduino LLCs USB Vendor Id,. So you have to buy a Vendor Id yourself, which costs $5.000: http://www.usb.org/developers/vendor/ Here's an article about Vendor Ids for open source projects: https://www.oshwa.org/2013/11/19/new-faq-on-usb-vendor-id-and-product-id/ Anyway, i just found a hack to solve this issue WITHOUT having to recompile the boot loader (which is what most people say you need to do) In the boards.txt change the usb_product and the vendor / product id.
If your device, is the first device connected to this computer with that vid / pid combination, it will be displayed with your usb_product name. (vid, pid, and product name are cached in the registry, so if the product that uses this vid / pid legally will later be connected to the same computer, it will also show your name.) It only shows "Arduino Leonardo" in the Game Controller Window, because you had an Arduino Leonardo connected to your computer before. On fresh installs, it would work without the vid/pid change, but it will show every Leonardo with your name then. |
@Dakor91 - Thank you for posting your findings. |
@Dakor91 Thank you very much for that info! It solved my problem. |
@Dakor91 Thanks for that! While the solution I posted earlier worked for renaming a single class of device, your solution is so much better because it allows my devices to identify differently to a single PC. |
When I do as @Dakor91 suggested it shows up with the new name in the devices page in the new windows 10 settings but no longer gets recognized as a game controller for some reason... Any ideas? Edit: it seems switching back to the default constructor instead of a custom wheel based one works. Gonna play around and see if I can narrow the issue down a bit. Edit 2: The arguments passed to the constructor don't really actually seem to line up correctly with what you've listed in the readme. The X, Y, Z, options seemed to remove RX, RY, RZ instead. What you have as throttle appears as the Y axis on the steering joystick and is marked as the accelerator and enabling the accelerator actually shows a throttle slider. Disabling steering with just throttle and brake enabled for some reason shows the steering/accelerator joystick and rudder. Definitely something off with either your documentation or the implementation @MHeironimus. |
If I change the VID and PID it does not show up in Game Controllers in windows. It Shows up as a HID-compliant device and USB Input Device in device manager and under other devices it shows up as a serial device with no drivers. If I force the arduino drivers on the serial device it will work as a serial device but it still doesn't show up in Game Controllers. Any ideas how to fix this? I can have 2 different names if I change the PID to leonardos PID on one and the micro on another, but if i want more unique names changing the PID to a random value would be nice. |
There is a bug somehow. I uploaded an example to a new adruino with new random VID and PID and it works. So if i change the VID and upload my code first, my code does not work. But when I load it with an example and plug it in then i can reload it with my code and it works. Some how having this joystick initializer does not work ( the example for driving controller): |
Hello, |
I've been searching for quite a long time and not found any way to change individual controllers under the same device :( you can change the name of the HID with borads.txt but individual controllers will all have same name you used. |
it does not work at all |
There is a demonstration on how to do this towards the end of this video: Arduino Joystick 2.0 Library - Beginners Guide. |
Thanks for the info, I was looking for it :-) |
Thanks for the tip, |
Hi, ive been having this very same naming issue for....months, i have 5 button boxes for my sim rig which i bought from an ebay seller , they all use Arduino Leonardo boards....or so i thought, after opening up one of the boxes i found that they are Pro Micro boards and not official Arduino. After many attempts at trying different things... like using the Musinou board txt file i found out that as well as using the board txt files you also need to upload a a sketch at the same time, in my case i used a 32-FUNCTION-BUTTON-BOX-master sketch from AMSTUDIO. Although i had several hurdles to get over... getting the correct keyboard library, finding the correct location of the board txt file for editing....Windows11 seems to block access to the Arduino IDE app location....nice one MS and much more fiddling. So now everything is in place, i change the leonardo.build.usb_product= name to my chosen name and the sketch i acquired ....upload and voila, shows up in device and printers under controllers but after clicking properties it still showed as Arduino leonardo, i tested the board running Asseto corsa and BAM....Leonardo device detected. Now for the fix, the vid and PID codes have to be changed from the original but also they must not clash with any other usb devices, unless you have a complete list of your device id Licensing issues, all my boards are Arduino compatibles made by SparkFun, they state on there website that the user is free to change the name of there boards and does not require a license to do so. I have tested this method with Asseto corsa and American truck sim and both games detect my board as the name given. This process can be hit and miss, i suggest testing on a board thats new and unwired to a device, In my endeavor... I broke one button box by accidentally breaking off the usb socket from the Pro Micro and killed another by trying to jump the onboard reset/gnd after a bad upload. |
you can add several defines to a new submenu https://gist.github.com/Hyratel/80017369fedd1bbc9eef4c8e7a896225 |
Hi, I actually managed to sort it out shortly after posting here, my main issue was trying to update using IDE without adding a sketch, the guy i bought the boxes off sent me new sketch's for all 5 boxes as they all have different matrix`s, now all i need is about an extra 5 hours a day to have time to actually use my sims.... either that or win the lottery lol |
@MHeironimus https://github.com/abratchik/HIDPowerDevice this might be something we can work with :) i think it would be realy awesome to support custom hid names |
@MHeironimus https://github.com/Hyratel/LeonardoPIDboards have a looky here. I went through and spun this up. you have to use different PIDs because windows Caches the name in the registry. (the 0x5000 range on PID.codes is fairly empty so I feel fairly safe using it. it's not... great because it collides with 1 or 2 already listed, but at the time I just did not have the patience to look for 50 consecutive unused values) |
I think this only works on the pc where it’s uploaded not if you plug in something else right |
@vospascal no, it loads the names into the USB stack on the arduino, so it will announce itself with the name you set. it will work on any machine that way. the Cacheing is when windows recieves a USB announce, it loads that into the registry and any changes in device name will not be reflected because it's pulling the names from cache not device |
yea i know the methode but its not realy same as setting names vendor in the hid report |
Hello, (Screen : https://media.discordapp.net/attachments/349553308949544964/1043537031843815454/image.png ) |
There is nothing about legality of using your own unregistered vendor ids. It could annoy the USB committee but there is no crime they can charge you with for using an unregistered vendor ID. Though keep in mind you can falsely trigger different drivers on your computer if you have a conflict but there is no legal or civil actions against you if you choose to change these values. They could get you for trademark/copyright if you use their logos and trademarks without paying a license... but if you take an off the self USB host device and change the ID values for your own convenience they can't do anything about it. |
BTW, many suggest you use the vendor id 0xf055 mainly because it looks like FOSS but partially because it annoys the USB-IF and a few other vendor groups. |
Hi, I struggled with this issue myself, so I decided to create step-by-step guide. It works for me on Win 10. This guide is based on below video. https://www.youtube.com/watch?v=YAbi_AqF7aQ&list=PLqIYovI4NEIfRrr-byoedK3_iY2MHQ8XD&index=1&t=702s He starts talking about HID Controller names issue at 7:10 and more about how to do it starts at 9:00. which is similar to this one (starts at 19:43) https://www.youtube.com/watch?v=hoCOq9Ngp44
for Arduino Leonardo (or clones): leonardomusinou.name=Arduino Leonardo musinou leonardomusinou.build.vid=0x2342 or for Arduino Micro (or clones such as Pro Micro) micromusinou.name=Arduino Micro musinou micromusinou.build.vid=0x2340
Note 1: You can create folder "hardware" in "Documents>Arduino>" folder as well, instead of "C:\Users\ 'your user name' \AppData\Local\Arduino15\packages" like in video from link above. It works either way... Note 2: Inside "Boards.txt" file you can create multiple boards to use in Arduino IDE. Just copy and paste all lines for the board you need (Leonardo or Micro) and remember to give them unique "name=", "vid=", "pid=" and "usb_product=". In Arduino IDE select board 1 and upload sketch, select board 2 and upload sketch, etc. You may also need to change "hidReportId" in constructor to unique number for each board (e.g. board 1 as 0x03, board 2 as 0x04, etc.) Note 3: You can change "leonardomusinou" or "micromusinou" to any name you like. Just make sure name is same for all lines of MCU you use. Note 4: If for some reason your custom game controller doesn't show up, go to your sketch in Arduino IDE and in constructor change JOYSTICK_TYPE_MULTI_AXIS to JOYSTICK_TYPE_JOYSTICK. This trick worked for me. Hope that will help and save some time when building custom game controllers. FAO creator of Joystick library. Please feel free to change and add this guide to your library, so new library users won't need to search online for this. Amy |
or you could sidestep ALL OF THAT and try https://github.com/Hyratel/LeonardoPIDboards it adds a new Board Option under my-boards_avr and has a large list of presets that is easily extended |
Great if you need copy-paste solution without need to learn anything and if you use Leonardo board only, which I don't. Using my guide above you can have custom Leonardo or (Pro) Micro boards with any name you like. Also, if there is clash with other HID on your system, you know what to change to fix it. Amy |
Hi,
i´d like to connect 4 Arduino-gamepads to my PC and my Raspberrry.
is it possible to change the HID name?
so that i don´t have:
arduino leonardo
arduino leonardo
arduino leonardo
arduino leonardo
but my own names?
The text was updated successfully, but these errors were encountered: