Linux Occasionally Won't Program

I have a new Linux install (Lubuntu) on an old Macbook. Under Linux, my Duemilanove sometimes won't work.

I am usually able to upload fine. But every once in a while, though, it won't upload... I'll get the "stk500_recv(): programmer is not responding" error. But not always! Once it happens, it may take 10-20min to work again. It seems sort of random (how long it takes to work again).

There is no specific program that this happens with -- it happens even with the Blink program, and even if nothing is plugged in at all. I have checked for shorts, etc. and can't seem to find any. I am not doing anything with pins 0/1.

One of of my first thoughts was that the bootloader was corrupted. So I reburned the bootloader. Still didn't work.
Then I tried replacing the ATmega (with a newly burned bootloader). Same problem persisted.
Yet I think the bootloader is fine because the pin 13 LED always blinks upon reset.

Then I thought it was probably the FTDI chip. But when I program on my iMac (w/ OSX), everything seems fine. I never get the error on my mac: only under Linux!

This wouldn't surprise me if it happened every time. But it happens intermittently. That wouldn't make sense if it was a driver / FTDI chip problem (after all, the board is 4+ years old).

While it is broken, the TX/RX LEDs don't blink as much as they should. A couple flashes of the TX light right after reset, and then nothing. This would seem to implicate the FTDI chip. Yet I never have problems with serial communication (i.e. Serial.prinln())... only upload causes problems.

I have not been able to figure out any other information (i.e. what triggers the problem, what causes it to work again).

So my questions are:

  1. Is this a Linux thing? Or was I just lucky enough to not see it while using my iMac?
  2. Could this be a problem with the FTDI chip?
  3. And should I just get a new arduino? Keep in mind this is a duemilanove... 4-5 years old.
  4. Could this be a USB port bad connection? I never see the power light flicker, but maybe the data lines have bad connections (on either the Arduino on computer end)? I have tried changing USB cables.

Thanks.

baum

Well it could be a hardware problem. I have a questionable usb port on one of my computers and devices plugged into this port will often reboot for no apparent reason. If this happens with an arduino board Linux may assign a new port (/dev/ttyUSB0 will become /dev/ttyUSB1 and so on) when it reconnects. That may give the error you are seeing. You can check the port menu in the IDE (or the kernel log) to see if this is happening. The port reassignment business can give problems with the Leonardo at times also. Choosing the wrong board will give the same error. Other than these instances I've not had any uploading problems with Linux.

Hope this helps.

That's an interesting idea. I had been noticing that the serial port kept changing -- by now I'm up to /dev/ttyUSB7 (started at USB0).
Also, I checked the kernel log. This shows up often:

root hub lost power or was reset

Maybe that's the problem. The computer itself is 6-7 years old...

baum