there is no feature to measure the RSSI between peers in Wifi-direct, so how to get RSSI between them.

actually i go under API for WIFI to see how they measure WIFI RSSI So i see that they send Command as parameter to native method, but i can't catch this command!!!

in this method wifi_send_command in wifi.c from this link.

as i know Android is under linux, the iwconfig is linux command to get the wireless information interface, if i used it can i get the Wifi direct information ? or it is just return the access points network information?

anyone have any idea about this ?

3 Answers 3


You can get this information inside wpa_cli. Open wpa_cli in wifi-direct interface and do a scan and scan_results as below.

adb shell wpa_cli -i<wifi-direct interface name> -p<socket path> scan
adb shell wpa_cli -i<wifi-direct interface name> -p<socket path> scan_results

You will get small info about connected peer(device address, channel,rssi etc). Hope this works!

  • Comments are not for extended discussion; this conversation has been moved to chat.
    – Andrew T.
    Commented Nov 17, 2021 at 18:42

If you want to measure the RSSI between 2 peers before connection, just try:

  • In linux under wpa_supplicant

    sudo wpa_cli p2p_peer 74:da:3f:58:5c:f0

    (where 74:da:3f:58:5c:f0 is the MAC address of the second peer.)

  • In Android, it should be something like this (guessed and untested)

    adb shell wpa_cli -i <wifi-direct interface name> -p <socket path> p2p_peer 74:da:3f:58:5c:f0

After that you will get a big string. Then search for the word Level (the RSSI comes in dBm).


For non-rooted devices try the following:

Device A: Linux Device B: Android

  1. Get the P2P group name of one device. This can be seen by using wpa_cli on the linux device. <3>P2P-GROUP-STARTED p2p-wlan0-0 GO ssid="DIRECT-Gw" freq=2462 passphrase="Vz4GVojX" go_dev_addr=02:04:4b:e0:80:73

  2. Open an adb shell to the Android device.

  3. Type: dumpsys | grep "DIRECT-Gw"

  4. Look at the output:

 - SSID: DIRECT-Gw, BSSID: 02:04:4b:e0:00:73, capabilities: [WPA2-PSK-CCMP][RSN-PSK-CCMP][ESS][WPS], level: -61, frequency: 2462, timestamp: 104993415063, distance: ?(cm), distanceSd: ?(cm), passpoint: no, ChannelBandwidth: 0, cen
terFreq0: 2462, centerFreq1: 0, standard: 11n, 80211mcResponder: is not supported, Radio Chain Infos: []

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .