[Android] wpa_supplicant and wpa_cli problem with p2p_connect

Peer, Ilan ilan.peer
Tue Dec 9 22:46:17 PST 2014

Hi Stefano,

Did you try using p2p_group_remove? This should probably do the work for. If it doesn?t, need to look into logcat and see why these commands fail.

?         Did you stop the framework before using the command line? Running both the framework and manually configuring wpa_supplicant might pop unexpected/wanted behavior. Try calling `adb shell stop` (this will stop the entire framework).

?         Better not use SIGKILL as you won?t get clean shutdown of the wpa_supplicant.

Good luck,


From: hostap-bounces at lists.shmoo.com [mailto:hostap-bounces at lists.shmoo.com] On Behalf Of Stefano Cappa
Sent: Wednesday, December 10, 2014 01:28
To: hostap at lists.shmoo.com
Subject: [Android] wpa_supplicant and wpa_cli problem with p2p_connect

?Hi, i'm working on wifi direct in android for my thesis at Politecnico of Milan in Italy.

I'm calling directly wpa_supplicant with wpa_cli via command line with adb in Android. Obviously?, i've recompiled Android from AOSP with the standard configuration to get wpa_cli and copied into the device.

If i want to connect two devices? with p2p_connect (for example with Lollipop, or Kitkat) i can use this procedure in wpa_cli:

Dev 1) p2p_find

Dev 2) p2p_find

Dev 1) p2p_connect address pin keypad

Dev 2) p2p_connect address 1234563 keypad //where 1234563 is the pin obtained from the previous command

Ok, perfect, after some experiments i can connect this devices -> group created and i can use the "busybox ping -6 address" command to ping the devices via wifi direct.

But, if i want to disconnect and reconnect without problems, which is the correct procedure?

Because, if i recall p2p_connect, the answer is "FAIL", if i try to kill (with killall -SIGKILL) wpa_supplicant and wpa_cli and retry, the answer is always "FAIL". The only way to disconnect and reconnect is a complete reboot of all devices.

Probably i don't understand something that is really really basic and easy ;)

Thank you very much,

please help me ;)

Stefano Cappa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.shmoo.com/pipermail/hostap/attachments/20141210/b134db1d/attachment-0001.htm>

More information about the Hostap mailing list