No output when changing VID/PID

Status
Not open for further replies.

bretscak

New member
Hello, I'm working on a project using the Teensy 3.2 with the rawhid library and am having trouble transferring data after changing the VID/PID.

As I understand it from reading around the forums, the VID and PID can be changed by editing the header file \Arduino\hardware\teensy\avr\cores\teensy3\usb_desc.h.

Following the instructions in the file, I changed the lines defining the VENDOR_ID and PRODUCT_ID under the USB_RAWHID definition. When I change these values and recompile, the rawhid library seems to break and no packets are sent. I am using the basic RAWHID.send() as shown in the built in examples.

The PID and the VID do successfully change, but I have confirmed no packets are being sent after the VID/PID change by using different usb monitoring programs. The packets are sent correctly when the VID and PID are the originals.

Any idea what could be causing this? Do the VID and the PID need to be defined/changed anywhere else for the rawhid library to function?

Thanks in advance for any help.

Code:
#include <LiquidCrystal.h>

 const int rs = 11, en = 10, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
 LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
byte data[64] = {0xE2,0x00,0x00,0x32,0x80,0x00,0x00,0x00,
                 0x00,0x10,0x02,0xA5,0x07,0x90,0x02,0x68,
                 0x00,0x00,0x00,0x08,0x00,0x08,0x00,0x00,
                 0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,
                 0x00,0x00,0x00,0x80,0x06,0x01,0x90,0x00,
                 0x13,0x63,0xB3,0x24,0x00,0x00,0x00,0x10,
                 0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
                 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};

const int ledPin = 13;
int n = 0;
unsigned int packetCount = 0;
void setup() {
  lcd.begin(16, 2);
  // Print a message to the LCD.
  lcd.print("Association!");
  
  pinMode(ledPin, OUTPUT);
  digitalWrite(ledPin, HIGH);   // set the LED on
  delay(1000);                  // wait for a second
  digitalWrite(ledPin, LOW);    // set the LED off
   
}

void loop() {
  //byte buffer[64];
  n = RawHID.send(data, 100);
  if (n > 0) {
      packetCount = packetCount + 1;
    } 
    lcd.setCursor(0, 1);
    lcd.print("Sent: ");
    lcd.print(packetCount);
    delay(500);
}
 
Last edited:
Hello, I'm working on a project using the Teensy 3.2 with the rawhid library and am having trouble transferring data after changing the VID/PID.

As I understand it from reading around the forums, the VID and PID can be changed by editing the header file \Arduino\hardware\teensy\avr\cores\teensy3\usb_desc.h.

Following the instructions in the file, I changed the lines defining the VENDOR_ID and PRODUCT_ID under the USB_RAWHID definition. When I change these values and recompile, the rawhid library seems to break and no packets are sent. I am using the basic RAWHID.send() as shown in the built in examples.

I see two issues
changing VID/PID inhibits automatic download (identifies Teensy by PJRC VID/PID) only first download and then button press should work
All Teensyduino SW works only with PJRC VID/PID. So, id you change VID/PID on Teensy, you must use your own PC-based HID interface.

The PID and the VID do successfully change, but I have confirmed no packets are being sent after the VID/PID change by using different usb monitoring programs. The packets are sent correctly when the VID and PID are the originals.
That is not helpful for further advice.
 
Status
Not open for further replies.
Back
Top