Using my laptop's inbuilt wireless, which uses the ath5k driver, ap_scan=0 and ap_scan=1 both work. If I leave the ap_scan parameter out of wpa_supplicant.conf it also works -- so I wonder what wpa_supplicant defaults to? 0?
Using my Netgear WG311 wireless card with ndiswrapper, I have to use ap_scan=2.
There was a suggestion in the forum thread, why not try each in turn? Try in order 2, 1, 0.
...can anyone think why that would not be a good idea?
I have done considerable code cleanup and improvements for my SNS script. Now want to get this ap_scan thing sorted out... for now, I'm using ap_scan=1 as default, except if ndiswrapper driver then ap_scan=2.
Comments:Posted on 12 Mar 2010, 23:05 by jemimah
Here is the blurb about it from the developer's documentation (http://hostap.epitest.fi/wpa_supplicant/devel/driver_wrapper.html):
* wpa_supplicant requests scan with SIOCSIWSCAN
* driver reports scan complete with wireless event SIOCGIWSCAN
* wpa_supplicant reads scan results with SIOCGIWSCAN (multiple call if a larget buffer is needed)
* wpa_supplicant decides which AP to use based on scan results
* wpa_supplicant configures driver to associate with the selected BSS (SIOCSIWMODE, SIOCSIWGENIE, SIOCSIWAUTH, SIOCSIWFREQ, SIOCSIWESSID, SIOCSIWAP)
* wpa_supplicant configures driver to associate with an SSID (SIOCSIWMODE, SIOCSIWGENIE, SIOCSIWAUTH, SIOCSIWESSID)
After this, both modes use similar steps:
* optionally (or required for drivers that generate WPA/RSN IE for (Re)AssocReq), driver reports association parameters (AssocReq IEs) with wireless event IWEVASSOCREQIE (and optionally IWEVASSOCRESPIE)
* driver reports association with wireless event SIOCGIWAP
* wpa_supplicant takes care of EAPOL frame handling (validating information from associnfo and if needed, from scan results if WPA/RSN IE from the Beacon frame is not reported through associnfo)
Ap_scan=1 is the default.
Apparently ap_scan=0 is only used for wired networks.
Ap_scan=2: I think you generally only need it with proprietary or developmental drivers that have crappy wpa_supplicant support. There might be a list somewhere of which cards need it, but ap_scan=1 is correct for the vast majority of drivers.
Posted on 13 Mar 2010, 3:15 by bigpup
Look at this
I know this has nothing to do with this post, but I did a Google search for Distro watch and look what came up.
DistroWatch.com: Put the fun back into computing. Use Linux, BSD.
Mar 11, 2010 ... News and feature lists of Linux and BSD distributions.
distrowatch.com/ - Cached - SimilarMajor Distributions
Use Linux, BSD
More results from distrowatch.com »
Posted on 13 Mar 2010, 8:43 by JustGreg
My Notes on ap_scan
Here are my notes on ap_scan (access point scan). I kept them in the template for the config file to be used with wpa_supplicant.
#ap_scan=0 uses driver to scan for ap
#ap_scan=1 is for broadcasted SSID normally
#ap_scan=2 is for hidden SSID normally
#I found for a hidden SSID, I need to use ap_scan=2 JustGreg 1 Sept 2008
# scan_ssid=1 for a hidden SSID does not work!
This has worked for me since Sept. 2008
Posted on 13 Mar 2010, 12:58 by 01micko
I have that card too Barry. Shame the linux sources aren't up to date. Downloading windows driver now.. 16MB!!! All for a few kilobytes of useful stuff, ugh.
Will test some stuff once I have driver.
Posted on 13 Mar 2010, 14:04 by ttuuxxx
Your wireless modem card looks like its covered by mad-wifi http://madwifi.org/Install-HOWTO/WL/wl.config.NetGear.WG311
why not compile and use that?
Posted on 13 Mar 2010, 14:39 by BarryK
Could do, but the challenge right now is to get Ndiswrapper working properly in my SNS.
Posted on 13 Mar 2010, 14:55 by 01micko
Hmmm.. in my quirky 008 there is no ndiswrapper module present.. I made it with the delta, and it was successful so didn't bother with the checksum.
I booted pfix=ram, and unsuccessful with all methods (including sns-2), then tried modrobe ndiswrapper.. FATAL, not present error.
Card works though because I'm posting now from an old spup build with k220.127.116.11 with ndiswrapper.
Ndiswrapper is present in k18.104.22.168 but seems broken (tried on my tpup).. about to try quirky-006.
Posted on 13 Mar 2010, 15:32 by 01micko
Ndiswrapper is ok in 431, (zigbert's stardust actually, but pretty close), guess it would have been reported by now. I have just never bothered with it except when I had my old laptop that I gave away.
I'll try sns-2 in it, pfix=ram.
Posted on 13 Mar 2010, 15:55 by 01micko
ndiswrapper take 3
sns performed almost as expected.. fell over at last hurdle. Zigbert has Pwireless2 in stardust (using his latest) by default. There is some minor conflict with dhcpcd, but I just can't put my finger on it.
Ndiswrapper worked in sns, the log was all good, just didn't connect, then Pwireless2 took over and straight online!
Hope some of this is useful.
Posted on 13 Mar 2010, 16:20 by BarryK
Sorry, I forgot about the Ndiswrapper driver. Get it from here:
I'm running with Ndiswrapper right now, using WEP. SNS would not even connect using WEP, which was very frustrating as it worked before -- then I rebooted and tried again, it worked.