Trying to modify vid and hid device numbers on ItsyBitsy_5V

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
sjstein
 
Posts: 2
Joined: Mon Feb 12, 2024 10:00 am

Trying to modify vid and hid device numbers on ItsyBitsy_5V

Post by sjstein »

Hello all,

I'm sure this is something simple, but I've been struggling with this for 24hrs or so now.

My current development setup:
  • New ItstyBitsy32u4_5V board I just purchased a week or so ago.
  • Newly updated Arduino IDE 2.3.0 running on Windows11
  • Stock leonardo (used to verify proof-of-concept)
  • Sketch that runs fine on a stock Leornado
This project emulates a specific USB device. For the Leonardo sketch, I modified the boards.txt file located at:

Code: Select all

C:\Users\<uname>\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
changing the two lines specific to the leonardo:

Code: Select all

leonardo.build.vid=0x05f3
leonardo.build.pid=0x0d2
I then built the sketch, and after uploading, the Leonard shows up in the Windows Device manager with the new HID and PID values.

Now I want to utilize the smaller form-factor of the Itsy to do basically the same thing.

After receiving my Itsy, I downloaded the board info as outlined in the Adafruit guides - and was easily able to select the Adafruit ItsyBitsy 32u4 5V 16MHz in the board selection in the IDE. I also verified I can upload and execute the blinky example.

My confusion now comes from which boards.txt I should be modifying to change the vid and pid entries. If I currently build my sketch, the Itsy shows up as an HID with the following registration:
USB\VID_239A&PID_800E

I see that there is a boards.txt located at:

Code: Select all

C:\Users\<uname>\AppData\Local\Arduino15\packages\adafruit\hardware\avr\1.4.15
Which has entries for a bunch of Adafruit boards, including the Itsy I'm using named:

Code: Select all

# Adafruit 32u4 ItsyBitsy 5V @ 16MHz
itsybitsy32u4_5V.name=Adafruit ItsyBitsy 32u4 5V 16MHz
There are two lines there which appear to be the ones I am interested in - as they map the VID and PID I see in the Windows device manager:

Code: Select all

itsybitsy32u4_5V.build.vid=0x239A
itsybitsy32u4_5V.build.pid=0x800E
However when I change those values, save boards.txt, and recompile/download my sketch, those changes are not reflect in the device itself. I still see hid=0x239A and pid=0x800E in the windows device manager.

Is there another location defining these values?
Have I overlooked something (definitely a possibility)?
Should I not be using version 2.3 of the IDE and instead revert back to 1.8.x?

Any ideas are much appreciated!

User avatar
sjstein
 
Posts: 2
Joined: Mon Feb 12, 2024 10:00 am

Re: Trying to modify vid and hid device numbers on ItsyBitsy_5V

Post by sjstein »

I believe I have answered my own question here - but not sure why this works.

In the AdaFruit boards.txt file there are also these entries:

Code: Select all

itsybitsy32u4_5V.vid.0=0x239A
itsybitsy32u4_5V.pid.0=0x000E
If I set those also to the values to emulate the USB device I am working with, the sketch now works.

Two questions though:
  1. What is the purpose of this second set of parameters (with the .0 appended to the variable name)?
  2. Why is the second parameter (pid.0=0x000E) not the same value as the first (pid=0x800E)?

Locked
Please be positive and constructive with your questions and comments.

Return to “Itsy Bitsy Boards”