Yun running for days, no longer able to telnet or web-login, sketch still workin

I have my Yun running some very basic sketch (a modified temboo google/sendEmail w/ a hardware interface) utilizing some analog inputs and some digital outputs.

It is powered through a wall-charger 5v 1.2A on the miniUSB plug... so power is constant and reliable. I programed the Yun over wifi (it is only connected via wifi, no USB or Ethernet connections) as well as log into the web-interface to watch the real-time load graphs as well as SSH into console to watch the console output that the sketch issues for reporting on input conditions that could trigger an output reaction.

The end goal is to use the Yun and a hardware interface to act as part of a home automation/monitor/response project... so it would be "on/running" constantly for years.

As i stated already, i have no problem accessing the interfaces/ports via wifi initially... however, after it has been running for some time (maybe 12-24 hours) i can no longer ping/SSH/HTTP, not even with the DNS-name or IP-address. But the Yun is still working, and i can trigger the sendEmail action through the hardware interface and it works flawlessly (meaning that it has access to the wifi network) so it is connected... but i am just not able connect to it.

If i press the "32U4" reset button, i can again access everything... but after hours of run-time, it again becomes unreachable in the same way. Since my intended use is to have it run for very-long periods, i don't want to have to reset it to be able to access the console or http-interface.

Anyone else have this issue ?
Thanks in advance.

i had the same problems while i am using wifi.

after a couple of days wifi hangs and sometimes the 32u4 sketch hangs to.
the wifi is totaly unstable,
( I've tried everything that has been discussed here, router, accesspoint and so on.)
and i think the bridge between yun and 32u4 goes down with wifi sometimes.

since I am using only ethernet all works fine.

As the sendmail works fine you can safely conclude both parts of the yun are up and running and communicating. So you are probably experiencing a local network problem and not a yun problem.
I have the same problem quite regularly due to a cheap(?) wifi router. The way for me to solve it is to reboot the wifi router.
Best regards
Jantje

Jantje:
I have the same problem quite regularly due to a cheap(?) wifi router. The way for me to solve it is to reboot the wifi router.

this is particularly interesting to me... as my wife's laptop gets disconnected from our house wifi when the lid is closed/sleep; she has to turn wifi off/on to reconnect. this only started when i had to replace our old (apparently better) wifi router with a new one. i think you may be onto something here.

Well, as user.Jantje suggested the wifi router was the problem.

I replaced my D-Link DIR-655 with a Linksys WRT-54GL (same model router i had for may problem-free years prior to it dying and being replaced with the D-Link unit) and the issue with my Yun is resolved as well as my wife's laptop and our wifi printer.

great :slight_smile:
Thanks for the feedback.
I have been thinking about replacing mine as well but I need a 100mwatt outdoor router and as I had little luck with the cheap one (same price as the WRT-54GL :astonished:) I'm not looking forward to buying a new one.
Best regards
Jantje

delirium45:
Well, as user.Jantje suggested the wifi router was the problem.

I replaced my D-Link DIR-655 with a Linksys WRT-54GL (same model router i had for may problem-free years prior to it dying and being replaced with the D-Link unit) and the issue with my Yun is resolved as well as my wife's laptop and our wifi printer.

Is there a workaround for this on the linino side ?

I would rather have a resilient system running on a Arduino that can "repair" the network problem itself.

I am facing the same problem with my Yun. However, all other devices in my home work fine for weeks without the need to reboot the wifi router...

bilica:

delirium45:
I am facing the same problem with my Yun. However, all other devices in my home work fine for weeks without the need to reboot the wifi router...

You say other devices do not have the problem. In many cases other devices do not talk to each other via the local LAN only (chatting and mail go over the internet). Most devices only talk to the internet. If you do not have a local wifi service like a wifi printer or wifi yun you will not experience the problem. So unless you had a wifi service running and accessible for weeks in your network I would reconsider

all other devices in my home work fine for weeks without the need to reboot the wifi router...

Simplified you can say that the problem is that the local wifi device can get to the internet but you can not get to the wifi device.
Even rebooting the device does not help because it is the wifi AP that blocks ingoing messages to the wifi device.
The easiest test is to simply reboot the wifi AP and see if it then magically works.

As the wifi blocks incoming messages to the wifi service (say yun) there is nothing you can do at the wifi service (yun) side.
If you can live with it a planned auto reboot of the wifi AP may be a work around.

Best reagards
Jantje

PS: IMHO it is because most devices only access the internet that there are so many wifi AP's that have this behaviour.

I guess that I will try to add a cron job to check that the Yun has internet connection and inform the Arduino side to light up an LED if there is not network.

Is there a way to distinguish between no internet and no wifi access on the Linino side ? For instance, I could add a cron job that tries to ping some address. But what if the wifi on the arduino is down (meaning not connected to the Access Point) ?

Thanks again for the help Jantje,

Jantje:

bilica:

delirium45:
I am facing the same problem with my Yun. However, all other devices in my home work fine for weeks without the need to reboot the wifi router...

You say other devices do not have the problem. In many cases other devices do not talk to each other via the local LAN only (chatting and mail go over the internet). Most devices only talk to the internet. If you do not have a local wifi service like a wifi printer or wifi yun you will not experience the problem. So unless you had a wifi service running and accessible for weeks in your network I would reconsider

all other devices in my home work fine for weeks without the need to reboot the wifi router...

Simplified you can say that the problem is that the local wifi device can get to the internet but you can not get to the wifi device.
Even rebooting the device does not help because it is the wifi AP that blocks ingoing messages to the wifi device.
The easiest test is to simply reboot the wifi AP and see if it then magically works.

As the wifi blocks incoming messages to the wifi service (say yun) there is nothing you can do at the wifi service (yun) side.
If you can live with it a planned auto reboot of the wifi AP may be a work around.

Best reagards
Jantje

PS: IMHO it is because most devices only access the internet that there are so many wifi AP's that have this behaviour.

ArduinoYun LEDs (WLAN/WIFI and USB indicator).

http://forum.arduino.cc/index.php?topic=214750.msg1571747#msg1571747

Thanks sonnyyu, but how to distinguish between internet down or wifi router connection down ?

I could setup a script to ping www.google.com every minute. But there might be a chance of getting blocked by google after a couple of hours running.

In the end, I would like to inform the user of my product somehow if the problem lies between my product and the AP or if it is a problem between the AP and the internet.

Thanks again,

sonnyyu:
ArduinoYun LEDs (WLAN/WIFI and USB indicator).

ArduinoYun LEDs (WLAN and USB indicator). - Arduino Yún - Arduino Forum

Measuring if the Yun is internet connected, by ping root dns server ip.

http://forum.arduino.cc/index.php?topic=209412.msg1541242#msg1541242