Increasing WiFi scan rate
Asked Answered
B

4

7

I've got a problem. I'm developing an android application that scans for wireless accesspoints/routers. I've been testing a couple of devices and I'm getting scan rates of 2, 1, 0.5, 0.1 etc. scans per second.

My goal is to reach 10 scans per second because a router can send beacons 10 times a second. And we need this for our application.

Is there away to make this possible? Perhapse hack a rom and replace the wifi drivers? I've been looking in to this but I can't find anything about this frequentie inside the driver.

The driver used is BCM4329 driver, I can't find any datasheets of the BCM4329 so it's kinda hard to figure this out.

Thanks in advance. flitjes

Beneficiary answered 2/3, 2012 at 12:42 Comment(2)
I've found out it has something to do with WPA_SUPPLICANT. I'm going to try to build a custom WPA_SUPPLICANT to increase the scan rate because the drivers inside the WPA_SUPPLICANT contain wifi scanrate parameters. I've still got to test this!Beneficiary
WPA_SUPPLICANT handles the security, I find it very hard to believe that it can control scan rate directly (it might be a side-effect, though).Lyle
D
0

I'm not familiar with driver development but I know it's one of the hardest thing in computer science so unless you have good knowledge in linux kernel development I would forget about it.

Moreover, you still need to scan the 12 Wi-fi channels to be sure that you are detecting all access points. An access point broadcasts a beacon every 100ms * 12 channels = 1.2 seconds. Spending less time than that and you risk missing access points.

Denominate answered 30/3, 2012 at 0:8 Comment(3)
Multiple accesspoints send beacons simultaneosly, so I'm pretty convinced that I can speed this up. As i stated in the other reply, I think the only way to get this faster is excluding channels from the scan. Perhapse with a window of channel 1-4.Beneficiary
ok some drivers make it possible to adjust the scanning time per channel, but then you risk missing some APs, which will degrade your accuracy...Denominate
Currently it is already scanning with 500ms with an update so it looks like it is possible. But I can't find any settings to change the scanning time per channel. I've found out that there is a difference between the drivers and the wifi stack. So this means alot of new possibilities that could contain the answere.Beneficiary
F
0

You don't need to change anything in the device driver, Android makes it available to you to scan for access points. See the documentation.

Although requesting that many scans will probably not be very good for the battery life and the responsiveness of your app...

Farrell answered 30/3, 2012 at 0:24 Comment(1)
I know I can scan for accesspoints with android that is not the problem... It doesn't matter how the battery life will be. It's just necessary to scan that fast for this application. The problem still remains: How can I make this possible. Im now trying to scan one channel instead of all 11-14.Beneficiary
L
0

Your assumption that beacon rate is 10 per second is incorrect. This is really an AP configuration parameter, although 10 per sec is default in most. Besides that, APs do not send beacons simultaneously, if this happens, it's called a collision and a back-off algorithm is used for retransmission. In addition, even scanning 10 times per second doesn't make it certain for you to capture all beacons, like was pointed out in the previous answers.

Lyle answered 23/10, 2012 at 12:37 Comment(0)
B
0

if u use 4339 driver, you could not set the scan rate in driver or android api which is fixed in 4339 firmware, scan is about all channels && time u spend on each channel, according to the 80211 spec, which is part of mac && phy. in this case u just need to get the beacon, so u should use passive scan and use fixed channel && MaxChannelTime u want.

u have to ask broadcom for speical fw to figure out your problem,

IEEE Std 802.11-2012 page 978 10.1.4.2 Passive scanning If the ScanType parameter indicates a passive scan, the STA shall listen to each channel scanned for no longer than a maximum duration defined by the MaxChannelTime parameter.

Binette answered 13/8, 2014 at 8:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.