I am trying to make a simple app that tells me the rssi values of the 5 strongest wifi networks. I don't need to connect to any of the networks, just want to know the rssi's. At the moment I'm using the following bit of code:
wifi = (WifiManager) getSystemService(Context.WIFI_SERVICE);
int info = wifi.getConnectionInfo().getRssi();
textStatus.setText("WiFi Rssi: " + info);
However, this only displays the rssi value of the network I am connected to.
Is there a way of getting this information for other networks?
An RSSI closer to 0 is stronger, and closer to –100 is weaker. For best performance, you want your RSSI to be as high as possible. A useful rule of thumb is that if the RSSI is less than –70 dBm, you are unlikely to have good performance over Wi-Fi for bandwidth intensive tasks.
To accurately determine how close users have been to each other and whether there may have been a risk of exposure, an app needs to estimate the distance between two devices, using Bluetooth Low Energy (BLE) received signal strength indicator (RSSI) measurements.
RSSI measures the strength of a radio signal. Any RSSI value lower than -80 dBm is considered poor signal strength. Based on the client implementation some clients consider -75 dBm as poor strength as well, and will start roaming to a better Access Point, so values in the range -70 to -80 dBm are client dependent.
I think I got it:
ScanResult result0 = wifi.getScanResults().get(0);
String ssid0 = result0.SSID;
int rssi0 = result0.level;
String rssiString0 = String.valueOf(rssi0);
textStatus.append("\n" + ssid0 + " " + rssiString0);
then get(1), get(2) and so on for however many you like
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