Flashing Uno ATmega 8u2 and 16u2 serial number

these instructions are currently written for OSX only. we cannot be held responsible for any damage that may be caused while flashing your arduino, and thank you for understanding.

1. download LUFA library version 100807, and unpack. download and install darwin ports. download and install arduino.

2. right click on your Arduino application and select ”show package contents”

3. open Resources/Java/hardware/arduino/firmwares, and copy the arduino-usbserial folder into your downloaded LUFA Projects/ folder.

4. open the copied arduino-usbserial folder and replace Descriptors.c with this modified file: Descriptors.c for Uno.

5. open the new Descriptors.c file and change the “-a40h-001″ (around line 227) to whatever serial number you’d like (-a40h-xxx)

6. download and install CrossPack-AVR version CrossPack-AVR-20100115.dmg

7. start Terminal (Applications/Utilities/Terminal)

8. change to the “arduino-usbserial” folder (replace the ../../  below with the path to your LUFA folder) by typing the following and pressing enter

cd ../../LUFA\ 100807/Projects/arduino-usbserial

9. compile the code (make sure you are inside the LUFA/Projects/arduino-usbserial directory **see above)

make clean

10. in terminal use darwin ports to install DFU

sudo port install dfu-programmer

11.put your board in DFU mode. once you have bridged the pads, open up Arduino to see if your board is now in DFU mode. do this by going to Tools/Serial Ports and checking to make sure your uno is no longer in the devices list.

12.using terminal upload the newly built Arduino-usbserial.hex (more detailed uploading instructions are available here). NOTE! make sure you have installed the DFU programmer from step 11 before doing this.

sudo make dfu

13. if terminal tells you that no DFU device was found, double check that your Arduino was successfully put in DFU.

14. after a successful flash, the USB vendor ID will be changed to 03eb (check your Applications -> Utilities -> System Infromation to see this), and see the firmware docs for more information. you should see something that looks like this:

Arduino Uno DFU:

Product ID:	0x2ff7
Vendor ID:	0x03eb  (Atmel Corporation)
Version:	0.00
Speed:	Up to 12 Mb/sec
Location ID:	0xfd130000 / 4
Current Available (mA):	500
Current Required (mA):	100

 
12. run serialosc and plug the board in, you should see something like:

serialosc [a40h-084]: connected, server running on port 14407