<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>Ok, i solved the problem in the previous question, thank u Peer Ilan XD. I'm not sure if i can reply to the previous email and continue the discussion&nbsp;or not.<br>
</p>
<p><br>
</p>
<p>But now i've another strange problem only with Nexus4 (Lollipop)<br>
</p>
<p>If i want to connect with &quot;p2p_connect address pin keypad&quot; one nexus 4 and one Nexus 5 with Lollipop,&nbsp;i can&nbsp;use this procedure:<br>
</p>
<p><span style="color: rgb(255, 0, 0);">-&gt;&nbsp;Change the SELinux context for wpa_supplicant with che command &quot;</span><span style="font-size: 12pt; color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">chcon u:object_r:system_file:s0 wpa_supplicant</span></span><span style="font-size: 12pt; color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">&quot;,
 because if i call directly wpa_cli i get this error: &quot;</span></span><span class="s1" style="font-size: 12pt; color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">Warning: Failed to attach to wpa_supplicant.</span></span><span style="font-size: 12pt; color: rgb(255, 0, 0);">&quot;</span><span style="font-size: 12pt; color: rgb(255, 0, 0);">.</span></p>
<p>-&gt;&nbsp;Dev&nbsp;1 - Nexus4) p2p_find<br>
</p>
<p><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);"><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">-&gt;&nbsp;</span>Dev
 2<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">&nbsp;- Nexus5</span></span><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">)
 p2p_find</span><br>
</p>
<p><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);"><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);"><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">-&gt;&nbsp;</span>Dev
 2&nbsp;- Nexus5</span><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">)
<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">
p2p_connect ad</span><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">dress pin&nbsp;keypad</span></span><br>
</span></p>
<p><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">-&gt;&nbsp;</span>Dev 1<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">&nbsp;-
 Nexus4</span>) p2p_connect address 213...3 keypad&nbsp;<br>
</p>
<p><br>
</p>
<p>With two nexus 5 with kitkat no problem, but with nexus 5 and 4 with lollipop i have this problem:<br>
</p>
<p><br>
</p>
<p>NEXUS 4 TERMINAL VIA ADB:<br>
</p>
<p class="p1"><span class="s1" style="font-size: 9pt;"><em>&gt; <strong>p2p_find</strong></em></span></p>
<p class="p1"><span class="s1" style="font-size: 9pt;"><em>OK&#8203;</em></span></p>
<p class="p1"><span class="s1" style="font-size: 9pt;"><em>&gt; <strong>p2p_peers</strong></em></span></p>
<p class="p1"><span class="s1" style="font-size: 9pt;"><em>&quot;nexus 5 address&quot;</em></span></p>
<p class="p1"><span class="s1" style="font-size: 9pt;"><em>&gt;<strong> p2p_connect <em style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255);">
&quot;nexus 5 address&quot;</em> 80391784 keypad</strong></em></span></p>
<p class="p1"><span class="s1" style="font-size: 9pt;"><em>OK</em></span></p>
<p class="p1"><span class="s1" style="font-size: 9pt; color: rgb(255, 0, 0);"><em style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">&gt; 'PING' command timed out. &nbsp;</span></em></span></p>
<p class="p1"><span class="s1" style="font-size: 9pt; color: rgb(255, 0, 0);"><em style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">Connection to wpa_supplicant lost - trying to reconnect</span></em></span></p>
<p class="p1"><span class="s1" style="font-size: 9pt; color: rgb(255, 0, 0);"><em style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">Connection to wpa_supplicant re-established</span></em></span></p>
<p class="p1"><span class="s1" style="font-size: 9pt; color: rgb(255, 0, 0);"><em style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">&gt;&nbsp;&nbsp;</span></em></span></p>
<p><br>
</p>
<p style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">NEXUS 5&nbsp;TERMINAL VIA ADB:<br>
</p>
<p class="p1"><span class="s1" style="font-size: 9pt;"><em>&gt;<strong> p2p_find</strong></em></span></p>
<p class="p1"><span class="s1" style="font-size: 9pt;"><em>OK</em></span></p>
<p class="p1"><span class="s1" style="font-size: 9pt;"><em>&lt;3&gt;P2P: Reject scan trigger since one is already pending</em></span></p>
<p class="p1"><span class="s1" style="font-size: 9pt;"><em>&lt;3&gt;CTRL-EVENT-SCAN-STARTED&nbsp;</em></span></p>
<p class="p1"><span class="s1" style="font-size: 9pt;"><em>&lt;3&gt;P2P-DEVICE-FOUND &quot;Nexus 4 address&quot; p2p_dev_addr=<em style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255);">&quot;Nexus 4 address&quot;&nbsp;</em> pri_dev_type=10-0050F204-5
 name='occam' config_methods=0x88 dev_capab=0x25 group_capab=0x0</em></span></p>
<p class="p1"><span class="s1" style="font-size: 9pt;"><em>&lt;3&gt;CTRL-EVENT-SCAN-STARTED&nbsp;</em></span></p>
<p class="p1"><span style="font-size: 12px;"><i>....</i></span></p>
<p class="p1"><span class="s1" style="font-size: 9pt;"><em>&lt;3&gt;CTRL-EVENT-SCAN-STARTED&nbsp;</em></span></p>
<p class="p1"><span class="s1" style="font-size: 9pt;"><em>&lt;3&gt;CTRL-EVENT-SCAN-STARTED&nbsp;</em></span></p>
<p class="p1"><span class="s1" style="font-size: 9pt;"><em><strong>&gt; p2p_connect </strong>
<em style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255);"><strong>&quot;Nexus 4 address&quot;&nbsp;</strong></em><strong>&nbsp;pin keypad</strong></em></span></p>
<p class="p1"><span class="s1" style="font-size: 9pt;"><em>80391784</em></span></p>
<p class="p1"><span class="s1" style="font-size: 9pt;"><em>&lt;3&gt;P2P-FIND-STOPPED&nbsp;</em></span></p>
<p class="p1"><span class="s1" style="font-size: 9pt;"><em>&lt;3&gt;P2P-GO-NEG-SUCCESS role=client freq=2412 ht40=0 peer_dev=<em style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255);">&quot;Nexus 4 address&quot;&nbsp;</em>
 peer_iface=12:68:3f:43:12:ab wps_method=Display</em></span></p>
<p class="p1"><span class="s1" style="font-size: 9pt;"><em>&lt;3&gt;CTRL-EVENT-SCAN-RESULTS&nbsp;&#8203;</em></span></p>
<p class="p1"><span class="s1" style="font-size: 9pt;"><em>...&nbsp;</em></span></p>
<p class="p1"><span class="s1" style="font-size: 9pt;"><em>&lt;3&gt;CTRL-EVENT-SCAN-RESULTS&nbsp;</em></span></p>
<p class="p1"><span class="s1" style="font-size: 9pt; color: rgb(255, 0, 0);"><em style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">&lt;3&gt;P2P-GROUP-FORMATION-FAILURE&nbsp;</span></em></span></p>
<p class="p1"><span class="s1" style="font-size: 9pt; color: rgb(255, 0, 0);"><em style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">&lt;3&gt;P2P-GROUP-REMOVED p2p-p2p0-0 client reason=FORMATION_FAILED</span></em></span></p>
<p class="p1"><span class="s1" style="font-size: 9pt; color: rgb(255, 0, 0);"><em style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">&lt;3&gt;P2P-DEVICE-LOST p2p_dev_addr=<em style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255);">&quot;Nexus
 4 address&quot;&nbsp;</em></span></em></span></p>
<p class="p1"><span class="s1" style="font-size: 9pt; color: rgb(255, 0, 0);"><em style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">&gt;&nbsp;</span></em></span></p>
<p style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;"><br>
</p>
<p style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;"><strong>LOGCAT:</strong><br>
</p>
<p style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">logcat says exactly the same things of wpa_cli with this new information (probably because i changed the SEContext of wpa_supplicant):<br>
</p>
<div><span style="font-size: 9pt;"><em>12-10 21:44:16.800: W/wpa_supplicant(709): type=1400 audit(0.0:7): avc: denied { create } for scontext=u:r:init:s0 tcontext=u:r:init:s0 tclass=packet_socket</em></span></div>
<div><span style="font-size: 9pt;"><em>12-10 21:44:16.800: W/wpa_supplicant(709): type=1400 audit(0.0:8): avc: denied { ioctl } for path=&quot;socket:[6959]&quot; dev=&quot;sockfs&quot; ino=6959 scontext=u:r:init:s0 tcontext=u:r:init:s0 tclass=packet_socket</em></span></div>
<div><span style="font-size: 9pt;"><em>12-10 21:44:16.800: W/wpa_supplicant(709): type=1400 audit(0.0:9): avc: denied { bind } for scontext=u:r:init:s0 tcontext=u:r:init:s0 tclass=packet_socket</em></span></div>
<div><span style="font-size: 9pt;"><em>12-10 21:44:16.808: I/wpa_supplicant(709): rfkill: Cannot open RFKILL control device</em></span></div>
<div><span style="font-size: 9pt;"><em>12-10 21:44:16.917: I/wpa_supplicant(709): rfkill: Cannot open RFKILL control device</em></span></div>
<div><br style="font-size: 9pt;">
<br>
<br>
</div>
<p style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;"><br>
</p>
<p style="font-family: Calibri, Arial, Helvetica, sans-serif;"><span style="font-size: 14pt;"><strong>The questions are:</strong><br style="">
</span></p>
<p style="font-family: Calibri, Arial, Helvetica, sans-serif;"><span style="font-size: 14pt;"><strong>1) Why with Nexus 4 with wpa_cli in interactive mode&nbsp;i can't see all the informations like with nexus 5?</strong><br style="">
</span></p>
<p style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;"><span style="font-size: 14pt;"><strong>2) Why the p2p_connect command doesn't work?</strong></span><br>
</p>
<p style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;"><span style="font-size: 14pt;"><strong><br>
</strong></span></p>
<p style="font-family: Calibri, Arial, Helvetica, sans-serif;"><span style="font-size: 12pt;">Thank u very much for the support,</span></p>
<div>Stefano Cappa<br>
<br>
</div>
<p><br>
</p>
</div>
</body>
</html>