List All Products

Advanced Search

Lost Password?
Forgot your username?
No account yet? Register

View Cart/Checkout
Your Cart is currently empty.

Newest Products!

Current Sensor 30 Amp
Current Sensor 30 Amp

Arduino Pro
Arduino Pro

Seeeduino Mega
Seeeduino Mega

Arduino Uno + Linux + Serial port printing = Trouble


Linux is our favorite OS here at hacktronics.  We use it for all of our Arduino programming, and have been very pleased with this environment, until the Uno came along.


We noticed that if our Arduino sketch used the serial port to print data (Serial.print or Serial.println ...), then the Uno (or Mega2560) board would become unresponsive under Linux.  We could not even program a new sketch!


It seems that there is a bug in the firmware that runs the USB functions within the Atmel ATMEGA8U2 chip which causes  communications problems with the Uno and Mega2560 boards when your sketch prints data to the serial port.


This serial port is the same port that is used to program your sketches onto the board, so when the Uno board is printing data through this same port, it seems Linux has trouble getting through and putting the Uno into reset.


You can flash your Arduino Uno or Mega2560 board with new USB firmware, and fix the problem.  Here are the steps:


First, download the new USB firmware here:


For the Uno, download:  Arduino-usbserial-uno.hex


For the Mega2560 board, download:  Arduino-usbserial-mega.hex


You will also need the "dfu-programmer" tool.  You can get it on Ubuntu like this:


sudo aptitude install dfu-programmer


Now that you have the new Arduino USB firmware, you need to put your board into hardware reset, so that it can be programmed.  This procedure is explained (with nice pictures) here (need to log in to


After your board has been placed into hardware reset, you can flash the new firmware with these commands:


sudo dfu-programmer at90usb82 erase
sudo dfu-programmer at90usb82 flash --debug 1 Arduino-usbserial-uno.hex
sudo dfu-programmer at90usb82 reset


Now just unplug the power to the board, and plug it back in, and enjoy Arduino development on your Linux box again!


Send feedback on this tutorial here.