Bug 1636 - Wifi Connectivity problems due to reduced wlan_sleep_timeout
: Wifi Connectivity problems due to reduced wlan_sleep_timeout
Status: RESOLVED FIXED
Product: Connectivity
WiFi
: 3.2
: N800 other
: Low major with 8 votes (vote)
: 4.0
Assigned To: unassigned
: wifi-bugs
:
: moreinfo
:
:
  Show dependency tree
 
Reported: 2007-07-10 00:01 UTC by Ton
Modified: 2009-01-25 16:11 UTC (History)
9 users (show)

See Also:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description Ton (reporter) 2007-07-10 00:01:14 UTC
wlan_sleep_timeout is by default set too short which causes many websites not
being loaded.
Setting wlan_sleep_timeout to the previous default of 1000 solves the problem.

My WLAN AP is a "La Fonera" (www.fon.com) with the latest firmware installed
and WEP as protection scheme.
Comment 1 Neil MacLeod maemo.org 2007-07-10 01:16:55 UTC
Just a comment to add some background.

This problem - low Power Save Mode (PSM) timeout - affects only certain access
points, and was discussed some time ago on the maemo developers mailing list
here[1].

With 4.2007.26-8, the PSM timeout changed from 1000ms (the default in
3.2007.10-7) to a much lower value, possibly 200ms. 

To fix the problem in 4.2007.26-8, run the following command in xterm (root
access not required):

gconftool-2 --set --type int '/system/osso/connectivity/IAP/wlan_sleep_timeout'
'1000' 

Where '1000' represents 1000ms. Keep trying smaller values until you experience
WiFi connectivity (ie. browsing) issues. Smaller values will lead to improved
battery lifetime, and some users who have experienced this problem have been
able to use values of around 400 and 500[2].

Anyone who is experiencing this problem should add a comment to this bug with
their access point details (make, model, firmware) and the lowest workable
timeout for their setup - this might help Nokia implement an appropriate longer
term solution.

@Nokia/Maemo: In the future, would it be possible to add an advanced
*per-connection* GUI checkbox option allowing the user to choose between a fast
timeout (better battery) or slow timeout (worse battery) configuration? If not
a checkbox, perhaps a list of timeout values between 100ms and 1000ms in 100ms
increments, with 200ms the default?


1. http://www.gossamer-threads.com/lists/maemo/users/18057#18057
2. http://www.internettablettalk.com/forums/showthread.php?p=58344#post58344
Comment 2 JK 2007-07-10 02:30:51 UTC
I have ZyXEL P-660HW ADSL WLAN Router with latest firmware and after latest
N800 firmware upgrade some www-sites stopped working. That's very weird because
most sites worked. I was very confused and thought some www-sites had technical
difficulties until i read ITT forums and noticed some other users had exactly
same problem. I changed wlan_sleep_timeout value and sites with loading
problems started to work again.

PSM values 1000, 500, 400 works. 200 and 300 doesn't.

Some guy had also problems with same Zyxel router and PSM, see this bug:
https://bugs.maemo.org/show_bug.cgi?id=1147
Comment 3 Paweł T. Jochym 2007-07-10 11:45:38 UTC
I have the same issue. I have tested with three AP and here are the results:

1) Linksys 54g, works (downloaded 200M of data)
2) Freecom FSG-3 with last year firmware, wep. does not work.
3) Fonera with latest firmware, wap2. does not work.

After changing the setting to 1000 it works somewhat better, but I'm not sure
if it is back to normal. And FSG-3 seems to still have some issues. I'll report
final results later.
Comment 4 Jake Kunnari 2007-07-10 13:19:29 UTC
Status changed to invalid. Works fine with default settings, tested with
Linksys Wlan router WAP54G/WRT54G, Zyxel Prestige 660HW Series, Apple AirPort.
Comment 5 Ton (reporter) 2007-07-10 13:32:13 UTC
Sorry, i insist in reopening this issue. The problem does exist for the routers
mentioned in this issue. Please don't close the issue until a new configuration
setting is proposed for the next update.
Comment 6 Tim Samoff maemo.org 2007-07-11 05:20:41 UTC
My wifi connection has been working great since the firmware upgrade... Until
today. Now, the N800 sees the access point, but refuses to actually connect to
it (i.e., the connection icon flashes indefinitely).

I'm not sure if this is the same bug -- most people seem like they're
connecting, but with less than optimal performace -- but, I thought I'd add it
here.
Comment 7 Neil MacLeod maemo.org 2007-07-11 07:21:04 UTC
(In reply to comment #6)
> My wifi connection has been working great since the firmware upgrade... Until
> today. Now, the N800 sees the access point, but refuses to actually connect to
> it (i.e., the connection icon flashes indefinitely).
> 
> I'm not sure if this is the same bug -- most people seem like they're
> connecting, but with less than optimal performace -- but, I thought I'd add it
> here.
> 
Tim - it's probably best to keep this bug focused on the connectivity issues
that stem from the reduced wlan_sleep_timeout setting in 4.2007.26-8. If your
problem isn't resolved by increasing wlan_sleep_timeout then please open a
separate bug.
Comment 8 Neil MacLeod maemo.org 2007-07-11 07:22:45 UTC
Attempting to modify bug "Summary" in order to make it less general - not sure
it's going to work.

From: Wifi Connectivity problems
To: Wifi Connectivity problems due to reduced wlan_sleep_timeout
Comment 9 Jussi Kukkonen 2007-07-11 14:46:52 UTC
I'm seeing this too.

APs:
 * up-to-date La Fonera
 * D-Link DI-514 (firmware 1.05.04 from 2005.04.27)

The previous firmwares worked fine with both APs. With 4.2007.26-8 La Fonera is
pretty much unusable, and the problem is noticeable on the D-Link too.
Comment 10 Ton (reporter) 2007-07-11 16:10:07 UTC
La Fonera works for me when i set the timeout back to 1000 like it was in the
previous firmware.
Comment 11 RobMtl007 2007-07-11 18:57:41 UTC
Greetings:

I have entered every possible number in the command line.

I am still having problems loading HTTPS websites.

My theory is there it must be a bug with Linksys B routers WEP enabled.

When I go to my favorite Internet Cafe, they have a Linksys G , WEP disabled,
my N800 works perfectly.

Can someone find somewhere in the world a Linksys B router and test my theory.

If I upgrade to a Linksys G router, WEP enabled, will I keep on having the same
problem?

This is very frustrating for a normal user of a N800.

Regards Robert
Comment 12 Tim Samoff maemo.org 2007-07-12 15:53:43 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > My wifi connection has been working great since the firmware upgrade... Until
> > today. Now, the N800 sees the access point, but refuses to actually connect to
> > it (i.e., the connection icon flashes indefinitely).
> > 
> > I'm not sure if this is the same bug -- most people seem like they're
> > connecting, but with less than optimal performace -- but, I thought I'd add it
> > here.
> > 
> Tim - it's probably best to keep this bug focused on the connectivity issues
> that stem from the reduced wlan_sleep_timeout setting in 4.2007.26-8. If your
> problem isn't resolved by increasing wlan_sleep_timeout then please open a
> separate bug.
> 

Thanks. I thought it might be related, but since it's not, I'll open a new bug.
Comment 13 Paweł T. Jochym 2007-07-19 13:02:43 UTC
I have some further problems with new firmware. It seams that the sleep value
helps somewhat with some access points but not always. Some APs work (linksys
wep54g) some work only for short transfers from some sites. I've just tested
with two: LaFonera and Freecom FSG-3. Both have the same issue (with 1s wlan
timeout) after some 2-6MB of transfer the transfer stops. I have checked with
two browsers (opera and microb) and wget. The result is the same. The browsing
usually works since the transfers are shorter, but the issue is far from
resolved!
Comment 14 Kalle Valo nokia 2007-07-20 00:04:28 UTC
(In reply to comment #1)
> Just a comment to add some background.
> 
> This problem - low Power Save Mode (PSM) timeout - affects only certain access
> points, and was discussed some time ago on the maemo developers mailing list
> here[1].

Yes, that's what I suspect here. If increasing wlan_sleep_timeout helps it's
most likely a WLAN PSM issue. But I would need full airlogs (ie. WLAN level
sniffer capture) to verify that.

> With 4.2007.26-8, the PSM timeout changed from 1000ms (the default in
> 3.2007.10-7) to a much lower value, possibly 200ms. 

I posted some details here:

http://lists.maemo.org/pipermail/maemo-users/2007-July/006021.html

Please note also the new variable inactive_wlan_sleep_timeout.

> To fix the problem in 4.2007.26-8, run the following command in xterm (root
> access not required):
> 
> gconftool-2 --set --type int '/system/osso/connectivity/IAP/wlan_sleep_timeout'
> '1000' 
> 
> Where '1000' represents 1000ms. 

With the latest release you have to set also inactive_wlan_sleep_timeout.

> Keep trying smaller values until you experience
> WiFi connectivity (ie. browsing) issues. Smaller values will lead to improved
> battery lifetime, and some users who have experienced this problem have been
> able to use values of around 400 and 500[2].

Actually changing the timeout only affects the probability of triggering the
bug, it will not make the bug go away completely. You will just see it much
more rarely. 

Also the traffic pattern has a huge effect on WLAN PSM bugs, and especially the
time between last transmitted packet and received packet. If that time is
usually around 400 ms, having 500 ms sleep timeout will reduce the probability
of seeing the bug significantly. But if the time between last transmitted and
received packets is usually about 600 ms, with 500 ms sleep timeout you would
see the bug quite often.

> Anyone who is experiencing this problem should add a comment to this bug with
> their access point details (make, model, firmware) and the lowest workable
> timeout for their setup - this might help Nokia implement an appropriate longer
> term solution.

Exactly. Especially make, model and firmware version are crucial information
for us for ananlysing the problem. Also specify the use case or traffic pattern
how the bug usually comes up, for example did you just read different web pages
or listened to Internet Radio.

> @Nokia/Maemo: In the future, would it be possible to add an advanced
> *per-connection* GUI checkbox option allowing the user to choose between a fast
> timeout (better battery) or slow timeout (worse battery) configuration? If not
> a checkbox, perhaps a list of timeout values between 100ms and 1000ms in 100ms
> increments, with 200ms the default?

We have been planning about this. I think it would help with the users having
WLAN PSM problems. Should this be global setting or per IAP setting, any
opinions or wishes?
Comment 15 Jussi Kukkonen 2007-07-20 11:44:59 UTC
I wrote in comment #9:
> I'm seeing this too.
> 
> APs:
>  * up-to-date La Fonera
>  * D-Link DI-514 (firmware 1.05.04 from 2005.04.27)
> 

After more testing, I'm withdrawing the DI-514 from the list: the router seems
to have other problems of its own (not related to n800).
Comment 16 Neil MacLeod maemo.org 2007-07-20 14:31:11 UTC
(In reply to comment #14)
> 
> We have been planning about this. I think it would help with the users having
> WLAN PSM problems. Should this be global setting or per IAP setting, any
> opinions or wishes?
> 

Since it's access point specific, and has battery lifetime implications, I'd
have thought per IAP setting would be more appropriate. If a user occasionaly
connects to an AP with the PSM problem (eg. a work AP) then making this a
global setting will result in reduced battery lifetime even when the user is
connected to an access point (eg. home) that does not suffer from the PSM
problem.
Comment 17 csaba.paradi 2007-07-25 23:58:47 UTC
I had connection and stability problems with La Fonera router with the
4.2007.26-8 firmware, the previous firmware worked fine.

Setting the wlan_sleep_timeout back to 1000 helped, but I sometimes still have
connection errors after a manual disconnection.

So please implement a per connection GUI for this setting !

Thanks!
Comment 18 Ton (reporter) 2007-07-26 01:01:04 UTC
Seems that the problem with "La Fonera" can be limited by hiding the private
SSID. 
This can be done with modified firmware of the "La Fonera". I tried this and i
could bring the timeout value back from 1000 to 500.
Comment 19 gyesspam 2007-08-04 14:13:13 UTC
Same problem here with a Kraun access point. It gets better if I disable SSID
broadcasting, but still, no matter what wlan_sleep_timeout value I use, the
problem is painful when it comes to incoming connections (i.e. ssh server).
Comment 20 Randall Arnold 2007-08-30 17:06:25 UTC
I agree with Neil's suggestions, particularly the per-IAP setting.

I just realized I have been occasionally experiencing this but so rarely and
briefly that I essentially ignored it.
Comment 21 Klaus Anderson nokia 2007-12-18 21:45:23 UTC
Please report if OS2008 brings any improvement to this matter.

Also note that it is now possible to adjust the power saving settings also from
the UI: this can be found from the advanced tab at the end of connection
settings. The intermediate value uses 4000ms timeout, which should work much
better than the original OS2007 value (which was 1000ms).
Comment 22 Pelle Johnsen 2008-01-16 00:36:04 UTC
I've experienced this problem on N810 running OS2008 2.2007.50-2 connecting to
a Zyxel P-2602HW-D1A, Firmware V3.40(AOM.2) | 11/20/2007.

After switching the PSM setting for the connection from Maximum to Intermediate
everything seems to work just fine :)

 -Pelle
Comment 23 Mattia Salamanca Orrego 2008-06-23 14:27:56 UTC
Dear Maemo Team,
I'm sorry to reopen this bug
Well, a year after the last post, sadly i have to report an other n800 - AE n
Base station faillure (7.2.1 and 7.3.1 firmware versions).

I'm sure it is the nokia, I'm systematically able to reproduce the crash. 
especially with data stream, like youtube (flash 9 plugin) or torrent.

I have tried with os 2007, vanilla 2008 and updated 2008 (all apt-get updates
applied) but not Diablo. The Router is crashing with all aforementioned
softwares. Otherwise, with all my gears but the n800 i can stress the net as
long as I want (multiple youtube streams, VoIP, Skype, bittorrent, etc). I've
noticed that the base station does not crash with the n800 alone (well tried
once yesterday night). I also got a new base station, apple exchanged it with
no questions: so we have 2 AE n base stations and same crash.

Is there any suggestion? I would like to try tweaking N800 wireless drivers
(Like changing the MTU), do you think it will be useful?


I forgot to mention I'm using my AE n in "Router mode", PPPoE and WPA2
Personal.

Thank you very much, heyda!
Mattia
Comment 24 Mattia Salamanca Orrego 2008-06-24 18:56:37 UTC
Well, I've just flashed with Diablo... With standard Wlan PWR savings it is
still producing the cras. But with "intermediate" settings it looks better
(I've downloaded 3 youtube videos): but I need much more testing. If the
solution is here, I'll be the happiest man in the Troubleshooting Forum.

P.S.
After 200MB i saw no crash. Looks like the maemo team has found a software
workaround, but I want to be cautious.

P.P.S.

Mara, a member of ITT forum community posted interesting remarks on the
subject. I place them here.

Nice if it is working better... obviously the AE doesn't like the most
aggressive power saving mode of N800?

More good to know info about WLAN power saving mode and operation:
http://www.icnp2007.edu.cn/files/ICN...Throttling.pdf

Maybe if someone knows where to download IEEE spec for the 802.11 standard and
the PSM mode in particular... What would be interesting to know what is the
maximum allowed sleep time, if there is any? (Isn't it really defined by the
beacon interval that is set in the router?) Maybe changing the beacon interval
to shorter time would help/solve the issue?

EDIT: Just found this from IEEE... not sure if it is helpful:
http://ieeexplore.ieee.org/iel5/4489...1/04489282.pdf

EDIT2: Paragraph 2.1 in this document seem to describe the PSM operation quite
nicely:
http://info.iet.unipi.it/~anastasi/papers/wiopt04.pdf
Comment 25 Neil MacLeod maemo.org 2008-07-16 12:29:17 UTC
Mattia - although changing the wireless timeout may improve the stability of
the AE router, I would suggest that you open a new bug about your AE router
crashing when connected to the Nokia... this bug relates to instability of the
Nokia WiFi connection, not the instability of the router, and this bug is now
resolved by the addition of the per-connection timeout setting.

There are several other bugs in this bugzilla which relate to AE routers,
several have been resolved by new Apple firmware, I would strongly suggest this
bug is closed/fixed and you open a new bug detailing the exact model of your
router, it's firmware level etc.
Comment 26 Andre Klapper maemo.org 2008-07-21 14:49:20 UTC
Having more details would definitely help to track this down, yes.
Comment 27 Eero Tamminen nokia 2008-12-22 13:42:15 UTC
(In reply to comment #25)
>> Nice if it is working better... obviously the AE doesn't like the most
>> aggressive power saving mode of N800?
...
> There are several other bugs in this bugzilla which relate to AE routers,
> several have been resolved by new Apple firmware, I would strongly suggest
> this bug is closed/fixed and you open a new bug detailing the exact model
> of your router, it's firmware level etc.

If Apple router's crashing due to being asked to do proper power management, I
think it would be most appropriate to file a bug against this particular Apple
product...  It's a bit annoying to have to work around bugs in different
routers (workaround for one buggy router might conflict with a workaround for
another one).
Comment 28 Mattia Salamanca Orrego 2008-12-24 14:10:22 UTC
As I mentioned in the relative thread in ITT, there is a solution. To make it
work reliably, we have do use the AEn Router in g mode and disable the N mode.
This can not be done strait from the interface. We must click on the "Radio
Mode" menu pressing ALT on the keyboard at the same time. It looks like the
Draft n mode is incompatible with the energy saving our beloved N800.

I really appreciate your work, guys!

Best Regards,
Mattia
Comment 29 Brian 2009-01-01 22:39:31 UTC
I have this problem with a Linksys wrt300n running dd-wrt. It is running in
mixed wireless mode ("draft N", G, and B). Since the newest diablo 43-7 I could
not open some web pages until shutting off psm mode completely.
Comment 30 Quim Gil nokia 2009-01-16 23:53:45 UTC
(In reply to comment #25)
> I would strongly suggest this
> bug is closed/fixed and you open a new bug detailing the exact model of your
> router, it's firmware level etc.

Scanning the comments it seems that this is the case for most users, specific
problems with access point A, B, C.

As a user my impression is that the current default works well for the average
user.

WORKSFORME?
Comment 31 Quim Gil nokia 2009-01-25 16:11:54 UTC
(In reply to comment #21) 
> Please report if OS2008 brings any improvement to this matter.
> 
> Also note that it is now possible to adjust the power saving settings also from
> the UI: this can be found from the advanced tab at the end of connection
> settings. The intermediate value uses 4000ms timeout, which should work much
> better than the original OS2007 value (which was 1000ms).

After Klaus' comment (posted more than a year ago) the following comments were
in the lines of fixed / decent workaround or still specific issue with AE XXX
(being such AE behaving in a bad way with PSM, worth investigating in own
bugs).

Since that fix and the UI to modify timeout values were applied in OS2008 I
will mark this bug as FIXED in Chinook, as it looks like it was initially
resolved.