Go Down

Topic: Uno DFU Programming Problems (Read 6919 times) previous topic - next topic


Today I started using my (through-hole) Uno on Linux and discovered serial communications didn't work reliably. After some searching I discovered this is a known problem with older 8u2 firmware and an update should fix the problems.

Attempting the procedure described at http://arduino.cc/en/Hacking/DFUProgramming8U2 has not been successful. I initially attempted to follow the procedure on Windows. I held a connection between the HWB and ground on the back, connected the reset and ground pads on the front, released the reset connection, then released the HWB connection.

The Uno then enumerates under the device manager as Atmel USB Devices|AT90USB82, which I presume is proper. Using Flip (3.4.2) at this point, selecting the Atmega8U2 device and then connection type USB, a dialog titled "USB Port Connection" emerges. Selecting "Open" on that dialog then fails with "Could not open USB Device."

Most of the discussion is oriented around using dfu-programmer under Linux so I then connected my Uno to a Linux machine and tried the procedure again. The first step of the procedure fails in a similar way:
Code: [Select]
$ sudo dfu-programmer at90usb82 erase
dfu-programmer: no device present.

lsusb appears indicate the device is properly in DFU mode from what I have gathered:
Code: [Select]
~$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 012: ID 03eb:2ff7 Atmel Corp.
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

with -v output:
Code: [Select]
$ sudo lsusb -vs4:12

Bus 004 Device 012: ID 03eb:2ff7 Atmel Corp.
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        32
  idVendor           0x03eb Atmel Corp.
  idProduct          0x2ff7
  bcdDevice            0.00
  iManufacturer           0
  iProduct                1 Arduino Uno DFU
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           27
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass       254 Application Specific Interface
      bInterfaceSubClass      1 Device Firmware Update
      bInterfaceProtocol      2
      iInterface              0
      ** UNRECOGNIZED:  09 21 03 00 00 00 0c 00 01
cannot read device status, Broken pipe (32)

(I don't know if the broken pipe error at the end of the lsusb -v output indicates something amiss or not.)

In desperation I also tried the method with soldering a 10k resistor between the HWB and ground and all the results are the same.


Some more mucking with this and I have gotten it to work. In further digging I read someone mention problems being alleviated by a newer version of dfu-programmer.

My system was using dfu-programmer 0.4.3 (using the rather old Ubuntu 9.04). I downloaded and built the latest dfu-pogrammer (0.5.4 at the moment) and the dfu-programmer command sequence given in the tutorial then succeeded.

Commands on the device such as
Code: [Select]
$ stty -F/dev/ttyACM0 -a or
Code: [Select]
$ cat /dev/ttyACM0
would always hang for several seconds and fail half the time with the old firmware, and they are now responsive and always seem to work with the new firmware. Updating is a must.

It's bizarre to me that I couldn't get this to work with the current version of Flip from Atmel, only the newest version of dfu-programmer. I wonder if other people have the same experience.


I don't know about window (ok I do but I don't use it anymore), but in reference to
cannot read device status, Broken pipe (32)

I get the same error and my Uno works fine.


You might need to specify at90usb82 instead of ATmega8U2 in the FLIP software.


You might need to specify at90usb82 instead of ATmega8U2 in the FLIP software.

Geez, that's exactly it. And I see you updated the wiki to mention this, very good.

Somehow even though the device showed up as AT90USB82 in the device manager and that's also the device name used with dfu-programmer, it eluded me that that would even be an option with Flip. I just found ATmega8u2 on the device list and didn't think about the choice further.


I updated my Arduino UNO firmware in Windows 7, because of serial errors on Linux. Followed this step by step tutorial and no soldering was required:

Go Up