Any way to read the VID/PID from the code?

Hi everybody, I´m trying to do an anticlone protection.

Is there any way to read the VID/PID from the main code in the Arduino UNO R-3?

Other possibility could be to edit the firmware from the ATMEGA8U2 (The USB hardware driver of the UNO) allowing it to transmit these data to the 328. Do you know where could I find the source of the original firmware for the ATMEGA8U2?

Grazie mille!


The 8U2 and 16U2 is posted the Arduino GitHub site I think. Or maybe its in the IDE code distribution also, check the bootloaders folders.

I don't know if the Serial side of the chip supports reading the USB side of the chip information.