Upload original firmware to HID Arduino I recently was playing around with Arduino and using dfu-programmer reflashed ATMega16u2 to make the computer think it was a keyboard device.

Well, I wish to put the original Arduino firmware back on, but now dfu-programmer says the device is not present.

The Arduino is listed under /dev/hidraw5 on Ubuntu. Typing lsusb gives the following output for Arduino keyboard:

Bus 004 Device 008: ID 03eb:2042 Atmel Corp. LUFA Keyboard Demo Application


I tried erasing with the command:

sudo dfu-programmer atmega16u2:4,8 erase


and got

dfu-programmer: no device present.


Is there a way to target /dev/hidraw5 using dfu-programmer? Many thanks.
Very sorry!  But I actually figured this out on my own.  I needed to reset by briefly bridging the reset pin with ground near the USB connector.  Then typed

sudo dfu-programmer atmega16u2 erase


and I'm happy again.