Go Down

Topic: [YUN] Arduino disconnected while program was writing on it (Read 10540 times) previous topic - next topic

Vadorequest

Hi.

I have a problem, the Arduino was disconnected while the program was writing on its memory, no led are powered now, no one.
I don't get wifi too. There is no hotspot. I can upload a program on it but it's not working.

Maybe it's the boatloader? How can I fix it? I think it's the bootloader because there is no light when he's powered.

Do you have any solution?

Thank you.

AllSystemGO

Hey VadoRequest,

   Sorry to hear your Yun is acting dead. I didn,t read the whole post but maybe this would help you get back on track : http://forum.arduino.cc/index.php?topic=195589.0

Hope it helps

federicofissore

Have you tried connecting it to another computer? One of ours once shut down all the USB ports for some unknown reason. Rebooting solved

Vadorequest

I'll try that by because we can send another program using USB via the same computer I don't think it's the issue.

Vadorequest

I tried with another computer and now I resolved my issue with the IDE (https://github.com/arduino/Arduino/issues/1673) I'll try to fix this one!

Vadorequest

#5
Nov 14, 2013, 08:41 pm Last Edit: Nov 14, 2013, 09:43 pm by Vadorequest Reason: 1
I'm following a lot of topics about my problem and more.
Right now, I saw in the Arduino IDE 1.5.4 these error log after sent the program "YunSerialTerminal" to the arduino.

Code: [Select]
java.io.IOException: Input/output error in writeArray
at gnu.io.RXTXPort.writeArray(Native Method)
at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1124)
at processing.app.Serial.write(Serial.java:511)
at processing.app.Serial.write(Serial.java:534)
at processing.app.SerialMonitor.send(SerialMonitor.java:85)
at processing.app.SerialMonitor.access$100(SerialMonitor.java:29)
at processing.app.SerialMonitor$2.actionPerformed(SerialMonitor.java:62)
at javax.swing.JTextField.fireActionPerformed(JTextField.java:492)
at javax.swing.JTextField.postActionEvent(JTextField.java:705)
at javax.swing.JTextField$NotifyAction.actionPerformed(JTextField.java:820)
at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1636)
at javax.swing.JComponent.processKeyBinding(JComponent.java:2851)
at javax.swing.JComponent.processKeyBindings(JComponent.java:2886)
at javax.swing.JComponent.processKeyEvent(JComponent.java:2814)
at java.awt.Component.processEvent(Component.java:6040)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4630)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1848)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:704)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:969)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:841)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:668)
at java.awt.Component.dispatchEventImpl(Component.java:4502)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Window.dispatchEventImpl(Window.java:2475)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)


I don't know if that could help and I don't know when it appears because I don't think it was there just after I uploaded the program, I watched the console and didn't see it. I'll try again.

Edit: Ok, this error happens when I try to send something using serial port while the device is disconnected. Not important.

Vadorequest

I really need help.

I think the linux OS doesn't start at all. I have no log on the serial output (log) using 115200 baud.
I power the arduino but there is really nothing, no log at all. It's like nothing start, just one led blink once or twice and that's all.

When I send something on the serial monitor, the led RX blink once.

I read a lot of topics on the forum but... It looks like I'm not able to go to failsafe mode... And I hae no idea what's going on on the board.

Vadorequest

#7
Nov 14, 2013, 10:12 pm Last Edit: Nov 15, 2013, 12:29 am by Vadorequest Reason: 1
I think I should execute the "reset-to-factory-anyway" command but I can't if I'm not connected to the Arduino...

With windows I tried putty on COM10 with 115200 baud but it says me than he can't connect and shutdown. When I upload the program I use the COM10 port and there is no problem, I checked on the windows manager and Arduino is well pluged to the COM10... So I don't understand.

Anyway, I have a linux ubutun 12/13 OS on virtual machine installed, but I installed the package picocom but I don't have the ttyACM0 and I'm not a pro linux so I don't know what I can do.

I installed Arduino in linux in case of but... I still can't run the following command: (FATAL: cannot open /dev/ttyACM: no such file or dir)
Code: [Select]
picocom -b 115200 /dev/ttyACM0


But some kind of programs can runs (as blinking) so the Arduino itself is working, I don't know if that means that the linux OS is working too.

noblepepper

I'm confused as to exactly what is wrong with your Yun, can you give me this information? The picture at http://arduino.cc/en/uploads/Main/ArduinoYunFront_2.jpg will help identify the components I talk about below.

1. Is the yellow "on" led lit?

2. Press the 32U4 rst button (the one near the large silver Ethernet connector, in the top left of the picture) two times quickly.
Normally the red "led 13" will come on and pulsate (it stays on more than off, I call it breathing) and then the yellow "rx"  led will blink once. Does this happen?

3. Press the WLAN rst button for 1-2 seconds (the one by the silver USB-A connector, in  the bottom left of the picture).
Normally the blue "WLAN" led will blink brightly while you hold the button down.
Does this happen?

4. Press the YUN rst button (the one by the leds, in the bottom right of the picture).
Normally the blue "USB" led will come on for a while (this one is not as bright as the WLAN led).
Does this happen?
Note that Linino will reset when you do this so the web interface, ethernet connections and WiFi connections will not operate until it completes which is more than 60 seconds.

5. We may need an Ethernet cable, do you have one or can you borrow one?

This information will tell me the next steps...

Vadorequest

#9
Nov 15, 2013, 02:06 pm Last Edit: Nov 15, 2013, 02:17 pm by Vadorequest Reason: 1

I'm confused as to exactly what is wrong with your Yun, can you give me this information? The picture at http://arduino.cc/en/uploads/Main/ArduinoYunFront_2.jpg will help identify the components I talk about below.

1. Is the yellow "on" led lit?

I plug the arduino to the computer using the USB wire. The RX led blinks third times. The l13 led is ON but it's because of the program. No one led is ON or blink. The USB "yellow" led doesn't blink at all. (I think you're interested by this one, especially)


2. Press the 32U4 rst button (the one near the large silver Ethernet connector, in the top left of the picture) two times quickly.
Normally the red "led 13" will come on and pulsate (it stays on more than off, I call it breathing) and then the yellow "rx"  led will blink once. Does this happen?

The l13 breaths and the RX blink twice, a little longer the first time than the second. So yes, it happens.



3. Press the WLAN rst button for 1-2 seconds (the one by the silver USB-A connector, in  the bottom left of the picture).
Normally the blue "WLAN" led will blink brightly while you hold the button down.
Does this happen?

Nothing happens. Tried 3 times with 1/2s, 3/4s, two times quickly.


4. Press the YUN rst button (the one by the leds, in the bottom right of the picture).
Normally the blue "USB" led will come on for a while (this one is not as bright as the WLAN led).
Does this happen?
Note that Linino will reset when you do this so the web interface, ethernet connections and WiFi connections will not operate until it completes which is more than 60 seconds.

I tried 1/2s, ~10s, two times quickly, 30s, 45s, one minute. Nothing happens, the l13 led still ON (program) and is not affected by this reset button.


5. We may need an Ethernet cable, do you have one or can you borrow one?

This information will tell me the next steps...

I have one.

I hope it will helps.

noblepepper

#1 and your other answers tells me your Yun is powering up, this is good.

#2 this is good, your 32U4 side is up and working somewhat normally.
The next steps depend on what OS you are running on your host computer, it seems you have a linux box available, what distro? If you are on Windows, let me know and we'll go from there, but if you are on linux do this on your host computer:
2-a) run ls -l /dev/tty*>>ttysbefore in a terminal without the Yun attached, this will make a file with a list of all your ttys
2-b)Plug in the Yun to a USB port, wait a few seconds and run ls -l /dev/tty*>>ttysafter
2-c)attach the two files we just made (ttysbefore and ttysafter) to the forum post, there should be a new tty in there somewhere. On Ubuntu it would be something like /dev/ttyACM0.

#3 I wasn't clear in my instructions, I meant 1 to 2 seconds not 1/2 second, in any case hold the button a bit longer, if you hold it for more than 5 seconds it will cause your WiFi connection to reset which is not a bad thing so let's try that. Hold the button for around 10 seconds to be sure we go past 5 seconds and if the blue led flashes while you hold the button and flashes for a few seconds more after you release we will work from there.

#4 This sounds like #3 above won't work but try it anyway, I think your Linino side is down we'll work on getting it back up.

#5 We need to get #4 fixed for this to be useful, patience, we'll get there.

Vadorequest


#1 and your other answers tells me your Yun is powering up, this is good.

Yes, I'm sure of that because I tried to run some different programs (blinking led, basically) and they run normally.


#2 this is good, your 32U4 side is up and working somewhat normally.
The next steps depend on what OS you are running on your host computer, it seems you have a linux box available, what distro? If you are on Windows, let me know and we'll go from there, but if you are on linux do this on your host computer:
2-a) run ls -l /dev/tty*>>ttysbefore in a terminal without the Yun attached, this will make a file with a list of all your ttys
2-b)Plug in the Yun to a USB port, wait a few seconds and run ls -l /dev/tty*>>ttysafter
2-c)attach the two files we just made (ttysbefore and ttysafter) to the forum post, there should be a new tty in there somewhere. On Ubuntu it would be something like /dev/ttyACM0.

ttysbefore: http://pastebin.com/zXYEpZtQ
ttysafter: http://pastebin.com/FmpehvqS
I have windows 7 but I have also Ubutnu 12.04.3 in virtual machine (VMware).
I have the ttyACM0 and I'm able to connect using picocom and I have a stream from the Arduino (if I Serial.write() something I'll see it on the linux shell if I'm connected with picocom)


#3 I wasn't clear in my instructions, I meant 1 to 2 seconds not 1/2 second, in any case hold the button a bit longer, if you hold it for more than 5 seconds it will cause your WiFi connection to reset which is not a bad thing so let's try that. Hold the button for around 10 seconds to be sure we go past 5 seconds and if the blue led flashes while you hold the button and flashes for a few seconds more after you release we will work from there.

I was not clear with my writing, I did 1-2 seconds, (between 1 and 2), not 1/2s. (Should use "-" instead of "/")
Not led blue on, whatever the time I'm pressing the reset wifi button.


#4 This sounds like #3 above won't work but try it anyway, I think your Linino side is down we'll work on getting it back up.

It looks like, Arduino is working but reset button wifi and Yun don't have any effect so maybe the linux OS is "hurt".


#5 We need to get #4 fixed for this to be useful, patience, we'll get there.

Thank you, for your patience.

Vadorequest

Another thing, I'm connected with linux with picocom:

Code: [Select]
vado@ubuntu:~$ picocom -b 115200 /dev/ttyACM0
picocom v1.4

port is        : /dev/ttyACM0
flowcontrol    : none
baudrate is    : 115200
parity is      : none
databits are   : 8
escape is      : C-a
noinit is      : no
noreset is     : no
nolock is      : no
send_cmd is    : ascii_xfr -s -v -l10
receive_cmd is : rz -vv

Terminal ready


If I press the WLAN reset button, sometimes the green TX LED blinkand I get the message "Linino available" in the picocom terminal.
Source code (C++) on the YUN: http://pastebin.com/hqdxcj7b
(Based on YunSerialTerminal and customized)

I don't know really how it works because sometimes I push reset (WLAN) and nothing happens, sometimes i get several messages on the console quickly, maybe there is a reset time or something. I tried several times, pushing 1-2s, 10s, and so on.

I don't know if this information will be useful.

Vadorequest

I run the console while the Arduino is plugged in.
Code: [Select]
vado@ubuntu:~$ picocom -b 115200 /dev/ttyACM0
picocom v1.4

port is        : /dev/ttyACM0
flowcontrol    : none
baudrate is    : 115200
parity is      : none
databits are   : 8
escape is      : C-a
noinit is      : no
noreset is     : no
nolock is      : no
send_cmd is    : ascii_xfr -s -v -l10
receive_cmd is : rz -vv

Terminal ready


If I unplug:
Code: [Select]

FATAL: term closed
term_exitfunc: reset failed for dev UNKNOWN: Input/output error
vado@ubuntu:~$


If I try to run the command picocom -b 115200 /dev/ttyACM0 while the Arduino is not plugged in.
Code: [Select]
vado@ubuntu:~$ picocom -b 115200 /dev/ttyACM0
picocom v1.4

port is        : /dev/ttyACM0
flowcontrol    : none
baudrate is    : 115200
parity is      : none
databits are   : 8
escape is      : C-a
noinit is      : no
noreset is     : no
nolock is      : no
send_cmd is    : ascii_xfr -s -v -l10
receive_cmd is : rz -vv


FATAL: cannot open /dev/ttyACM0: No such file or directory


noblepepper

OK, great, we are getting somewhere. When you press either the WLAN rst or Yun rst, Linino goes off doing things and may not be back for more than 60 seconds which seems like an eternity when you are waiting, this can be very confusing.

With the Yun plugged in and picocom connected, press the Yun reset button (the one by the leds). You should see the boot process of Linino, something like what I had the files attached to this post http://forum.arduino.cc/index.php?topic=192830.msg1425073#msg1425073

Go Up