Re: Limit on number of APs? Some way to force-rescan?



On Wed, 2006-07-12 at 15:12 -0400, Derek Atkins wrote:
> Quoting Dan Williams <dcbw redhat com>:
> 
> > Actually, it does.  When you drop the menu down, NM schedules a scan in
> > a very short period of time, and reduces the inter-scan interval to 20s.
> > When you haven't touched the menu for a while, it pushes the scan
> > interval out to 20 minutes or something like that.
> 
> Well, I just moved locations.  Now I see 23 APs.  the first 12 are
> IETF66B.  Then #13-19 are IETF66A.  Then #20-23 are ESSID "".  But
> the only item I see in the nm-applet dropdown is IETF66B.  (I'm
> still getting my list from iwlist ath0 scan).
> 
> >> It looks like the scan list returns 15 APs, so in an area of 25-50 
> >> APs, a directed scan will often be required.
> >
> > Yes; wireless is inherently unreliable and you may not get every AP on
> > every scan for various reasons.  You never will, even with 'iwlist ethX
> > scan', even executed multiple times.  It Just Doesn't Work That Way.  So
> > what NM does is collect scan results and age them; an AP is removed from
> > the NM scan list when it hasn't been seen in a scan for 6 minutes, which
> > is > 3 scan requests.
> >
> > Wireless scans are never complete or reliable on _any_ platform.
> 
> But does NM pull ALL the data from the scan results?  Or is it
> truncated.  It FEELS like it's only pulling down the first N-kb
> of the scan results.

It pulls them down and enlarges the buffer a few times before failing
out if the buffer required is too large.  But I don't think you're
hitting this for a number of reasons:

1) if ((errno == E2BIG) && (buflen < 100000)) <---- that means NM will
stop trying to get results of the required buffer is greater than 100K.
That should _never_ happen unless you have LOTS of APs, like probably >
100.  An AP record is 99% of the time be less than 200 bytes.

2) You should be seeing the message "unknown error, or the card returned
too much scan info" in the logs if NM truncates scan results

3) ipw2200 can do just fine with > 30 access points, which tells me that
the buffer being not large enough for all the results is just not the
problem

You can try to do something like this to print out the results (for
HEAD):

--- nm-device-802-11-wireless.c.foo	2006-07-12 15:58:35.000000000 -0400
+++ nm-device-802-11-wireless.c	2006-07-12 16:00:19.000000000 -0400
@@ -3443,6 +3443,9 @@
 				/* New AP with some defaults */
 				ap = nm_ap_new ();
 				nm_ap_set_address (ap, (const struct ether_addr *)(iwe->u.ap_addr.sa_data));
+#define MAC2STR(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5]
+#define MACSTR "%02x:%02x:%02x:%02x:%02x:%02x"
+nm_debug("New AP found: " MACSTR "\n", MAC2STR(iwe->u.ap_addr.sa_data));
 				break;
 			case SIOCGIWMODE:
 				switch (iwe->u.mode)

Dan

> Is the scan logged anywhere by NM?
> 
> > Dan
> 
> -derek




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