Wifi & SD issues

Hi All, apologies to bring my problem here but as you may appreciate a Yun with no wifi is basically an uno; ok not quite but you get my point the wifi to me was a major buying reason so having issues with it is nothing short of driving me wild.

The below might be a better summary than anything but in short wifi times out alot, when it works its at 50% strength, i have rebuild the Yun using factory reset as well as upgrade firmware to no avail.

Appears only a hard power reset will fix it as hitting the wifi button (unless i need to go longer) doesn't work, when it works it works perfectly but it doesn't take long to dissapear of the network, i can still use it like an Uno via Arduino IDE software and COM connection.

Not sure if its connected but i have a heck of a time seeing the SD card also, i have found it once so i know its not my SD card (4gb Kingston) but no matter how i format it, put folders on it or re size it it doesn't exist; some connection between these two problems?

Any help or guidance what i should do would be greatly appropriated.

[ 937.880000] wlan0: association with 72:53:d4:7e:95:c8 timed out
[ 957.750000] wlan0: authenticate with 72:53:d4:7e:95:c8
[ 957.760000] wlan0: send auth to 72:53:d4:7e:95:c8 (try 1/3)
[ 958.210000] wlan0: send auth to 72:53:d4:7e:95:c8 (try 2/3)
[ 958.210000] wlan0: authenticated
[ 958.230000] wlan0: associate with 72:53:d4:7e:95:c8 (try 1/3)
[ 958.940000] wlan0: associate with 72:53:d4:7e:95:c8 (try 2/3)
[ 958.980000] wlan0: associate with 72:53:d4:7e:95:c8 (try 3/3)
[ 959.030000] wlan0: association with 72:53:d4:7e:95:c8 timed out
[ 978.880000] wlan0: authenticate with 72:53:d4:7e:95:c8
[ 978.890000] wlan0: send auth to 72:53:d4:7e:95:c8 (try 1/3)
[ 979.440000] wlan0: send auth to 72:53:d4:7e:95:c8 (try 2/3)
[ 980.010000] wlan0: send auth to 72:53:d4:7e:95:c8 (try 3/3)
[ 980.270000] wlan0: authentication with 72:53:d4:7e:95:c8 timed out
[ 1010.990000] wlan0: authenticate with 72:53:d4:7e:95:c8
[ 1011.000000] wlan0: send auth to 72:53:d4:7e:95:c8 (try 1/3)
[ 1011.200000] wlan0: send auth to 72:53:d4:7e:95:c8 (try 2/3)
[ 1011.580000] wlan0: send auth to 72:53:d4:7e:95:c8 (try 3/3)
[ 1012.000000] wlan0: authentication with 72:53:d4:7e:95:c8 timed out
[ 1042.720000] wlan0: authenticate with 72:53:d4:7e:95:c8
[ 1042.730000] wlan0: send auth to 72:53:d4:7e:95:c8 (try 1/3)
[ 1043.460000] wlan0: send auth to 72:53:d4:7e:95:c8 (try 2/3)
[ 1044.010000] wlan0: send auth to 72:53:d4:7e:95:c8 (try 3/3)
[ 1044.300000] wlan0: authentication with 72:53:d4:7e:95:c8 timed out
[ 1075.030000] wlan0: authenticate with 72:53:d4:7e:95:c8
[ 1075.040000] wlan0: send auth to 72:53:d4:7e:95:c8 (try 1/3)
[ 1075.370000] wlan0: send auth to 72:53:d4:7e:95:c8 (try 2/3)
[ 1075.750000] wlan0: send auth to 72:53:d4:7e:95:c8 (try 3/3)
[ 1075.760000] wlan0: authenticated
[ 1075.770000] wlan0: associate with 72:53:d4:7e:95:c8 (try 1/3)
[ 1076.210000] wlan0: associate with 72:53:d4:7e:95:c8 (try 2/3)
[ 1076.280000] wlan0: associate with 72:53:d4:7e:95:c8 (try 3/3)
[ 1076.370000] wlan0: association with 72:53:d4:7e:95:c8 timed out
[ 1107.090000] wlan0: authenticate with 72:53:d4:7e:95:c8
[ 1107.100000] wlan0: send auth to 72:53:d4:7e:95:c8 (try 1/3)
[ 1107.340000] wlan0: send auth to 72:53:d4:7e:95:c8 (try 2/3)
[ 1107.640000] wlan0: send auth to 72:53:d4:7e:95:c8 (try 3/3)
[ 1107.650000] wlan0: authenticated
[ 1107.660000] wlan0: associate with 72:53:d4:7e:95:c8 (try 1/3)
[ 1107.960000] wlan0: associate with 72:53:d4:7e:95:c8 (try 2/3)
[ 1108.010000] wlan0: associate with 72:53:d4:7e:95:c8 (try 3/3)
[ 1108.050000] wlan0: association with 72:53:d4:7e:95:c8 timed out
[ 1138.780000] wlan0: authenticate with 72:53:d4:7e:95:c8
[ 1138.790000] wlan0: send auth to 72:53:d4:7e:95:c8 (try 1/3)
[ 1138.800000] wlan0: authenticated
[ 1138.810000] wlan0: associate with 72:53:d4:7e:95:c8 (try 1/3)
[ 1139.760000] wlan0: associate with 72:53:d4:7e:95:c8 (try 2/3)
[ 1139.940000] wlan0: associate with 72:53:d4:7e:95:c8 (try 3/3)
[ 1140.080000] wlan0: association with 72:53:d4:7e:95:c8 timed out
[ 1199.750000] wlan0: authenticate with 72:53:d4:7e:95:c8
[ 1199.760000] wlan0: send auth to 72:53:d4:7e:95:c8 (try 1/3)
[ 1199.780000] wlan0: authenticated
[ 1199.790000] wlan0: associate with 72:53:d4:7e:95:c8 (try 1/3)
[ 1200.450000] wlan0: associate with 72:53:d4:7e:95:c8 (try 2/3)
[ 1200.910000] wlan0: associate with 72:53:d4:7e:95:c8 (try 3/3)
[ 1201.000000] wlan0: association with 72:53:d4:7e:95:c8 timed out
[ 1260.660000] wlan0: authenticate with 72:53:d4:7e:95:c8
[ 1260.670000] wlan0: send auth to 72:53:d4:7e:95:c8 (try 1/3)
[ 1261.450000] wlan0: send auth to 72:53:d4:7e:95:c8 (try 2/3)
[ 1262.010000] wlan0: send auth to 72:53:d4:7e:95:c8 (try 3/3)
[ 1262.070000] wlan0: authentication with 72:53:d4:7e:95:c8 timed out
[ 1321.750000] wlan0: authenticate with 72:53:d4:7e:95:c8
[ 1321.760000] wlan0: send auth to 72:53:d4:7e:95:c8 (try 1/3)
[ 1322.490000] wlan0: send auth to 72:53:d4:7e:95:c8 (try 2/3)
[ 1323.010000] wlan0: send auth to 72:53:d4:7e:95:c8 (try 3/3)
[ 1323.230000] wlan0: authentication with 72:53:d4:7e:95:c8 timed out
[ 1382.890000] wlan0: authenticate with 72:53:d4:7e:95:c8
[ 1382.900000] wlan0: send auth to 72:53:d4:7e:95:c8 (try 1/3)
[ 1382.910000] wlan0: authenticated
[ 1382.930000] wlan0: associate with 72:53:d4:7e:95:c8 (try 1/3)
[ 1383.700000] wlan0: associate with 72:53:d4:7e:95:c8 (try 2/3)
[ 1384.150000] wlan0: associate with 72:53:d4:7e:95:c8 (try 3/3)
[ 1384.200000] wlan0: association with 72:53:d4:7e:95:c8 timed out
[ 1443.850000] wlan0: authenticate with 72:53:d4:7e:95:c8
[ 1443.860000] wlan0: send auth to 72:53:d4:7e:95:c8 (try 1/3)

90% of the times I got this, it was the hotspot. Once I rebooted it (the office wifi hotspot, not the yun) everything went fine again

Regarding the sd card, if it has never worked, you should send an email to support@arduino.cc

Hi, thanks - that is a fair point as i hadn't tried rebooting the router so will try that now. The SD card has showed up once so i know it works but i rebooted to fix the Wifi and never saw it again.

Ugh, sorry to resurrect this thread, but I too am having this issue regularly. Rebooting the router fixes this, but this is not an option for me as I need to access this system from a remote mifi. I've tried three different Mifi devices, and they both exhibit the same issues. It's been plaguing me for months. Same exact symptoms as the above log files, and a reboot fixes it very temporarily.

Please upgrade your Yún - latest is 1.5.3

http://forum.arduino.cc/index.php?topic=279008.0

Remove wifi-live-or-reset:

nano /etc/rc.local
# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.

#wifi-live-or-reset
boot-complete-notify

Use Watchcat to reboot on wifi drop:

Watchcat reboot on internet drop

Get wifi signal strength:

/usr/bin/pretty-wifi-info.lua
Current WiFi configuration
SSID: DG1670AA2
Mode: Client
Signal: 100%
Encryption method: WPA2 PSK (CCMP)
Interface name: wlan0
Active for: 4 minutes
IP address: 192.168.0.122/255.255.255.0
MAC address: 90:A2:DA:F0:06:76
RX/TX: 78/128 KBs

Signal: 100%

Make sure no too strong neighbor, select less crowd channel at Mifi devices:

https://forum.arduino.cc/index.php?topic=188101.msg1580622#msg1580622

supersleeper:
Ugh, sorry to resurrect this thread, but I too am having this issue regularly. Rebooting the router fixes this, but this is not an option for me as I need to access this system from a remote mifi. I've tried three different Mifi devices, and they both exhibit the same issues. It's been plaguing me for months. Same exact symptoms as the above log files, and a reboot fixes it very temporarily.

@supersleeper,
the reason we (at least I) don't want to revive these old thread is because almost always they are unrelated to the issue. In future, just point to the thread - this will help us more.

On your issue, SonnyYu is giving you good advice. In addition, you should check your software and make sure you have the latest update for your Yun (and not just the IDE).

TIA
Jesse

Hi Jesse and Sonnyyu,

Understood. I verified that the log entries I get in dmseg is exactly the same as what is in this thread so as not to add confusion or deviation. I've also already attempted to remove wifi-live-or-reset and adjusted my channels to unused frequencies. Upgrading my firmware is a major undertaking for me as I'd need to re-install and re-configure all that I've accomplished under Linino so far. If I were able to do this without losing everything, it'd be trivial for me.

I'm still trying to hash this out and I have been toying with a custom watchdog script of my own debugging specific things:

logfile="/mnt/sda1/arduino/www/logs/alarm.log"
logit () {
echo "$(date +%Y/%m/%d" - "%T" - ") $@" >> "$logfile"
}

logit "Checking Network"

ping mydomain.com -c 1
if test "$?" = "1"
then logit "Cannot connect to mydomain.com, restarting network"
/etc/init.d/network restart
sleep 5
ping mydomain.com -c 1
if test "$?" = "1"
then logit "Second attempt cannot connect to mydomain.com, restarting network"
/etc/init.d/network stop
sleep 10
/etc/init.d/network start
sleep 5
/etc/init.d/autossh restart
ping mydomain.com -c 1
if test "$?" = "1"
then logit "Third attempt cannot connect to mydomain.com, restarting network"
ifdown lan
sleep 10
ifup lan
sleep 5
/etc/init.d/autossh restart
fi
else logit "Second attempt succeeded"
/etc/init.d/autossh restart
fi
else logit "Connection succeeded"
fi

sleep 5

logit "Checking Autossh"
echo
ps | grep -v grep | grep autossh
echo
ps | grep -v grep | grep -q autossh
if test "$?" = "1"
then logit "Autossh offline, restarting"
echo Not Running
/etc/init.d/autossh restart
else logit "Autossh running"
echo Running
fi

But this is only a workaround so that I don't become completely isolated from Linino. So far the only constant is that I get de-authed from my SSID and it attempts to reconnect three times and quits, just as in the syslog above.

forgot to add, this is my current version of Linux, but don't know what "linino" specific version as I only have SSH at the moment:

Linux version 3.3.8 (jenkins@jenkins) (gcc version 4.6.3 20120201 (prerelease) (Linaro GCC 4.6-2012.02) ) #1 Fri Nov 14 08:57:34 CET 2014

LOL, ok, read the "update" thread. Turns out I'm already on the latest, so...

root@330ci:~# cat /etc/arduino/openwrt-yun-release
built=Fri Nov 14 03:53:51 CET 2014

@supersleeper,

You can NOT work around this wifi problem. You might be able to skip the software upgrade, but you need to do as SonnyYu suggested.

To reiterate:

  • Backup your software on the Yun.
  • Buy a new SD
  • Install and update the latest software (as pointed to by SonnyYu
  • Check your wifi neighbors. Too many neighbors is a common problem.
  • Here is yet another wifi test tool ArduinoYun-Wifi-Info

Jesse

jessemonroy650:
@supersleeper,

You can NOT work around this wifi problem. You might be able to skip the software upgrade, but you need to do as SonnyYu suggested.

To reiterate:

  • Backup your software on the Yun.
  • Buy a new SD
  • Install and update the latest software (as pointed to by SonnyYu
  • Check your wifi neighbors. Too many neighbors is a common problem.
  • Here is yet another wifi test tool ArduinoYun-Wifi-Info

Jesse

Hi Jesse, you might have missed my last post, but I've already done all these things. Software was updated earlier this year (1.5.3), but maybe this version is too aggressive? and have already accounted for wifi channel conflicts. Also, my SD card is the fastest available on the market, so should be no latency issues with the OS needing to wait on the file system.

supersleeper:
Hi Jesse, you might have missed my last post, but I've already done all these things. Software was updated earlier this year (1.5.3), but maybe this version is too aggressive? and have already accounted for wifi channel conflicts. Also, my SD card is the fastest available on the market, so should be no latency issues with the OS needing to wait on the file system.

@supersleeper,
okay. This was not clear to me. I will assume you got it done.

As for your issue, try that last wifi test tool and see what you get.

Specifically on your issue. There are only three steps remaining.

  1. you are too close to a piece of metal that is reflecting your wifi signal (see first attached image).
    In the picture, to the right of the Yun is an aluminum pole that holds the window in place. This cause the type of wifi issues you are having. TO FIX move the arudino at least 24 inches from the metal pole and 24 inches from other wifi radios (such as the wifi on my laptop). For the picture you see, I placed my Yun on the seat next to me or the seat across from me, both worked equally well.

NOTE: the wifi AP I was using at this location was flakey. So, it would go done on a regular basis. When I lost the wifi signal from my laptop, I would break out my cellphone and run the Wifi Analyzer. More often than not, they were having the wifi problem, and NOT my Yun.

  1. Try a wifi antenna and see if this fixes your issue. Google arduino yun wifi antenna sonnyyu
    Here are two relate articles
    Mystery component on Yun board?
    Mystery component on Yun board? - Arduino Yún - Arduino Forum

Arduino Yún as a possible Mesh Extender Platform

  1. You need to RMA your Yun. Return under warranty to factory.

Jesse

jessemonroy650:

  1. you are too close to a piece of metal that is reflecting your wifi signal (see first attached image).
    In the picture, to the right of the Yun is an aluminum pole that holds the window in place. This cause the type of wifi issues you are having. TO FIX move the arudino at least 24 inches from the metal pole and 24 inches from other wifi radios (such as the wifi on my laptop). For the picture you see, I placed my Yun on the seat next to me or the seat across from me, both worked equally well.

Doh! I suppose this instantly classifies the Yun as not useable within the context of a motor vehicle :(. Ugh, I put so much work into this! Currently impossible to relocate this to where it's greater that 2' from metal. Even the Mifi device is only 3' away from the Yun. Well this could be REALLY ugly but I suppose I'd have to tether the Yun to the Mifi USB port. Problem is no other devices could use the Mifi which completely defeats it's purpose in my car. The other issue with the tether is it would draw too much power as it wants to charge the Mifi as well. So many challenges to overcome.

supersleeper:
Doh! I suppose this instantly classifies the Yun as not useable within the context of a motor vehicle :(. Ugh, I put so much work into this! Currently impossible to relocate this to where it's greater that 2' from metal. Even the Mifi device is only 3' away from the Yun. Well this could be REALLY ugly but I suppose I'd have to tether the Yun to the Mifi USB port. Problem is no other devices could use the Mifi which completely defeats it's purpose in my car. The other issue with the tether is it would draw too much power as it wants to charge the Mifi as well. So many challenges to overcome.

@supersleeper,

Use an antenna. Follow the link provide and you'll find plenty of alternatives. You should be able to have a 2 foot cable that ends with an antenna. Let me know it this works for you.

Jesse

jessemonroy650:
@supersleeper,

Use an antenna. Follow the link provide and you'll find plenty of alternatives. You should be able to have a 2 foot cable that ends with an antenna. Let me know it this works for you.

Jesse

Hmm, last I checked a few weeks ago, getting the right antenna was still a little sketchy/pricey. I noticed the Dragino came with one and was trying to hunt down the part hoping it's similar connector, but haven't had much luck yet. I'll poke around a bit again and see what I can't find.

Yun's design does not support external antenna. The cable connector is for ART (Atheros Radio Test) only.
The build in antenna's gain is only ~-0.5 dbi, plus AR9331 only has 17 dbm output power.

sonnyyu:
Yun's design does not support external antenna. The cable connector is for ART (Atheros Radio Test) only.
The build in antenna's gain is only ~-0.5 dbi, plus AR9331 only has 17 dbm output power.

@sonnyYu,

The external antenna connector is not good?
Why have connector?

Jesse

jessemonroy650:
@sonnyYu,

The external antenna connector is not good?
Why have connector?

Jesse

It is for calibrate radio (Atheros Radio Test) of AR9331 during manufacture stage, equalize all the channel (1-13) output power to make FCC happy. That answer why it only last ~100 times connect, for external antenna second connector is needed.

sonnyyu:
It is for calibrate radio (Atheros Radio Test) of AR9331 during manufacture stage, equalize all the channel (1-13) output power to make FCC happy. That answer why it only last ~100 times connect, for external antenna second connector is needed.

Thank You
Jesse