Change RAW HID Vendor and Product ID

blackler

New member
Hello,

years ago I used to change the vendor and product id of my teensy LC in raw hid mode for a project by editing the "usb_private.h" file located in "Arduino.app/Contents/Resources/Java/hardware/teensy/cores/usb_rawhid". That was Arduino version 1.0.5 last time I worked on it, which isn't working on my actual OS (macOS Monterey) anymore.

Now, in Arduino 2.3.3 (with the Teensy Board Manager installed) I can't find these files anymore inside the Arduino app.

Any idea how to set the vendor/product id in rawhid mode in Arduino 2.x Versions?

Many thanks for any help,
Andi
 
Last edited:
I have see the same file in the usb_rawhid in Windows. Are you also use the rawhid to communicate LC with MacOS?
 
Two parts here I think:

Vendor/Product ID: I don't know about the file usb_private.h... That was a long time ago.
But with current releases, I believe that is defined in usb_desc.h
With board manager, the board installs are in the "Arduino15" directory, which I believe on a MAC
is in the <User directory>/Library/Arduino15/packages/teensy/hardware/avr/<build number>/cores/teensy3

In that header file it has a section like:
Code:
#elif defined(USB_RAWHID)
  #define VENDOR_ID        0x16C0
  #define PRODUCT_ID        0x0486
  #define RAWHID_USAGE_PAGE    0xFFAB  // recommended: 0xFF00 to 0xFFFF
  #define RAWHID_USAGE        0x0200  // recommended: 0x0100 to 0xFFFF
  #define MANUFACTURER_NAME    {'T','e','e','n','s','y','d','u','i','n','o'}
  #define MANUFACTURER_NAME_LEN    11
  #define PRODUCT_NAME        {'T','e','e','n','s','y','d','u','i','n','o',' ','R','a','w','H','I','D'}
  #define PRODUCT_NAME_LEN    18
  #define EP0_SIZE        64
  #define NUM_ENDPOINTS         4
  #define NUM_USB_BUFFERS    12
  #define NUM_INTERFACE        2
  #define RAWHID_INTERFACE      0    // RawHID
  #define RAWHID_TX_ENDPOINT    3
  #define RAWHID_TX_SIZE        64
...
Where you can set the vendor/product id...

As for can the Rawhid example run on the MAC...
I know there is/was issues with that as @zerowind has mentioned in the thread:
 
Thanks @KurtE! That worked - with the teensy 3.2 I also had lying around.

Are you also use the rawhid to communicate LC with MacOS?
I managed to at least send data to the mac back then. But I might have used a teensy 3, not an LC. It's quite some time ago, but I think it never worked for me to receive date from the mac. But I didn#T necessarily need that for my old project, so I was fine with sending data.
 
Back
Top