* Q: iw - how to scan for a specific ssid / AP mode scan @ 2015-07-03 16:51 Zefir Kurtisi 2015-07-03 18:38 ` Johannes Berg 0 siblings, 1 reply; 4+ messages in thread From: Zefir Kurtisi @ 2015-07-03 16:51 UTC (permalink / raw) To: linux-wireless; +Cc: Johannes Berg Folks, I have difficulties using iw for a specific use case or fail to understand the documentation correctly. My platform is a recent OpenWRT, running ath9k. First use case is scanning for a given ssid in managed mode. According do iw's documentation (and the attribute description in nl80211.h), issuing iw dev wlan0 scan flush ssid <SSID> should do exactly this, but I keep receiving a full list of visible APs. I double checked that NL80211_SCAN_FLAG_FLUSH and NL80211_ATTR_SCAN_SSIDS are set correctly, so am puzzled whether there is some bug left or I miss some detail. The second issue is about scanning in AP mode. Where I want to go is having two APs operating on arbitrary DFS channels with periodic scans to discover each other. What I observe is a) passive scanning: iw dev wlan0 scan flush ap-force passive => does not work - no scan results are provided b) active scanning: iw dev wlan0 scan flush ap-force * finds only a subset of APs compared to a scan in managed mode * finds only APs on non-DFS channels Again, I might be missing some relevant documentation, but to me the observed results look rather like 'not yet implemented' than inherent limitations. Any hint / feedback is appreciated. Thanks, Zefir ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Q: iw - how to scan for a specific ssid / AP mode scan 2015-07-03 16:51 Q: iw - how to scan for a specific ssid / AP mode scan Zefir Kurtisi @ 2015-07-03 18:38 ` Johannes Berg 2015-07-06 8:31 ` Zefir Kurtisi 0 siblings, 1 reply; 4+ messages in thread From: Johannes Berg @ 2015-07-03 18:38 UTC (permalink / raw) To: Zefir Kurtisi, linux-wireless On Fri, 2015-07-03 at 18:51 +0200, Zefir Kurtisi wrote: > Folks, > > I have difficulties using iw for a specific use case or fail to > understand the documentation correctly. > > My platform is a recent OpenWRT, running ath9k. > > First use case is scanning for a given ssid in managed mode. > According do iw's documentation (and the attribute description in > nl80211.h), issuing > > iw dev wlan0 scan flush ssid <SSID> > > should do exactly this, but I keep receiving a full list of visible > APs. This is telling it to scan for that particular network, and that's what it's going to do, but it's still going to report everything that it heard, for example when hearing beacons while scanning. > The second issue is about scanning in AP mode. Where I want to go is > having two > APs operating on arbitrary DFS channels with periodic scans to > discover each > other. What I observe is > a) passive scanning: iw dev wlan0 scan flush ap-force passive > => does not work - no scan results are provided > b) active scanning: iw dev wlan0 scan flush ap-force > * finds only a subset of APs compared to a scan in managed mode > * finds only APs on non-DFS channels > > Again, I might be missing some relevant documentation, but to me the > observed results look rather like 'not yet implemented' than inherent > limitations. > Not sure - but you do need to realize that the AP isn't really allowed to go off-channel for any period of time (like scanning) so this isn't really guaranteed to work well. Especially passive scanning seems like a really bad idea. As to why it's not actually working, I have no idea. johannes ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Q: iw - how to scan for a specific ssid / AP mode scan 2015-07-03 18:38 ` Johannes Berg @ 2015-07-06 8:31 ` Zefir Kurtisi 2015-07-13 8:18 ` Johannes Berg 0 siblings, 1 reply; 4+ messages in thread From: Zefir Kurtisi @ 2015-07-06 8:31 UTC (permalink / raw) To: Johannes Berg, linux-wireless On 07/03/2015 08:38 PM, Johannes Berg wrote: > On Fri, 2015-07-03 at 18:51 +0200, Zefir Kurtisi wrote: >> Folks, >> >> I have difficulties using iw for a specific use case or fail to >> understand the documentation correctly. >> >> My platform is a recent OpenWRT, running ath9k. >> >> First use case is scanning for a given ssid in managed mode. >> According do iw's documentation (and the attribute description in >> nl80211.h), issuing >> >> iw dev wlan0 scan flush ssid <SSID> >> >> should do exactly this, but I keep receiving a full list of visible >> APs. > > This is telling it to scan for that particular network, and that's what > it's going to do, but it's still going to report everything that it > heard, for example when hearing beacons while scanning. > Ah, that explains it. Though, intuitively when providing an SSID to scan for, I'd expect other networks seen not to be displayed. If this is of general interest, I could work out some extension to iw and provide a related patch. >> The second issue is about scanning in AP mode. Where I want to go is >> having two >> APs operating on arbitrary DFS channels with periodic scans to >> discover each >> other. What I observe is >> a) passive scanning: iw dev wlan0 scan flush ap-force passive >> => does not work - no scan results are provided >> b) active scanning: iw dev wlan0 scan flush ap-force >> * finds only a subset of APs compared to a scan in managed mode >> * finds only APs on non-DFS channels >> >> Again, I might be missing some relevant documentation, but to me the >> observed results look rather like 'not yet implemented' than inherent >> limitations. >> > > Not sure - but you do need to realize that the AP isn't really allowed > to go off-channel for any period of time (like scanning) so this isn't > really guaranteed to work well. Especially passive scanning seems like > a really bad idea. As to why it's not actually working, I have no idea. > Your confirmation that scanning in AP mode is not reliable helps a lot. As for the 'bad idea', this is a special case: the APs don't provide a service at all, they only need to discover each other reliably in a mobile environment. I assumed AP background scanning would do the trick out of the box, but now will move to a time multiplexed AP / STA operation. > johannes Thanks a lot, Zefir ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Q: iw - how to scan for a specific ssid / AP mode scan 2015-07-06 8:31 ` Zefir Kurtisi @ 2015-07-13 8:18 ` Johannes Berg 0 siblings, 0 replies; 4+ messages in thread From: Johannes Berg @ 2015-07-13 8:18 UTC (permalink / raw) To: Zefir Kurtisi, linux-wireless > Ah, that explains it. Though, intuitively when providing an SSID to > scan for, I'd > expect other networks seen not to be displayed. If this is of general > interest, I > could work out some extension to iw and provide a related patch. I don't think so - you're not providing "find these networks", you're providing "send probe requests with these SSIDs", i.e. it's perfectly valid to also say "" A B C to create 4 probe requests. johannes ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-07-13 8:18 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-07-03 16:51 Q: iw - how to scan for a specific ssid / AP mode scan Zefir Kurtisi 2015-07-03 18:38 ` Johannes Berg 2015-07-06 8:31 ` Zefir Kurtisi 2015-07-13 8:18 ` Johannes Berg
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).