LED blinks 4 times then AVRDude Communication/Port error. How to fix?

I've got an UNO and once in a great while when the planets align just right I can actually get even the simplest of programs (i.e. the blink example) to load. But most of the time I get the LED 4 blinks on the board then the error in the programmer.

What can I do to fix this? I'm in Linux Ubuntu btw. I have tried to change the port number but can't figure out how. I can do lusb and get the information in terminal on where the board is at. It shows up as Arduino in that. So it's definitely recognized.

On the other hand I have an Arduino Nano and it works every time.

Does the Loopback test work on the Uno? Maybe the 16U2 programming is shot.
Can use the Nano to reprogram it.

I've tried it with several different chips (and even two Unos) and I get the same thing... just the blinks when I hit upload and that's it. I think maybe I'm on the wrong port??? Can't pinpoint it.

Any ideas on how to do a loopback test in Linux?

I think I understand the hardware connections. I'm not familiar with the software end of things.

Also just tried it in Windows 7 and getting errors there as well:

Arduino: 1.6.8 (Windows 7), Board: "Arduino/Genuino Uno"

Sketch uses 1,066 bytes (3%) of program storage space. Maximum is 32,256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2,039 bytes for local variables. Maximum is 2,048 bytes.
avrdude: ser_open(): can't open device "\.\COM3": The system cannot find the file specified.

Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

(deleted)

Thanks! This is on 1:1.0.5+dfsg2-2 in Linux. I'm not sure what version I have in Windows. Neither seem to work.

Tried both my UNO boards and no go. Then I tried a known good chip and got it to work again.

Seems this batch of 10 Chinese Atmel 328P chips off of ebay are no good. : (

But at least now I know! The Nano from China ($3 shipped I think) works great.

777funk:
Tried both my UNO boards and no go. Then I tried a known good chip and got it to work again.
Seems this batch of 10 Chinese Atmel 328P chips off of ebay are no good. : (
But at least now I know! The Nano from China ($3 shipped I think) works great.

Sounds to me like you possibly got chips with no bootloader installed.

I bought some '328P chips a while back that had an Optiboot bootloader installed according to the eBay listing, but in reality they didn't.
I burned a bootloader to them and they worked great.

Now I buy only blank chips and burn my own bootloaders.
That's cheaper anyway, and I know exactly what I'm getting. :slight_smile:

That isn't the case if it worked occasionally though. :confused: