Re: NM suboptimal with weak signal strength, easy fix

2007-06-04 Thread Dan Williams
On Fri, 2007-06-01 at 14:58 -0700, Saikat Guha wrote:
> On Fri, 2007-06-01 at 17:55 -0400, Dan Williams wrote:
> > The driver is telling userspace that it has lost association with the
> > access point.  Future versions of NM will try harder to reconnect before
> > timing out, but I'm not convinced that "pinning" is the best thing to do
> > from an interaction perspective.
> 
> From the driver's perspective, it is the right thing to do to report
> lost associations.
> 
> However, the driver doesn't know whether it'll reacquire association
> soon or not; the user, however, may very well know. I suppose the driver
> or NM could employ some heuristics (extended periods of low signal
> strength = expect intermittent disassociations), which may be a better
> approach than pinning if it does the right thing at the right time.

NM doesn't kill the connection immediately; but if wpa_supplicant or the
driver can't re-establish association within about 8 seconds, NM will
kill it.

> As for NM trying harder to reconnect, what I'd see is that NM would
> re-associate, but then it would try to re-acquire the DHCP lease (even
> when it is the same network (AP mac even), and the old lease is still
> valid).

Not necessarily, since NM would know that it just lost association and
that the association has only been lost for a certain period of time, it
could just re-establish the 802.11 connection.  If the DHCP address
comes up for lease expiration while association is re-attempted, then
DHCP will likely fail the request because it can't contact the server,
but that's also catchable I guess.

> So perhaps, the fix would be to skip DHCP reacquisition if the old lease
> is still valid and you associate to the same network (ssid? ap mac?). 

Right.  But there's still some icky cases if the DHCP lease is about to
expire.

Dan


___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: NM suboptimal with weak signal strength, easy fix

2007-06-04 Thread Derek Atkins
Saikat Guha <[EMAIL PROTECTED]> writes:

> On Fri, 2007-06-01 at 17:55 -0400, Dan Williams wrote:
>> The driver is telling userspace that it has lost association with the
>> access point.  Future versions of NM will try harder to reconnect before
>> timing out, but I'm not convinced that "pinning" is the best thing to do
>> from an interaction perspective.
>
> From the driver's perspective, it is the right thing to do to report
> lost associations.
>
> However, the driver doesn't know whether it'll reacquire association
> soon or not; the user, however, may very well know. I suppose the driver
> or NM could employ some heuristics (extended periods of low signal
> strength = expect intermittent disassociations), which may be a better
> approach than pinning if it does the right thing at the right time.
>
> As for NM trying harder to reconnect, what I'd see is that NM would
> re-associate, but then it would try to re-acquire the DHCP lease (even
> when it is the same network (AP mac even), and the old lease is still
> valid).
>
> So perhaps, the fix would be to skip DHCP reacquisition if the old lease
> is still valid and you associate to the same network (ssid? ap mac?). 

Personally I'd rather NM do nothing at all and let the AP reassociate
on its own.  Don't tear down the connection right away.  Don't throw
away the DHCP lease.  Just... wait.  IFF the connection does not come
back on its own after some period of time, THEN it can try to change
to a different SSID.  But honestly 802.11 hardware can roam quite well
and comes back on its own just fine.  NM is way too quick to throw
away valid connection information when it's faced with a somewhat
flakey network.

-derek
-- 
   Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
   Member, MIT Student Information Processing Board  (SIPB)
   URL: http://web.mit.edu/warlord/PP-ASEL-IA N1NWH
   [EMAIL PROTECTED]PGP key available
___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: NM suboptimal with weak signal strength, easy fix

2007-06-01 Thread Saikat Guha
On Fri, 2007-06-01 at 17:55 -0400, Dan Williams wrote:
> The driver is telling userspace that it has lost association with the
> access point.  Future versions of NM will try harder to reconnect before
> timing out, but I'm not convinced that "pinning" is the best thing to do
> from an interaction perspective.

From the driver's perspective, it is the right thing to do to report
lost associations.

However, the driver doesn't know whether it'll reacquire association
soon or not; the user, however, may very well know. I suppose the driver
or NM could employ some heuristics (extended periods of low signal
strength = expect intermittent disassociations), which may be a better
approach than pinning if it does the right thing at the right time.

As for NM trying harder to reconnect, what I'd see is that NM would
re-associate, but then it would try to re-acquire the DHCP lease (even
when it is the same network (AP mac even), and the old lease is still
valid).

So perhaps, the fix would be to skip DHCP reacquisition if the old lease
is still valid and you associate to the same network (ssid? ap mac?). 

-- 
Saikat


signature.asc
Description: This is a digitally signed message part
___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: NM suboptimal with weak signal strength, easy fix

2007-06-01 Thread Dan Williams
On Fri, 2007-06-01 at 01:35 -0700, Saikat Guha wrote:
> Hi,
> 
> I encountered the following problem with NM recently. I have a _very_
> weak signal in my hotel room. It'll hover at 15% for a while (and I can
> access the Internet then), then drop to 0% for 10--20 seconds (no
> Internet), then come back again for a few minutes and so on.
> 
> With NM:
> - Within a few seconds of the signal dropping to 0%, NM ifdown's the
> interface and starts rescanning. It finds the network again in 10--20s
> and tries to reaquire a lease. But at 15% SNR, it means some DHCP
> packets get lost ... so the 10--20s WiFi outage turns into a 2min NM
> outage with me clicking force it to retry after 2-3 DHCP failures etc.
> 
> Without NM -- i.e. w/ iwconfig+ifconfig+route:
> I set up the device, interface routes etc. by hand. When SNR drops to 0%
> for 10--20s, I have full packet-loss. 20s later, everything is back
> working. There is no inflation of the network level outage to app level.
> 
> Easy Fix:
> A "pin" button for networks. Kind of like that thumbtack pin icon in
> Tomboy Notes Panel app. Once NM acquires a network, "pin" it, and NM
> won't ifdown it even if SNR drops to 0%. Unpin it, and NM operates like
> normal.

The driver is telling userspace that it has lost association with the
access point.  Future versions of NM will try harder to reconnect before
timing out, but I'm not convinced that "pinning" is the best thing to do
from an interaction perspective.

Dan

> Thoughts?
> 
> ___
> NetworkManager-list mailing list
> NetworkManager-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/networkmanager-list

___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


NM suboptimal with weak signal strength, easy fix

2007-06-01 Thread Saikat Guha
Hi,

I encountered the following problem with NM recently. I have a _very_
weak signal in my hotel room. It'll hover at 15% for a while (and I can
access the Internet then), then drop to 0% for 10--20 seconds (no
Internet), then come back again for a few minutes and so on.

With NM:
- Within a few seconds of the signal dropping to 0%, NM ifdown's the
interface and starts rescanning. It finds the network again in 10--20s
and tries to reaquire a lease. But at 15% SNR, it means some DHCP
packets get lost ... so the 10--20s WiFi outage turns into a 2min NM
outage with me clicking force it to retry after 2-3 DHCP failures etc.

Without NM -- i.e. w/ iwconfig+ifconfig+route:
I set up the device, interface routes etc. by hand. When SNR drops to 0%
for 10--20s, I have full packet-loss. 20s later, everything is back
working. There is no inflation of the network level outage to app level.

Easy Fix:
A "pin" button for networks. Kind of like that thumbtack pin icon in
Tomboy Notes Panel app. Once NM acquires a network, "pin" it, and NM
won't ifdown it even if SNR drops to 0%. Unpin it, and NM operates like
normal.

Thoughts?

-- 
Saikat


signature.asc
Description: This is a digitally signed message part
___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list