3

I am able to get RSSI for the current wifi network with the following command, but I need a command with faster response, this one is too slow:

dumpsys wifi | grep ", RSSI"

Is there a better way to get the signal strength from the android linux terminal?

I've also tried WifiInfo.getRssi() in java and it has about a 2 second delay between samples. I need about 200ms.

JBaczuk
  • 13,886
  • 10
  • 58
  • 86

1 Answers1

0

Use the command below to change the rssi update interval to 200 ms. You may need root privilege.

adb shell cmd wifi set-poll-rssi-interval-msecs 200

I've also tried WifiInfo.getRssi() in java and it has about a 2 second delay between samples.

Yes, the default update interval is 3000 ms.


You can find the implementation in frameworks/opt/net/wifi/service/java/com/android/server/wifi/ClientModeImpl.java. In short, it updates the wifi state by wificond process, which communicates with the Wi-Fi driver over standard nl80211 commands. The update time interval is the private field mPollRssiIntervalMsecs. The class exposes this field by cmd command (see the WifiShellCommand class).

wangck
  • 1