passive scan / monitoring on multiple channels

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

passive scan / monitoring on multiple channels

shuffled mind
hello.

I have two problems or let's say questions about the usage of the wireless tools in conjunction with the madwifi driver. I am using openWRT on a box with atheros cards. when I perform a "iwlist ath0 scan" I lose connectivity for a few seconds (I can especially tell because I do all this by SSHing to the box through that card). I assume this is because iwlist scan performs an active scan, hence has to switch through the channels to be able to send corresponding probe requests. however I though that a card should be able to receive beacons (=passive scan) without losing connectivity -- I don't lose connectivity when I scan for available networks with my macbook.. how can such a scan be done? or am I completely wrong here?
further, if such a scan is possible, i.e. a card is able to receive beacons from any channel whilst no loosing connectivity, could it also receive other (=data) packets without disconnecting, e.g. some kind of all-channel monitor mode? the reason why I'm asking is because I try to monitor the activity of some channels and I don't want to disconnect the clients while I do so.

can anyone offer some help on this?
thanks
matt

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Madwifi-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/madwifi-users
Reply | Threaded
Open this post in threaded view
|

Re: passive scan / monitoring on multiple channels

Holger Schurig
You've some misconceptions about active/passive scan.

If you want to do ANY scan, you have to switch your WLAN receiver
to the channel where you expect access-points (or
adhoc-partners).

Once you're on this channel, you can now either passive listen
and wait for up to 100 ms to be sure that you'll get every
beacon. Or you actively send "probe requests" and wait
for "probe responses". This way you can scan faster and don't
need to stay for 100 ms on one channel, but maybe only 30-40 ms.

(the milliseconds are now out of my mind, they might be a bit
different in reality).



Keep in mind that active scan might not be allowed on every
channel, e.g. with cfg80211-enabled WLAN driver, "iw list" and a
properly install wireless-crda, you'll properly see on which
channel you can do active scans and on which not. The scan logic
inside mac80211 (or cfg80211-enabled drivers) will automatically
do an active scan if permissive for you regulatory domain.


You cannot be connected to one AP on 2412 MHz and at the same
time scan at 2467 MHz. That's simply impossible with one WLAN
card.

That is, you can by using a trick. The WLAN card can send a "I'm
in power-save mode" frame to the AP. This will make the AP keep
the connection, but buffer packets for this station. Now the
station can change to 2467 MHz, do the scan, and return to 2412
MHz. Now it sends a "I'm no longer in power-safe mode" frame to
the AP. This will just degrade performance, but it will keep the
current connection perfectly usable.

mac80211-based WLAN drivers do this automatically. I don't know
currently about madwifi, but others on this mailing list may
tell you this.

However, if you plan to invest considerable effort into this,
then please first test the mac80211-enabled ath5k driver from
wireless-testing or compat-wireless. That way you'll invest
time/effort into something that is future proof.


--
http://www.holgerschurig.de

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Madwifi-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/madwifi-users
Reply | Threaded
Open this post in threaded view
|

Re: passive scan / monitoring on multiple channels

shuffled mind
thanks for you answer, Holger. I was afraid this might be the case and now that you say it, it makes completely sense.

I'm trying to do this on an access point not on a station, but still there are some tricks I might to in order to prevent the stations from sending traffic to the access point for the scanning period, e.g. tricking the stations to change their NAV and see the channel as busy while the scan is done (unfortunately max. 30ms). could you point me to some resources which might help me finding out more about mac80211 and how this helps me sending custom packets, respectively?

thanks

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Madwifi-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/madwifi-users