I need to measure Wi-Fi Direct signal(RSSI signal) between two Android mobile phones. How i can do that?
Asked
Active
Viewed 4,484 times
13

Rachel Gallen
- 27,943
- 21
- 72
- 81

userInThisWorld
- 1,361
- 4
- 18
- 35
-
Did you found any solution for this? – brb Jan 18 '16 at 18:32
-
Do you need method to get RSSI of WiFi or something else? – Mohit Rajput Jan 21 '16 at 12:11
2 Answers
0
Create a Broadcast Receiver class inside your activity class that performs some action (display some message/ store in a variable) when RSSI's strength changes. This can be done as follows :
public class myReceiver extends BroadcastReceiver
{
@Override
public void onReceive(Context context, Intent intent)
{
String myAction = intent.getAction();
if (myAction.equals(WifiManager.RSSI_CHANGED_ACTION))
{
manageNewRssi(intent.getIntExtra(WifiManager.EXTRA_NEW_RSSI,0));
}
}
}
manageNewRssi is a method that you have to define which does the required task.
-
are you sure this is for Wi-Fi Direct? I think this is for ordinary Wi-Fi! – userInThisWorld Feb 24 '13 at 16:43
-
@alsadi90 sorry for late reply! You are right. This is actually for Wi-Fi.Actually, earlier i thought that RSSI signal strengths for WiFi and WiFi direct must be the same, but now it looks like it is not so. Android works on linux and you might have to use some command line arguments to get RSSI for WiFi-Direct. Have a look [here](http://android.stackexchange.com/questions/40821/how-to-measure-the-rssi-strength-signal-between-peers-using-wifi-direct) – 10101010 Apr 13 '13 at 11:23