Re: The 15 seconds scanning interval too long for ipw2200.



On Sun, 2006-09-10 at 12:58 -0400, Leon Bottou wrote:
> I experienced scanning/reconnection problems using the version 
> of network-manager distributed with Ubuntu Dapper 6.06.
> The problems occurs when many networks are present.
> 
> After investigation, I solved the issue by reducing 
> the scanning interval to 10 seconds.
> See http://launchpad.net/bugs/40125aunchpad.net/bugs/40125
> 
> A copy of the relevant message is attached below.
> 
> - Leon Bottou
> ----------------------------------------
> 
> I believe that the problem is deeper, 
> and I think I have solved it.
> My problem always was that network manager
> would not detect the trusted networks.
> 
> So I tried understanding how scanning is implemented
> on the ipw2200.  I loaded the ipw2200 module
> with associate=0 to make sure I had full control.
> The 'iwlist eth1 scan' command is bizarre because
> it only starts a scan when you run it as root.

Right; because allowing anyone to scan is a DoS attack, because most
cards (ipw and prism54 fullmac excluded) have to stop all traffic and do
some channel hopping and dwelling to see what APs are around.  And that
means that you can't send or receive any traffic during the scan.  So
imagine if just anyone could trigger a scan; you'd have malicious
programs triggering continuous scans and you wouldn't be able to do
anything over the network.

> Otherwise it simply returns the result of the last scan.
> I used one terminal as root to start the scans,
> and another as myself to see how and when 
> the detected networks appear.
> 
> It seems that ipw2200 implements scanning as
> a lightweight operation that can take place simultaneously
> with other activity.  It apparently maintains a list
> of detected networks.  Running iwlist eth1 scan

Correct; the ipw driver and hardware variants do background scanning and
keeps a cached list of found access points, culling them at a predefined
interval.  This is fairly unique to the ipw line, the only other card I
know which does this is prism54 fullmac, and Atheros cards now do this
with madwifi-ng too.  I don't know about softmac-layer based cards like
the broadcom ones.

> as non root returns this list (which includes the
> associated network when applicable.)
> When you start scanning, results
> are added to that list over the next few seconds.
> They stay in the list about 12 seconds and
> disappear.  

How long does it take when you do 'iwlist scan' before results are
returned?  My ipw2200 takes less than a second before returning some
results.  It's normal for a _lot_ of access points to be found
initially, then the driver slowly culls those access points that are in
reality out of range because they are so far away that their beacon
packets are reliably received.

What version of the ipw2200 drivers and the ieee80211 layer do you have?
'dmesg' should tell you; mine are:

ipw2200: Intel(R) PRO/Wireless 2200/2915 Network Driver, 1.1.2kmprq
ieee80211: 802.11 data/management/control stack, git-1.1.13

The driver should be keeping access points that are actually in-range in
its scan list.  If it's culling ones that are in range, there's
something really odd going on in the driver.  Does this problem just
happen on startup or resume?  i.e. does it happen on the first few scans
from the ipw card, or on every scan?  Does the driver eventually return
a full scan list?  Is your access point set to not broadcast its SSID?

I've used the ipw2200 card & driver in situations with more than 30
networks in the initial scan list and it always picks up the ones I
want.

Dan

> It seems that the network manager code
> assumes that scanning is very fast (and very intensive).
> It starts scanning, waits 0.25 seconds, 
> and reads the list of detected networks.
> Scanning happens every 15 or 20 seconds
> depending on something I do not understand.
> That means that a first scan returns next to nothing.
> The actual results of the scan get added to the list
> over the next few seconds, and removed about 12
> seconds later.  The next scan, 15 seconds later,
> does not see the results of the previous scan
> and starts from zero with the same result...
> 
> So I changed the scan interval to 10 seconds
> in order to make sure that the next scan
> will still see the results of the previous scan.
> Here is the patch
> 
> --- network-manager-0.6.3.orig/src/nm-device-802-11-wireless.c
> +++ network-manager-0.6.3/src/nm-device-802-11-wireless.c
> @@ -276,16 +276,16 @@
>         switch (interval)
>         {
>                 case NM_WIRELESS_SCAN_INTERVAL_INIT:
> -                       seconds = 15;
> +                       seconds = 10;
>                         break;
> 
>                 case NM_WIRELESS_SCAN_INTERVAL_INACTIVE:
> -                       seconds = 120;
> +                       seconds = 60;
>                         break;
> 
>                 case NM_WIRELESS_SCAN_INTERVAL_ACTIVE:
>                 default:
> -                       seconds = 20;
> +                       seconds = 10;
>                         break;
>         }
> 
> With this patch, network-manager locates my trusted network in about 10 seconds.
> The first scan still returns next to nothing, but its results are still 
> available when nm performs the next scan.
> 
> This solves my reconnection issues after suspend/resume cycles.
> 
> - L.
> _______________________________________________
> NetworkManager-list mailing list
> NetworkManager-list gnome org
> http://mail.gnome.org/mailman/listinfo/networkmanager-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]