<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, with <strong>Android</strong> Kitkat or Lollipop i can execute this commands without problems and use wpa_cli for p2p:<br>
</p>
<p><br>
</p>
<p class="p1"><span class="s1">1) wpa_supplicant -B -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf -N -B -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf</span></p>
<p class="p1"><span class="s1">2) wpa_cli -ip2p0 -p/data/misc/wifi/sockets </span></p>
<p class="p1"><span class="s1"><br>
</span></p>
<p class="p1"><span class="s1">Now, i want to create another network interface created in this way (with a "custom android kernel" to enable <span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">macvtap,
from Android Open Source Project</span>) :</span></p>
<p class="p1"><span class="s1"></span><span style="font-size: 12pt;">1) </span><span style="font-size: 12pt;">i</span><span style="font-size: 12pt;">p link add link wlan0 name INTERFACE_NAME type macvtap</span></p>
<p class="p2"><span class="s2">2) busybox ifconfig <span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">
INTERFACE_NAME</span> 10.169.129.42 netmask 255.255.248.0 up</span></p>
<p class="p2"><span class="s2">3) busybox ifconfig -a // and i can find the new network interface with MAC, IP... --> PERFECT</span></p>
<p class="p2"><span class="s2"><br>
</span></p>
<p class="p2"><span class="s2"><br>
Now i want to execute wpa_supplicant and wpa_cli with this network interface called in this example "<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">INTERFACE_NAME</span>":</span></p>
<p class="p2"><span class="s2">If i try with </span></p>
<p class="p2"><span class="s2">1) "</span><span style="font-size: 12pt;">w</span><span style="font-size: 12pt;">pa_supplicant -B -iINTERFACE_NAME -Dnl80211 -c/data/misc/wifi/I<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">NTERFACE_</span><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">NAME</span>_supplicant.conf" </span></p>
<p class="p2"><span style="font-size: 12pt;">with a conf file like wpa_supplicant, exactly the same with ctrl_interface=/data/misc/wifi/sockets, i get this error code "255".</span></p>
<p class="p2"><span style="font-size: 12pt;">Probably there are no available sockets in /data/misc/wifi/sockets ? Or, I need to use another conf file? I really don't know.</span></p>
<p class="p2"><span style="font-size: 12pt;"><br>
</span></p>
<p class="p2">I thought, mmm,<span style="font-size: 12pt;"> i can use wpa_cli interface_add </span>INTERFACE_NAME<span style="font-size: 12pt;"> "" nl80211 /data/misc/wifi/sockets, </span></p>
<p class="p2"><span style="font-size: 12pt;">but i get this error: </span><span class="s1" style="font-size: 12pt;">"Failed to connect to non-global ctrl_ifname: wlan0 error: No such file or directory </span><span style="font-size: 12pt;">255"</span></p>
<p class="p1"><span style="font-size: 12pt;"><br>
</span></p>
<p class="p1"><span style="font-size: 12pt;"><strong>My questions are:</strong></span></p>
<p class="p1"><span style="font-size: 12pt;"><strong> A) How can i execute wpa_supplicant + wpa_cli on a virtuale network interface in android?</strong></span></p>
<p class="p2"><strong> B) I need to create new sockets? How? I can use socat?</strong><br>
</p>
<p class="p2"><strong> C) The syntax of <span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);"> </span><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">wpa_cli
interface_add </span> is correct? Because i can't find a good documentation to this command. I searched in the source code to pass the parameters, but i'm not completely sure.</strong></p>
<p class="p2"><strong><br>
</strong></p>
<p class="p2">Thank u very much, </p>
<p class="p2">please help me, i'm working on this, since...i don't know... days days and days :( <br>
</p>
<p class="p1"><span class="s1"><br>
</span></p>
<p><br>
</p>
</div>
</body>
</html>