<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!-- p { margin-top: 0px; margin-bottom: 0px; }--></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<p>​Hi, i'm working on wifi direct in android for my thesis at Politecnico of Milan in Italy.<br>
</p>
<p><span style="font-size:12pt">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.</span></p>
<p><span style="font-size:12pt"><br>
</span></p>
<p><span style="font-size:12pt">If i want to connect <span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">
two devices</span>​ with p2p_connect (for example with Lollipop, or Kitkat) i can use this procedure in wpa_cli:</span></p>
<p>Dev 1) p2p_find<br>
</p>
<p><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">Dev </span>2) p2p_find<br>
</p>
<p><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">Dev </span>1) p2p_connect address pin keypad<br>
</p>
<p><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">Dev </span>2) p2p_connect address 1234563 keypad //where
<span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">
1234563</span> is the pin obtained from the previous command<br>
</p>
<p>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.<br>
</p>
<p><br>
</p>
<p><strong>But, if i want to disconnect and reconnect without problems, which is the correct procedure?</strong><br>
</p>
<p><strong>Because, if i recall p2p_connect, the answer is "FAIL", if i try to kill (with killall </strong><span class="s1" style="font-size:12pt"><strong>-SIGKILL) </strong></span><span style="font-size:12pt"><strong>wpa_su</strong></span><span style="font-size:12pt"><strong>pplicant
and wpa_cli and retry, the answer is always "FAIL". The only way to disconnect and reconnect is a complete reboot of all devices.</strong></span></p>
<p><br>
</p>
<p>Probably i don't understand something that is really really basic and easy ;)<br>
</p>
<p>Thank you very much,<br>
</p>
<p>please help me ;)<br>
</p>
<p>Stefano Cappa<br>
</p>
</div>
</body>
</html>