SOLVED: Arduino not responding after upload of sketch (dead?)

Hello everybody!

I just uploaded a sketch on my Arduino Mega2560 with "ino" as I used to do so for years. Now, the board is not responding anymore. I get the following error on Linux:

Guessing serial port ... FAILED
No device matching following was found: 
  - /dev/ttyACM*
  - /dev/ttyUSB*

whenever I execute "upload" or "serial".

The Arduino IDE tells me

avrdude: usbdev_open(): did not find any USB device "usb"

when I try to reinstall the bootloader.

I do have a 2nd Arduino Uno. This one works well on the same Computer/USB-Port with the same equipment.

I also have an old AVR ISP MKII. Can it be used somehow to revive the board?

Many thanks in advance!

Simon

I'm not using Arduino IDE on Linux but the serial port for your Mega and UNO will probably be different and you select the correct serial port in the IDE with the Tools->Serial Port menu.

Hi Riva,

thank you for your input.

On Linux all my boards are on the same port "/dev/ttyACM0". The Arduino IDE shows this option when I have the Uno connected but is empty/disabled when I connect the Mega.

In the mean time I've rebootet the computer. But it hasn't changed anything.

Thank you Simon

simonheimbach: On Linux all my boards are on the same port "/dev/ttyACM0". The Arduino IDE shows this option when I have the Uno connected but is empty/disabled when I connect the Mega. Must leave this to a Linux user then as for Windows the serial port number changes with different boards (UNO, Mega, Pro Mini etc.) In the mean time I've rebootet the computer. But it hasn't changed anything. Darn it! Turning it off and on again nearly always works. :)

Does the 'ON' (or any) led light when you connect to USB? If not you may have a damaged power supply. Try a different USB cable?

The AVRISP mkII programmer is listed in the tools/programmer menu, it should work to install booloaders or the firmware for the atmega8u2 on the mega 2560. The 8u2 firmware is also a prime suspect for the mega 2560 not working as it is responsible for establishing the USB serial link. The firmware is included with the IDE.

avrdude: usbdev_open(): did not find any USB device "usb" is the warning you will get trying to install a bootloader without an ISP programmer or with the wrong one selected.

Hope this helps.

@Riva: I know. Has helped just until today :)

@tf68: Yes. All LED are the way they're supposed to (ON, L). I actually use the same USB-cable when working with the Arduino UNO and it works perfectly.

Now, I tried the AVR ISP mkII with the following result: The ISP LED is green in just 1 of 4 possible configs (2 times 2x3 pins). I select the programmer and click on "Install bootloader". The LED of the ISP flickers an I get the error:

avrdude: stk500v2_command(): command failed
avrdude: stk500v2_program_enable(): bad AVRISPmkII connection status: Target not detected
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

I haven't powered the Arduino from external source? Do I need it? Can I simply use the jack on the board?

Just for clarification: I have used the Arduino Mega for some time and did so just today. Suddenly after uploading a new sketch the connection broke down and didn't come up until now.

SOLVED

Hello altogether,

Everything is working the way it's supposed to. Thank you for all your replies.

For those who have a similar problem: - My bootloader was somehow broken - power your arduino from an external source (9V preferably at the standard jack) - connect an isp mkII (or whatever you use) at the pins near the chip ("ICSP") - us your Arduino IDE, select your board and programmer and click on "install bootloader"

Happy

Simon

[edit] I uploaded the sketch again and got exactly the same problem... hmmmm. Any other sketch is just okay. Could it be, that the compiled version was for the Arduino UNO and therefore crashed the bootloader of the Mega? [/edit]

[edit2] I think I got it. The binary sketch was compiled against older arduino-libraries. After cleaning up the sketch-folder and recompiling the hole stuff, everything works nicely. [/edit2]

Glad you found the problem of no being able to upload. There must be some other problem here as using an older version of libraries should not corrupt the bootloader. It should be in a protected area of memory that is not effected by sketch upload using the bootloader but uploading using a programmer like your AVR ISP MKII will wipe it (bootloader) as a sketch is installed. I think you can get into a lock-up situation with old version bootloaders on the Mega and sketches that enable watchdog timer.