Arduino Yun Serial Damaged? Loop-back tried

Hello - I was working on a project with a Yun and a Mega. By accident I uploaded the Mega's code to the Yun. I tried to cancel this upload. I then tried to reupload the Yun's code. The IDE takes forever to upload and basically hangs. I have tried to reupload the Blink sketch and this takes forever as well.

One clue is that the Serial TX LED is always on. If I reset the 32U4, this light goes off but I cannot connect with USB. I have to re-reset it to get the board to be recognized over USB. I have tried all three of the Yun's reset buttons.

I tried the loop back test but the board is not recognized at all over USB. Jumpering Reset to Ground is the connection that causes the board not to be recognized.

Here is some sample error code:

         Using Port                    : COM8
         Using Programmer              : avr109
         Overriding Baud Rate          : 57600
avrdude: ser_open(): can't set com-state for "\\.\COM8"
avrdude: ser_send(): write error: sorry no info avail

Thanks for any suggestions about how to fix this.

Resetting the processors (AR9331, WiFi, and 32U4)

See last paragraph in that section.

"To reset the OpenWrt-Yun distribution to its default state,"

Uploading Mega code to the Yun's 32U4 processor may have corrupted the bootloader?

From the posted error message, it appears that you are trying to load code using the USB port, and that won't work if there are bootloader problems. Normally, the process for fixing the bootloader involves using a programming pod connected to the six pin ICSP header, and flashing a new bootloader. Fortunately, this is a much simpler proposition on the a Yun: the Linux side can act as a built in ICSP programmer, and it flashes a new copy of the bootloader every time it loads a sketch.

All you need to do is make sure your Yun is connected to the same network as your computer, and in the Arduino IDE's Port menu, select the Yun's network port, not the USB port. Do that, upload any sketch, and it will restore the bootloader. When you start the upload, the IDE will ask you for a password: this is the same password you use to log into the Yun's configuration web pages or SSH shell.

Thanks very much for the replies. I cannot get the WLAN RST to work either as the IDE does not see the wireless connection. I also do not see it on my router. I have tried two different computers and still no dice. So I guess it's time for a new one. Again thanks for taking the time.

PineCone: I cannot get the WLAN RST to work either

The documentation does not make it clear, but the WLAN RST button does not work until Linux on the Yun is fully booted. You must wait for it to completely boot up (can take more than a minute) before you try pushing and holding the button. This is in direct contrast to the reset function on most devices that require you to push/hold the reset button as you are powering up, or immediately after power up.

Have you tried the Ethernet port? In my post above I very carefully used the word "network" instead of "wireless." Just about everything in the Yun applies equally well to the wired Ethernet connection, things are not limited to WiFi. The advantage to the Ethernet port is that it requires virtually no configuration - as long as your router is acting as a DHCP server (most are) the Yun's Ethernet is simply plug and play.

Thanks again. It still doesn’t work and it looks like one of the SMD components on the underside has come off. Ah well, guess it’s a goner.

I have some updates on this. I resoldered the component on the underside as best I could. I then was eventually able to reset the WiFi on the Yun. I was able to then gain limited access to the board via WiFi, specifically I could launch the arduino.local web page. The IDE could not connect to the board - however, I noticed on the arduino.local web page that there was an option to upload a sketch assuming I had a .HEX file. I compiled the Blink sketch and made note of where the .HEX file was by changing the Preferences to show Verbose output. Then I browsed over to this location using the arduino.local web page. I uploaded the .HEX file to the board and it ran. The board can now be seen by the IDE and I am very optimistic about it being 100% fine. Thanks for all the help I received! This board was minutes away from the electronics recycling pile.