[Android] wpa_supplicant and wpa_cli problem with p2p_connect
ilan.peer at intel.com
Wed Dec 10 01:46:17 EST 2014
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.
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 ;)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the HostAP