Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scanning for wifi signals only in 2.4Ghz band

I need to scan for available Wi-Fi signals and their strengths. I'm using wifiManager.startScan(); and asynchronous wifiManager.getScanResult();.

On devices without support of 5GHz band it takes about 500ms to get the results, on devices with 5GHz band support it takes about 2s, and that is too much for me. I guess the 1.5s delay is in searching the whole 5GHz band.

Is there any way I could tell the device to scan only in the 2.4GHz band, or any other way I could get the results faster (for example through NDK)? I searched through the entire web and found nothing, so I guess this is the only way.

Thank you.

like image 296
donEgro Avatar asked Jun 27 '13 14:06

donEgro


People also ask

How do you check if my Wi-Fi is 2.4 GHz or 5GHz?

From Notification Panel press and hold the WiFi icon until you enter WiFi settings screen. Select the network properties (tap the gear icon or menu icon). Depending on the Android version check: Read the “Frequency” setting – shows as 2.4 or 5GHz.

Why is my 2.4 GHz not working but 5GHz is?

Check Device Settings Some devices have a setting that, when turned on, won't connect to 2.4 GHz Wi-Fi networks. The feature might have been intended to maximize the device's performance on Wi-Fi by using only 5 GHz, but it doesn't let you connect to the slower 2.4 GHz band.

How do I scan for Wi-Fi interference?

The first place to start is with a Wi-Fi Scanner for your computer. These scan for wireless networks within range and tell you which channel they're running on, and the base frequency (2.4GHz or 5GHz).

What is Wi-Fi scanning for?

It's actually part of the location services on your phone, meaning that it's scanning for networks to get a better idea of where you are at any given time. It sounds sinister, but it's the feature that allows services like Siri and Google Assistant to tell you about all the cool stuff in your immediate vicinity.


1 Answers

Is there any way I could tell the device to scan only in the 2.4GHz band

I think there is not way how to achieve it.

All you can do is only call startScan() and wait for results. Then you can filter results due to their frequency especially for 2.4Ghz frequency of each AP (Access Point) should be bellow 2500 Mhz.

like image 114
Simon Dorociak Avatar answered Sep 28 '22 18:09

Simon Dorociak