<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Sorry guys for my inexperience, but this thing are driving me mad.<div><br></div><div>Tell me if i'm wrong.</div><div>Does the function at line 525 of the following link</div><div><br></div><div><a href="http://code.metager.de/source/xref/hostapd-wpa_supplicant/src/p2p/p2p_go_neg.c?r=0e0e1e564f3dd8d2a6b645d079b46eba0acc7f83" target="_blank">http://code.metager.de/source/xref/hostapd-wpa_supplicant/src/p2p/p2p_go_neg.c?r=0e0e1e564f3dd8d2a6b645d079b46eba0acc7f83</a></div><div><br></div><div>that is&nbsp;</div><div><br></div><div><pre style="border: 0px; margin-top: 0px; margin-bottom: 0px; background-color: rgb(255, 255, 255);"><b>void</b> <a href="http://code.metager.de/source/s?defs=p2p_process_go_neg_req&amp;project=hostapd-wpa_supplicant" style="text-decoration: none; color: rgb(32, 32, 98);">p2p_process_go_neg_req</a>(<b>struct</b> <a href="http://code.metager.de/source/s?defs=p2p_data&amp;project=hostapd-wpa_supplicant" style="text-decoration: none; color: rgb(32, 32, 98);">p2p_data</a> *<a href="http://code.metager.de/source/s?defs=p2p&amp;project=hostapd-wpa_supplicant" style="text-decoration: none; color: rgb(32, 32, 98);">p2p</a>, <b>const</b> <a href="http://code.metager.de/source/s?defs=u8&amp;project=hostapd-wpa_supplicant" style="text-decoration: none; color: rgb(32, 32, 98);">u8</a> *<a href="http://code.metager.de/source/s?defs=sa&amp;project=hostapd-wpa_supplicant" style="text-decoration: none; color: rgb(32, 32, 98);">sa</a>,
                            <b>const</b> <a href="http://code.metager.de/source/s?defs=u8&amp;project=hostapd-wpa_supplicant" style="text-decoration: none; color: rgb(32, 32, 98);">u8</a> *<a href="http://code.metager.de/source/s?defs=data&amp;project=hostapd-wpa_supplicant" style="text-decoration: none; color: rgb(32, 32, 98);">data</a>, <a href="http://code.metager.de/source/s?defs=size_t&amp;project=hostapd-wpa_supplicant" style="text-decoration: none; color: rgb(32, 32, 98);">size_t</a> <a href="http://code.metager.de/source/s?defs=len&amp;project=hostapd-wpa_supplicant" style="text-decoration: none; color: rgb(32, 32, 98);">len</a>, <b>int</b> <a href="http://code.metager.de/source/s?defs=rx_freq&amp;project=hostapd-wpa_supplicant" style="color: rgb(32, 32, 98);">rx_freq</a>)</pre><pre style="border: 0px; margin-top: 0px; margin-bottom: 0px; background-color: rgb(255, 255, 255);"><br></pre>represent the processing &nbsp;(performed by Device2) of the GO negotiation request that Device1 sent Device2?</div><div><br></div><div>This function performs at line 687</div><div><br></div><div><pre style="border: 0px; margin-top: 0px; margin-bottom: 0px; background-color: rgb(255, 255, 255);"><a href="http://code.metager.de/source/s?refs=p2p_go_det&amp;project=hostapd-wpa_supplicant" class="xf" style="text-decoration: none; color: rgb(0, 0, 255); font-weight: bold;">p2p_go_det</a>(<a href="http://code.metager.de/source/s?defs=p2p&amp;project=hostapd-wpa_supplicant" style="font-family: Calibri, sans-serif; font-size: 12pt; text-decoration: none; color: rgb(32, 32, 98);">p2p</a><span style="font-family: Calibri, sans-serif; font-size: 12pt;">-&gt;</span><a href="http://code.metager.de/source/s?defs=go_intent&amp;project=hostapd-wpa_supplicant" style="font-family: Calibri, sans-serif; font-size: 12pt; text-decoration: none; color: rgb(32, 32, 98);">go_intent</a><span style="font-family: Calibri, sans-serif; font-size: 12pt;">, *</span><a href="http://code.metager.de/source/s?defs=msg&amp;project=hostapd-wpa_supplicant" style="font-family: Calibri, sans-serif; font-size: 12pt; text-decoration: none; color: rgb(32, 32, 98);">msg</a><span style="font-family: Calibri, sans-serif; font-size: 12pt;">.</span><a href="http://code.metager.de/source/s?defs=go_intent&amp;project=hostapd-wpa_supplicant" style="font-family: Calibri, sans-serif; font-size: 12pt; text-decoration: none; color: rgb(32, 32, 98);">go_inten</a>t<span style="font-family: Calibri, sans-serif; font-size: 12pt;">)</span></pre><pre style="border: 0px; margin-top: 0px; margin-bottom: 0px; background-color: rgb(255, 255, 255);"><br></pre></div><div>which returns the highest GO intent between local GO intent and received one.</div><div>If I'm not wrong, according to what Arend told me Device2 get local GO intent from wpa_supplicant configuration file. But I've found only one way to set the local GO intent and it is here :</div><div><br></div><div><a href="http://code.metager.de/source/xref/hostapd-wpa_supplicant/src/p2p/p2p.c" target="_blank" style="font-size: 12pt;">http://code.metager.de/source/xref/hostapd-wpa_supplicant/src/p2p/p2p.c</a></div><div><br></div><div>at line 1387, into the function</div><div><br></div><div><pre style="border: 0px; margin-top: 0px; margin-bottom: 0px; background-color: rgb(255, 255, 255);"><pre style="border: 0px; margin-top: 0px; margin-bottom: 0px;"><b>int</b> <a class="xf" name="p2p_connect" style="color: rgb(0, 0, 255); font-weight: bold;"></a><a href="http://code.metager.de/source/s?refs=p2p_connect&amp;project=hostapd-wpa_supplicant" class="xf" style="text-decoration: none; color: rgb(0, 0, 255); font-weight: bold;">p2p_connect</a>(<b>struct</b> <a href="http://code.metager.de/source/s?defs=p2p_data&amp;project=hostapd-wpa_supplicant" style="text-decoration: none; color: rgb(32, 32, 98);">p2p_data</a> *<a class="xa" name="p2p" style="color: rgb(102, 0, 204); font-weight: bold;"></a><a href="http://code.metager.de/source/s?refs=p2p&amp;project=hostapd-wpa_supplicant" class="xa" style="text-decoration: none; color: rgb(102, 0, 204); font-weight: bold;">p2p</a>, <b>const</b> <a href="http://code.metager.de/source/s?defs=u8&amp;project=hostapd-wpa_supplicant" style="text-decoration: none; color: rgb(32, 32, 98);">u8</a> *<a class="xa" name="peer_addr" style="color: rgb(102, 0, 204); font-weight: bold;"></a><a href="http://code.metager.de/source/s?refs=peer_addr&amp;project=hostapd-wpa_supplicant" class="xa" style="text-decoration: none; color: rgb(102, 0, 204); font-weight: bold;">peer_addr</a>,
                <b>enum</b> <a href="http://code.metager.de/source/s?defs=p2p_wps_method&amp;project=hostapd-wpa_supplicant" style="text-decoration: none; color: rgb(32, 32, 98);">p2p_wps_method</a> <a href="http://code.metager.de/source/s?defs=wps_method&amp;project=hostapd-wpa_supplicant" style="text-decoration: none; color: rgb(32, 32, 98);">wps_method</a>,
                <b>int</b> <a href="http://code.metager.de/source/s?defs=go_intent&amp;project=hostapd-wpa_supplicant" style="text-decoration: none; color: rgb(32, 32, 98);">go_intent</a>, <b>const</b> <a href="http://code.metager.de/source/s?defs=u8&amp;project=hostapd-wpa_supplicant" style="text-decoration: none; color: rgb(32, 32, 98);">u8</a> *<a href="http://code.metager.de/source/s?defs=own_interface_addr&amp;project=hostapd-wpa_supplicant" style="text-decoration: none; color: rgb(32, 32, 98);">own_interface_addr</a>,
                <b>unsigned</b> <b>int</b> <a href="http://code.metager.de/source/s?defs=force_freq&amp;project=hostapd-wpa_supplicant" style="text-decoration: none; color: rgb(32, 32, 98);">force_freq</a>, <b>int</b> <a href="http://code.metager.de/source/s?defs=persistent_group&amp;project=hostapd-wpa_supplicant" style="text-decoration: none; color: rgb(32, 32, 98);">persistent_group</a>,
                <b>const</b> <a href="http://code.metager.de/source/s?defs=u8&amp;project=hostapd-wpa_supplicant" style="text-decoration: none; color: rgb(32, 32, 98);">u8</a> *<a href="http://code.metager.de/source/s?defs=force_ssid&amp;project=hostapd-wpa_supplicant" style="text-decoration: none; color: rgb(32, 32, 98);">force_ssid</a>, <a href="http://code.metager.de/source/s?defs=size_t&amp;project=hostapd-wpa_supplicant" style="text-decoration: none; color: rgb(32, 32, 98);">size_t</a> <a href="http://code.metager.de/source/s?defs=force_ssid_len&amp;project=hostapd-wpa_supplicant" style="text-decoration: none; color: rgb(32, 32, 98);">force_ssid_len</a>,
                <b>int</b> <a class="d" href="http://code.metager.de/source/xref/hostapd-wpa_supplicant/src/p2p/p2p.c#pd_before_go_neg" style="text-decoration: none; color: rgb(153, 0, 153); font-weight: bold;">pd_before_go_neg</a>, <b>unsigned</b> <b>int</b> <a href="http://code.metager.de/source/s?defs=pref_freq&amp;project=hostapd-wpa_supplicant" style="text-decoration: none; color: rgb(32, 32, 98);">pref_freq</a>, <a href="http://code.metager.de/source/s?defs=u16&amp;project=hostapd-wpa_supplicant" style="text-decoration: none; color: rgb(32, 32, 98);">u16</a> <a href="http://code.metager.de/source/s?defs=oob_pw_id&amp;project=hostapd-wpa_supplicant" style="text-decoration: none; color: rgb(32, 32, 98);">oob_pw_id</a>)</pre><pre style="border: 0px; margin-top: 0px; margin-bottom: 0px;"><br></pre>
<br></pre></div><div><br></div><div>According to what specifications say, it is used to start a GO negotiation.</div><div>So my question is, how can I set the local GO intent for Device2 without using p2p_connect() function?</div><div>I would make it by means of an android application. Can I do this?</div><div><br></div><div>Thanks for your help.</div><div>Andrea</div><div><br></div><div><br><div>&gt; Date: Wed, 14 May 2014 10:21:56 -0700<br>&gt; From: moon.linux@yahoo.com<br>&gt; Subject: Re: Wifi Direct GO Negotiation<br>&gt; To: arend@broadcom.com; andrea.chittano@hotmail.it<br>&gt; CC: hostap@lists.shmoo.com<br>&gt; <br>&gt; Hi Arend,<br>&gt; <br>&gt; I agree with what you said regarding the AP.<br>&gt; <br>&gt; One more question: Any device with WPS capabilty can join a P2P network.<br>&gt; <br>&gt; Thanks.<br>&gt; -Anand Moon<br>&gt; <br>&gt; <br>&gt; <br>&gt; On Wednesday, May 14, 2014 2:56 PM, Arend van Spriel &lt;arend@broadcom.com&gt; wrote:<br>&gt; On 14-05-14 05:03, Anand Moon wrote:<br>&gt; &gt; Hi All,<br>&gt; &gt; <br>&gt; &gt; I would like to add new question to this thread.<br>&gt; &gt; <br>&gt; &gt; If the AP has the capability to support p2p and wps, how will <br>&gt; &gt; these two devices communicate with the AP. <br>&gt; &gt; Will this AP become P2P group owner (P2P Go) and the other devices P2P Clients ?<br>&gt; <br>&gt; I am not sure whether this scenario makes sense. P2P typically involves<br>&gt; two STAs. They may be connected to some AP, but if both are connected to<br>&gt; the same AP there may be not so much need to setup a P2P connection.<br>&gt; <br>&gt; &gt; I would like to know how to judge if the wireless interface supports P2P<br>&gt; &gt; is it with the "Supported interface modes" or "Supported RX frame types" ? <br>&gt; &gt; <br>&gt; &gt; If the device support following p2p mode then how do we need to configure them. <br>&gt; &gt; <br>&gt; &gt; Supported interface modes: <br>&gt; &gt;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; * IBSS<br>&gt; &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; * managed<br>&gt; &gt;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; * AP * AP/VLAN <br>&gt; &gt;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; * monitor <br>&gt; &gt;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; * mesh point <br>&gt; &gt;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; * P2P-client <br>&gt; &gt;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; * P2P-GO <br>&gt; &gt; <br>&gt; &gt; How do we configure these P2P modes for interface?<br>&gt; &gt; Please share your thoughts.<br>&gt; <br>&gt; Just use nl80211 API, ie. NL80211_CMD_SET_INTERFACE. wpa_supplicant is<br>&gt; doing that in src/drivers/driver_nl80211.c<br>&gt; <br>&gt; Regards,<br>&gt; Arend<br>&gt; <br>&gt; <br>&gt; &gt; -Anand Moon<br>&gt; &gt; <br>&gt; &gt; <br>&gt; &gt; On Tuesday, May 13, 2014 6:31 PM, Arend van Spriel &lt;arend@broadcom.com&gt; wrote:<br>&gt; &gt; On 05/13/14 14:03, Andrea Chittano wrote:<br>&gt; &gt;&gt; Hi, my name is Andrea.<br>&gt; &gt;&gt; I'm working on WiFi Direct and I found a thread about it.<br>&gt; &gt;&gt; I've some doubts about it.<br>&gt; &gt;&gt; Let's suppose we have 2 devices. Let's call D1 and D2.<br>&gt; &gt;&gt; Let's suppose D1 sends a request of connection to D2 (D1 doesn't known<br>&gt; &gt;&gt; D2 so no persistent connection there exist).<br>&gt; &gt;&gt; The first step that wpa_supplicant on D1 is to send a GO negotiation<br>&gt; &gt;&gt; request containing, among all,GO intent (of D1).<br>&gt; &gt;&gt; I want to understand how wpa_supplicant on D2 acquires the GO intent of<br>&gt; &gt;&gt; D2 in order to compare it with whichone sent by D1.<br>&gt; &gt;&gt; Can someone explain me this?<br>&gt; &gt; <br>&gt; &gt; Both devices have their own go intent configuration in wpa_supplicant <br>&gt; &gt; configuration file. D2 sends own go intent value in the GO negotiation <br>&gt; &gt; response. The device with the highest GO intent will become GO.<br>&gt; &gt; <br>&gt; &gt; Regards,<br>&gt; &gt; Arend<br>&gt; &gt; <br>&gt; &gt;&gt; Thanks,<br>&gt; &gt;&gt; Andrea<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; _______________________________________________<br>&gt; &gt;&gt; HostAP mailing list<br>&gt; &gt;&gt; HostAP@lists.shmoo.com<br>&gt; &gt;&gt; http://lists.shmoo.com/mailman/listinfo/hostap<br>&gt; &gt; <br>&gt; &gt; <br>&gt; &gt; _______________________________________________<br>&gt; &gt; HostAP mailing list<br>&gt; &gt; HostAP@lists.shmoo.com<br>&gt; &gt; http://lists.shmoo.com/mailman/listinfo/hostap<br>&gt; &gt; <br>&gt; <br></div></div>                                               </div></body>
</html>