Fix to Uno and Mega 2560 Linux serial problems

David MellisFebruary 15th, 2011

We’ve just posted a tutorial on upgrading the firmware on the ATmega8U2 on the Arduino Uno and Mega 2560. This should resolve the problems that some of you have had with serial communication between those boards and Linux. The upgrade doesn’t require a programmer or other hardware, just adding a resistor to the board and touching a couple of pins together. It’s a safe process, and if it doesn’t work the first time you can do it again.

We’re in the process of testing the new firmwares on other operating systems so that we can begin to ship them as the default on new boards. So far, though, many Linux users have had success with the upgraded firmwares.

Thanks to Dean Camera (author of LUFA) for his help in fixing the firmware.

17 Responses to “Fix to Uno and Mega 2560 Linux serial problems”

  1. Toylab Says:

    I did everything. For a moment, I tought I had it. For the first time, Arduino uno appeared in serial port (using 0021 on Ubuntu 10 ) but when I tried to upload Blik:
    avrdude: stk500_getsync(): not in sync: resp=0xf9
    avrdude: stk500_recv(): programmer is not responding
    I’ll post this on the forum but thought maybe is something to add to this post.
    Thanks anyway!

  2. Abdullah Eid Says:

    Hi everyone,

    I am new here..but i am sending temperature and heart rate data from my fio + xbee to X-ctu and would like to graph this data in real time. can anyone please help me on what to download or what applications i need to make this graph? Thanks alot.

  3. Jim Says:

    I have two questions about the writeup. It says that you need to put in the resistor if your board is not an UNO SMD, and then it shows what to do on the regular UNO. It’s not clear if you need the resistor for the Mega 2560. Do I need to use the resistor?

    Also, at the github link, there’s a readme that says how to upgrade the firmware using avrdude. I followed these instructions and got an lfuse verification error, but I think my board is working now. Are these not good instructions to use?

  4. mellis Says:

    You do also need the resistor on the Mega 2560 (or to simply hold a wire across the pads of the solder jumper).

    The instructions for upgrading the firmware using avrdude are for writing both the DFU bootloader and the USB-serial firmware with an ISP (in-system programmer). You shouldn’t follow them if you just want to update the USB-serial firmware using the DFU bootloader that’s already on the 8U2.

    If you’re having trouble getting uploading to work at all, please post on the forum.

  5. CVBruce Says:

    I have a recent SMD Uno, and use Mac OS X. It doesn’t sound like I need to upgrade my firmware, but is there a way that I can determine whether or not my 8U2 has the new firmware or not?

  6. hue8 Says:

    hi, i own 2 new uno – both not the smd-version. and i am new with arduino. i updated the firmware using this site: http://arduino.cc/forum/index.php/topic,52447.0.html
    both work fine now. problems seem to be gone :)

  7. Jim Says:

    Just a note here for the 2560. The picture on the linked tutorial doesn’t explain where to put the resistor on the 2560, so here’s what I did based on stuff I found in a forum post:

    0. Plug in your board.
    1. Attach wire 1 to ground.
    2. Attach wire 2 to ground.
    3. Hold other end of wire 1 on upper left pad (of 6) near the Y in ITALY on the top of the board.
    4. Briefly touch other end of wire 2 to left side of capacitor near the N of RESET-EN on the top of the board. The RX (and maybe the TX?) LED should blink.
    5. Remove wire 1.
    6. Follow dfu-programmer instructions from the tutorial.
    7. Unplug and replug the board.

  8. Lennart Says:

    Hey folks, I have a question concerning the tut (I hope someone can answer): Do I need to unsolder the 10k resistor after reprogramming the ATmega 8U2?
    Thanks for answering!

  9. d.gomba@arduino.cc Says:

    Hi Lennart.
    I Advice you to look on the forum, this shuold be well explained!

    ciao
    Davide

  10. Nettigo Says:

    Hi!
    Is updated firmware shipped on new boards now or still we need to fix 8u2 fw for linux users (new UNO boards I have got recently seems to work with my linux out of the box, but I would like to be sure)?

    If it is being shipped with updated fw – starting from which serial n/o fw update is not needed for UNO and 2560?

  11. dcuartielles Says:

    Nettigo: We will be posting the serial numbers of the boards bringing the new software. Gianluca is aware this information is needed, but he is very busy this week making sure the production reaches the distributors.

    Please stay tuned, there will be a blog post about this soon.

  12. Nettigo Says:

    @dcuartielles:
    No problem, I will wait for that info. Till then I’ll be updating fw for those who will request that :)

  13. Patrick Flanagan Says:

    Hi,

    I have a Mega 2560, and I’ve been unable to get the solution described here to work. I followed the instructions here (http://www.wayneandlayne.com/blog/2011/02/16/fixing-linux-firmware-issues-on-arduino-mega-2560/) to enable DFU programming mode. That part went fine. The arduino disappeared from the list of serial devices. Then I executed the “erase” command and the “flash” command. The dfu-programmer protested that “Bootloader and code overlap. Use –suppress-bootloader-mem to ignore,” so I added the suppress option to the flash command and got it to run with the Mega hex file from github. And I completed the rest of the steps.

    When I open the arduino IDE, /usb/tty/usbmodem411 now appears, and when I try to upload a sketch to it, I get

    User configuration file is “/Users/JPF/.avrduderc”
    User configuration file does not exist or is not a regular file, skipping

    Using Port : /dev/tty.usbmodem411
    Using Programmer : stk500v1
    Overriding Baud Rate : 57600
    avrdude: Send: 0 [30] [20]
    avrdude: Send: 0 [30] [20]
    avrdude: Send: 0 [30] [20]
    avrdude: ser_recv(): programmer is not responding
    avrdude: stk500_recv(): programmer is not responding
    avrdude: Send: Q [51] [20]
    avrdude: ser_recv(): programmer is not responding
    avrdude: stk500_recv(): programmer is not responding

    So that’s where I am. Ideas? Also, if I buy a new Mega now from SparkFun, will it work out of the box?

    As an aside, I’d suggest consolidating instructions for fixing USB serial problems for the MEGA to one page. It’s hard to know if I’m following the instructions correctly if I have to cobble together different posts between different writers addresses different platforms and OSes.

  14. Robert Says:

    Hi,

    Patrick, thank you for the post and the link to wayneandlayne.com.

    I tried following the instructions on the web site by downloading the mega…hex file. However, when using the DFU, opening the .hex file gives a checksum error.

    It appears after resetting the USB software and not being able to upload the replacement .hex file, the board is now useless.

    The method I used to download the hex file from the web site was copy all of the hex code into the system’s memory, then open a file using notepad and saving the hex data in that file. It appears that all of the carriage returns are gone after the copy. Then closed the file with a .hex extension.

    Then opening the file using the DFU gives checksum error. Don’t know if I have done something wrong, but now I have a useless board.

  15. Jinx Says:

    I had another problem, because my Arduino was a MEGA 2560 R2.

    But I found a solution. You can find it here, but it’s all in spanish:
    http://ge-rov.blogspot.com/

  16. Richard Says:

    THANKS! I upgraded using the linked instructions and the firmware from the Arduino application and it worked perfectly and painlessly. Easier than dealing with trying to download .hex files etc. As a complete newbie on day 2 this is definitely the way to go. Note per instructions, resister mod is not necessary with Uno. I have Uno/Lucid-64.

  17. zhalim Says:

    Hi,

    does anyone knows how to check the ATmega8U2 firmware version
    under ubuntu linux? all i can find is for windows and mac os.

Leave a Reply

You must be logged in with your Arduino account to post a comment.