Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting WiFi signal strength in Android

I can get WiFi signal level in dBm using following code.

for (ScanResult result : wifiScanResultList) {     int signalLevel = result.level; } 

It gives negative value. When we see the default system WiFi setting and clicked on the connected WiFi network, it gives "Good" or "Bad" as signal strength. What is the range that we can filter those negative vales as "Good" signal strength or "Bad" signal strength?

like image 799
AnujAroshA Avatar asked Dec 18 '12 12:12

AnujAroshA


People also ask

How can I get Wi-Fi signal strength on my Android?

For Android users, Wi-Fi Analyzer is a step easier. Open the app and look for the networks found. Each entry will list strength as dBm. Windows 10 and 11 don't have a built-in way to view precise signal strength, although the netsh wlan show interface command gives you your signal strength as a percentage.

How do I check my Wi-Fi signal strength?

Use a Smartphone or TabletLook under a Settings, Wi-Fi, or Network menu. For example, in the settings on a Google Pixel with Android 10, select Network & internet, select the Wi-Fi you're using, and then select the gear icon next to the network you're connected to. There you can see the signal strength.

Why is my Wi-Fi signal weak on my Android phone?

Your phone could have connected to a weaker guest network or public Wi-Fi in range. Try the 2.4GHz connection if available rather than the 5GHz. 5GHz, while faster, won't travel as far and will often have 5G at the end of the name. Delete the connection then reconnect.


2 Answers

its an old post but this might help someone...

WifiManager wifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE); int numberOfLevels = 5; WifiInfo wifiInfo = wifiManager.getConnectionInfo(); int level = WifiManager.calculateSignalLevel(wifiInfo.getRssi(), numberOfLevels); 

Documentation: public static int calculateSignalLevel (int rssi, int numLevels)

like image 184
Alan Avatar answered Sep 20 '22 09:09

Alan


Please check how dBm values for received Wireless Signal power are represented.

Excellent >-50 dBm

Good -50 to -60 dBm

Fair -60 to -70 dBm

Weak < -70 dBm

like image 21
Nisha Salim Avatar answered Sep 22 '22 09:09

Nisha Salim