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 ?


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!

  • can i get rssi between peers ? i mean when peer received message from other peer i need its RSSI strength from it – H.H Mar 5 '13 at 9:29
  • what about this wpa_cli ?? from where can i get it ? – H.H Mar 5 '13 at 9:29
  • also it is for scanning RSSI ? – H.H Mar 5 '13 at 9:29
  • wpa_cli is a command line interface for the wpa_supplicant which you are running in android. It will be in /system/bin by default(i hope so). This is just like scanning peers(not wifi-direct searching) and getting scan results. RSSI will be there in the scan results info. – Rilwan Mar 5 '13 at 9:34
  • when i type wpa_cli wpa_cli: not found ? – H.H Mar 5 '13 at 10:50

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).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.