<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.s1
        {mso-style-name:s1;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:372733247;
        mso-list-type:hybrid;
        mso-list-template-ids:2137695606 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:23.25pt;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:59.25pt;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:95.25pt;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:131.25pt;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:167.25pt;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:203.25pt;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:239.25pt;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:275.25pt;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:311.25pt;
        text-indent:-18.0pt;
        font-family:Wingdings;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Hi Stefano,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoListParagraph" style="margin-left:23.25pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1">
<![if !supportLists]><span style="font-size:11.0pt;font-family:Symbol;color:#1F497D"><span style="mso-list:Ignore">·<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span dir="LTR"></span><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">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).<o:p></o:p></span></p>
<p class="MsoListParagraph" style="margin-left:23.25pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1">
<![if !supportLists]><span style="font-size:11.0pt;font-family:Symbol;color:#1F497D"><span style="mso-list:Ignore">·<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span dir="LTR"></span><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Better not use SIGKILL as you won’t get clean shutdown of the wpa_supplicant.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Good luck,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Ilan.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> hostap-bounces@lists.shmoo.com [mailto:hostap-bounces@lists.shmoo.com]
<b>On Behalf Of </b>Stefano Cappa<br>
<b>Sent:</b> Wednesday, December 10, 2014 01:28<br>
<b>To:</b> hostap@lists.shmoo.com<br>
<b>Subject:</b> [Android] wpa_supplicant and wpa_cli problem with p2p_connect<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div id="divtagdefaultwrapper">
<p style="background:white"><span style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:black">​Hi, i'm working on wifi direct in android for my thesis at Politecnico of Milan in Italy.<o:p></o:p></span></p>
<p style="background:white"><span style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:black">I'm calling directly wpa_supplicant with wpa_cli via command line with adb in Android. Obviously​, i've recompiled Android from AOSP&nbsp;with the standard configuration to
 get wpa_cli and copied&nbsp;into the device.<o:p></o:p></span></p>
<p style="background:white"><span style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:black"><o:p>&nbsp;</o:p></span></p>
<p style="background:white"><span style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:black">If i want to connect
<span style="background:white">two devices</span>​&nbsp;with p2p_connect&nbsp;(for example with Lollipop, or Kitkat) i can use this procedure in wpa_cli:<o:p></o:p></span></p>
<p style="background:white"><span style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:black">Dev&nbsp;1) p2p_find<o:p></o:p></span></p>
<p style="background:white"><span style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:black;background:white">Dev&nbsp;</span><span style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:black">2) p2p_find<o:p></o:p></span></p>
<p style="background:white"><span style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:black;background:white">Dev&nbsp;</span><span style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:black">1) p2p_connect address pin keypad<o:p></o:p></span></p>
<p style="background:white"><span style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:black;background:white">Dev&nbsp;</span><span style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:black">2) p2p_connect address 1234563 keypad //where
<span style="background:white">1234563</span> is the pin obtained from the previous command<o:p></o:p></span></p>
<p style="background:white"><span style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:black">Ok, perfect, after some experiments&nbsp;i can connect this devices -&gt; group created and i can use the&nbsp;&quot;busybox&nbsp;ping -6 address&quot; command to ping the devices via wifi direct.<o:p></o:p></span></p>
<p style="background:white"><span style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:black"><o:p>&nbsp;</o:p></span></p>
<p style="background:white"><strong><span style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:black">But, if i want to disconnect and reconnect without problems, which is the correct procedure?</span></strong><span style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:black"><o:p></o:p></span></p>
<p style="background:white"><strong><span style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:black">Because, if i recall p2p_connect,&nbsp;the answer is &quot;FAIL&quot;, if i try to kill (with killall&nbsp;-SIGKILL)&nbsp;wpa_supplicant and wpa_cli and retry, the answer is&nbsp;always &quot;FAIL&quot;.
 The only way to disconnect and reconnect is a complete&nbsp;reboot of&nbsp;all&nbsp;devices.<o:p></o:p></span></strong></p>
<p style="background:white"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p style="background:white"><span style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:black"><o:p>&nbsp;</o:p></span></p>
<p style="background:white"><span style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:black">Probably i don't understand something that is really really basic and easy ;)<o:p></o:p></span></p>
<p style="background:white"><span style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:black">Thank you very much,<o:p></o:p></span></p>
<p style="background:white"><span style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:black">please help me ;)<o:p></o:p></span></p>
<p style="background:white"><span style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:black">Stefano Cappa<o:p></o:p></span></p>
</div>
</div>
</div>
</body>
</html>