I want to implement an app which measures the quality of the WiFi signal from an indoor environment. From my research I found that the best way to get an accurate measurement is not to get only the RSSI but instead to use the SNR (Signal to Noise Ratio).
How can I obtain the noise level from the Android SDK? As I heard, there is no API available for this. However, I've found a method which provides the SNR (getEvdoSnr()). Unfortunately, this one works only for a GSM/CDMA signal and not for a WiFi connection.
Is anything possible to calculate the SNR in Android? I believe that's doable because I've found an app on Play store (called WiFi SNR) which successfully measures this ratio.
NOTE: The Android ScanResult doesn't provide the noise level, even if it's specified in the official documentation:
Describes information about a detected access point. In addition to the attributes described here, the supplicant keeps track of quality, noise, and maxbitrate attributes, but does not currently report them to external clients.
Use https://developer.android.com/reference/android/net/wifi/ScanResult.html.
Describes information about a detected access point. In addition to the attributes described here, the supplicant keeps track of quality, noise, and maxbitrate attributes, but does not currently report them to external clients.
I bet something like this will give to you desired information:
WifiManager manager = (WifiManager) getApplication().getSystemService(Context.WIFI_SERVICE);
for (ScanResult result : wifiManager.getScanResults()) {
// do your stuff
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With