Go Down

Topic: Wifi very unstable (Read 5 times) previous topic - next topic

anotherguy

I received the yun a few days ago.  However I have had many problems getting it working. :-(
The big problem is wifi.
I have a 20Mhz 802.11bgn access point.
I have managed to connect to the Yun via its wifi AP and change the password and type in my wifi network settings.
However the Yun only connects to the wifi intermittently and I don't understand why.
I have lost count of the times I have had to reset the wifi settings via the wlan RST switch.
I tried changing the power supply from microSD from Laptop USB or 1A 5V HTC charger (both measure 4.8V at Vin) and instead I tried a 12V 2A supply via a breadboard power supply to give 4.87V directly into Vin.  But still the wifi is intermittent.
Anyone have any ideas how I can diagnose the wifi troubles?

fermino

#1
Oct 13, 2013, 02:04 am Last Edit: Oct 13, 2013, 11:03 am by fermino Reason: 1
You could start here http://forum.arduino.cc//index.php?topic=192869.0.

When I've first powered up my yun and landed on the login page, it took me a couple of "factory configuration" resets (just press the WLAN lateral reset button for more than 30 seconds and it will start again factory-fresh) before I could really connect it on the local WLAN (not the Yun-Access-Point you've got the first time).

Also consider that, according to my own experience, from powering up the board to having a fully functional wlan, it takes around 1 and 2 minutes (I haven't measured with a clock) so most of the times if it doesn't work immediately, it will in a while.

After that, it is rock-solid.

You could also have misconfigured the wlan settings on the yun.

Or, it could an issue eventually related to your wlan router, consider that some of them are a bit pricky for several reasons.

Federico Fissore

For the record, most of the times (probably every time) I've had trouble with wifi it was a router issue.
Let the Yun do its job: after 60 seconds trying to connect to your router, if it fails it will reboot in access point mode and the webpanel will show the output of the wifi driver attempts
Attach that big textarea to the forum and we'll look for a solution.
Have you upgraded the Yún? If you've just got it, then it needs to be upgraded! Check out the tutorial

anotherguy

Thanks guys.  Today the wlan is very stable.

When it wasn't working I did see a message via the Yun AP login screen which said "changed bandwidth in a way we can't support - disconnect"

I thought the problem might have been because my router supports 300Mbps 40Mhz channel width. After I disabled it and went back to 150Mbps 20Mhz channel width then things became stable.
However today I switched it back to 40Mhz channel width and the wlan connection seems stable so far.  I will update here if it becomes unstable again.

anotherguy

I was wrong when I said changing my wifi AP to 20Mhz fixed the problem.  Today wlan is not working again.

Here is the log from the console which shows the problem.

Code: [Select]

[   51.090000] cfg80211: Calling CRDA for country: GB
[   51.090000] cfg80211: Regulatory domain changed to country: GB
[   51.090000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[   51.100000] cfg80211:   (2402000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[   51.100000] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[   51.100000] cfg80211:   (5250000 KHz - 5330000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[   51.110000] cfg80211:   (5490000 KHz - 5710000 KHz @ 40000 KHz), (N/A, 2700 mBm)
[   55.000000] wlan0: authenticate with f4:ec:38:9f:c9:2d
[   55.050000] wlan0: send auth to f4:ec:38:9f:c9:2d (try 1/3)
[   55.090000] wlan0: authenticated
[   55.100000] wlan0: associate with f4:ec:38:9f:c9:2d (try 1/3)
[   55.100000] wlan0: RX AssocResp from f4:ec:38:9f:c9:2d (capab=0x431 status=0 aid=3)
[   55.100000] wlan0: associated
[   55.130000] wlan0: AP f4:ec:38:9f:c9:2d changed bandwidth, new config is 2412 MHz, width 1 (2412/0 MHz)
[   55.130000] wlan0: AP f4:ec:38:9f:c9:2d changed bandwidth in a way we can't support - disconnect
[   55.170000] wlan0: deauthenticating from f4:ec:38:9f:c9:2d by local choice (reason=1)
[   56.100000] wlan0: authenticate with f4:ec:38:9f:c9:2d
[   56.150000] wlan0: send auth to f4:ec:38:9f:c9:2d (try 1/3)
[   56.160000] wlan0: authenticated
[   56.190000] wlan0: associate with f4:ec:38:9f:c9:2d (try 1/3)
[   56.190000] wlan0: RX AssocResp from f4:ec:38:9f:c9:2d (capab=0x431 status=0 aid=3)
[   56.190000] wlan0: associated
[   56.260000] wlan0: AP f4:ec:38:9f:c9:2d changed bandwidth, new config is 2412 MHz, width 1 (2412/0 MHz)
[   56.260000] wlan0: AP f4:ec:38:9f:c9:2d changed bandwidth in a way we can't support - disconnect
[   57.620000] wlan0: authenticate with f4:ec:38:9f:c9:2d
[   57.670000] wlan0: send auth to f4:ec:38:9f:c9:2d (try 1/3)
[   57.670000] wlan0: authenticated
[   57.720000] wlan0: associate with f4:ec:38:9f:c9:2d (try 1/3)
[   57.720000] wlan0: RX AssocResp from f4:ec:38:9f:c9:2d (capab=0x431 status=0 aid=3)
[   57.720000] wlan0: associated
[   57.790000] wlan0: AP f4:ec:38:9f:c9:2d changed bandwidth, new config is 2412 MHz, width 1 (2412/0 MHz)
[   57.800000] wlan0: AP f4:ec:38:9f:c9:2d changed bandwidth in a way we can't support - disconnect


FYI my TP-link WA901N wifi AP has default settings.  I have many wifi devices and the Yun is the only one which has a problem.
Here are my wifi AP settings:
Name (SSID):   NETWORK2
Channel:   1
Mode:   11bgn mixed
Channel Width:   20MHz
Max Tx Rate:   130Mbps
Beacon 100
RTS threshold 2346
FRagmentation threshold 2346
DTIM interval 1
security WPA2-PSK

Federico Fissore

Argh.. this seems like a wifi module bug.
Fedora seems to have solved it for kernel 3.10 https://bugzilla.redhat.com/show_bug.cgi?id=981445 while kernel hackers are still silent https://bugzilla.kernel.org/show_bug.cgi?id=58561

Can you force your access point to stick with one frequency (say 20Mhz) and stop switching back and forth?
Have you set the timezone of the yun correctly (it affects how wifi behaves) ? Which is your timezone btw?
Have you upgraded the Yún? If you've just got it, then it needs to be upgraded! Check out the tutorial

anotherguy

Thanks for the info.  It's fun to be on the bleeding edge.
I can force my AP to stick to 20Mhz but not sure that this will prevent the problem.  I will monitor for a few days and report back.
My timezone is set through the Arduino control panel (where the password is changed) as Europe/London.  Is that what you mean?

anotherguy

I just found another timezone in the Luci panel System>System.  It was set to UTC but now it is Europe/London too.
The two timezones were different.  Could that cause the problem?

Federico Fissore


My timezone is set through the Arduino control panel (where the password is changed) as Europe/London.  Is that what you mean?

Yes

I just found another timezone in the Luci panel System>System.  It was set to UTC but now it is Europe/London too.
The two timezones were different.  Could that cause the problem?

Shouldn't, but I'll investigate. Thanks for reporting
Have you upgraded the Yún? If you've just got it, then it needs to be upgraded! Check out the tutorial

anotherguy

For the sake of posterity I can confirm that forcing my wlan AP to stick to 20Mhz (ie. max 150Mbps) means that the yun has a stable wlan connection as far as I can tell.

Federico Fissore

Have you upgraded the Yún? If you've just got it, then it needs to be upgraded! Check out the tutorial

pitor

I also have a very unstable wifi. Sometimes it's working but most of the time it's not.

I get a lot of those messages in serial monitor:
Code: [Select]

  229.630000] wlan0: authenticate with 7c:03:4c:d8:06:fb
[  229.680000] wlan0: send auth to 7c:03:4c:d8:06:fb (try 1/3)
[  229.710000] wlan0: authenticated
[  229.720000] wlan0: associate with 7c:03:4c:d8:06:fb (try 1/3)
[  229.730000] wlan0: RX AssocResp from 7c:03:4c:d8:06:fb (capab=0x431 status=0 aid=7)
[  229.730000] wlan0: associated
[  232.930000] wlan0: disassociated from 7c:03:4c:d8:06:fb (Reason: 2)
[  232.940000] wlan0: deauthenticating from 7c:03:4c:d8:06:fb by local choice (reason=3)


My router doesn't allow me to tweak the wifi settings very much. I can basically set only set channels and choose between b/g or b/g/n modes. It doesn't seem to make any difference.

Is this the same module bug as the one mentioned previously in this thread?

I have attached full log of my boot from YunSerialTerminal.

greetings from Denmark
/Piotr

fernandoybus

I have the same problem.
My wifi is instable.
The Yun lost connection after a few days.
I tried with the wifi of my mobile phone and the same happens.

Can someone help me?

AdydasNZ

I had the same issue, i have since upgraded the router and the problem went away - i noted the issue as being distance related (and walls) as when the Yun was in the same room or closer to that end of the house the issue went away.

Solution options in my opinion:


[Move wifi closer to where you use the Yun
get a wifi repeater and run that in a room closer to where you use the Yun
Get a newer / better brand of router that has stronger wifi output



fernandoybus

I am still having problems with it.
It keeps loosing the configuration to connect to the wifi.

Go Up