java - 如何在 Android 中获取 WiFi 噪音水平?

标签 java android wifi wireless android-wireless

我想实现一个应用程序来测量室内环境的 WiFi 信号质量。根据我的研究,我发现获得准确测量的最佳方法不是只获得 RSSI,而是使用 SNR(信噪比)。

如何从 Android SDK 获取噪音水平?据我所知,没有可用的 API。但是,我找到了 method它提供了 SNR ( getEvdoSnr() )。不幸的是,这个仅适用于 GSM/CDMA 信号,不适用于 WiFi 连接。

是否有可能在 Android 中计算 SNR?我相信这是可行的,因为我在 Play 商店上找到了一个应用程序(称为 WiFi SNR),它成功地测量了这个比率。


注意:Android ScanResult 不提供噪声级别,即使它在官方文档中指定也是如此:

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.

最佳答案

使用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.

我打赌像这样的东西会给你想要的信息:

WifiManager manager = (WifiManager) getApplication().getSystemService(Context.WIFI_SERVICE);
for (ScanResult result : wifiManager.getScanResults()) {
   // do your stuff
}

关于java - 如何在 Android 中获取 WiFi 噪音水平?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45588415/

相关文章:

java - Google map GMS 室内显示屏的 Android 版本是什么?

java - 在 Eclipse IDE 中无法将文件从一个驱动器复制到多个驱动器

java - 通过蓝牙从 Android 发送时,字符串中缺少前三个字符

Arduino Uno + WifiShield : Telnet Error "Connection Refused"

android - WifiP2pManager createGroup 和 removeGroup 失败并显示 BUSY 状态

java - Spring XML 中的 "classpath:"和 "classpath:/"有什么区别?

java - 短到双值

android - 无法在 ListView 中显示数据库

android - 当 Button onClick 时使用 json 解析设置 TextView

iphone - 可达性 - 对于本地 LAN IP 地址