I am trying to get the signal strength of the current wifi connection using getRssi()
private void checkWifi(){ ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo Info = cm.getActiveNetworkInfo(); if (Info == null || !Info.isConnectedOrConnecting()) { Log.i("WIFI CONNECTION", "No connection"); } else { int netType = Info.getType(); int netSubtype = Info.getSubtype(); if (netType == ConnectivityManager.TYPE_WIFI) { wifiManager = (WifiManager)getApplicationContext().getSystemService(Context.WIFI_SERVICE); int linkSpeed = wifiManager.getConnectionInfo().getLinkSpeed(); int rssi = wifiManager.getConnectionInfo().getRssi(); Log.i("WIFI CONNECTION", "Wifi connection speed: "+linkSpeed + " rssi: "+rssi);
The thing is, I get numbers like -35 or -47 ect .. and I don't understand their meanings. I looked at the Android documentation and all that it says is:
public int getRssi ()
Since: API Level 1 Returns the received signal strength indicator of the current 802.11 network.
This is not normal, but it should be!
Returns RSSI in range? to
can someone explain how to "normalize" or understand these results?
erik
source share