[Another Problem - Linux boot time] Linux worked yesterday, won't start today!

I had my Yun working just as I wanted yesterday.

When I tried to start it today the Linux side would not boot. I took out my microSD card and it booted without it - but not when I replaced the SD Card. When I say it will not boot, I mean that it does not get to the stage where the too-bright white USB led lights and it connects to my WiFi network.

The only reason I can think of for the problem is that I disconnected it from my PC yesterday while I had an SSH session open (via WiFi) - only realized when it was too late.

Might that be the cause of the problem?

Has anyone any suggestions about how to diagnose or fix the problem short of completely rebuilding the microSD card ?

I could not find anything with Google.

Thanks

...

Robin2: The only reason I can think of for the problem is that I disconnected it from my PC yesterday while I had an SSH session open (via WiFi) - only realized when it was too late.

I would be very surprised if this was the reason. I reboot mine all the time when I have an SSH session open and haven't had problems.

My first thought was that your sketch is sending data to the serial port which is being picked up by uboot and stopping the boot process (during the initial "press any key to interrupt booting" sequence. But removing the card wouldn't change that behavior.

My best suggestion at this point is to load and run the YunSerialTerminal sketch, press the YUN RST button, and capture then post the boot-up messages.

Now, I recall that you wanted to disable the bridge so you could do your own AR9331 communications. If you took it so far as to disable the boot-up messages on that port, you might be in trouble at this point. :o

It seems to have fixed itself. I did load the YunTerminal sketch and then "it worked"

It may be, as you say, that the Arduino program I had loaded was confusing the Linux side. If so that may be a PITA for what I want to do. But I will explore further.

I think I saw somewhere an arrangement for letting the Arduino side know when the Linux side had completed booting.

I have modified inittab to disable the bridge and I had been concerned that that would also prevent the Terminal from working - but apparantly not.

At the moment I am delighted that my EzScrn program works on the Yun just as on my PC (Linux and Windows7).

...R

Robin2: I think I saw somewhere an arrangement for letting the Arduino side know when the Linux side had completed booting.

I have done that in one of my applications, the discussion about it IS HERE.

I have seen a thread since then by someone who did something similar, but while waiting for the ready line to be asserted, his sketch echoes everything received on the Serial1 port to the Serial port, much like the YunSerialTerminal sketch. This lets him watch the boot up messages if he wants, which I think is a nice touch.

ShapeShifter: This lets him watch the boot up messages if he wants, which I think is a nice touch.

Thanks for the link. I haven't got around to any more tests.

The idea of being able to watch the the boot messages had crossed my mind - thanks for reinforcing the idea.

edit to add... Following a quck scan through your link, is there any web page that explains the use / usage of the AR9331 GPIO pins. It seems like they do some interesting stuff.

...R

Robin2: Following a quck scan through your link, is there any web page that explains the use / usage of the AR9331 GPIO pins. It seems like they do some interesting stuff.

The OpenWRT GPIO Wiki has some general information about how to control GPIO lines.

But as far as what GPIO lines are connected to what on the Yun, I used the Yun schematics to sort it out. That's how I figured out that GP22 needs to be brought high to enable the level shifter before GP19 can be used to signal the MCU's handshake connection on D7.

Thanks @ShapeShifter you have been very helpful.

...R

I have been fiddling with this all day. @ShapeShifter's code works great. But after more thought its not the solution I want because it requires a user sufficiently knowledgable to fiddle with /etc/rc.local.

The software alternative is to wait to make sure the Linux startup console has stopped sending text - but that means a wait of 30 seconds (20 secs is definitely too short).

I am looking for a common system that works on an Uno or Mega, a Leonardo and a Yun. Up to now I have dealt with the Arduino boot process by getting Python to wait for the Arduino to send "Arduino is ready"

But that does not work with a re-powered Yun because it interferes with the slower Linux boot process.

I have reluctantly come to the conclusion that the best approach is to have Python initiate communication after allowing a fixed time (12 secs seems to be needed with the Leonardo) for the Arduino boot process. That way the Arduino on a Yun will be quiet during the Linux boot process. And when new code is uploaded to the Arduino on the Yun the time to restart the Python program (which will restart the Arduino) is only 12 secs rather than 30.

Better ideas would be very welcome.

...R