<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 </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&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&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&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&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&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&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&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&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&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&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 (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&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&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;">-></span><a href="http://code.metager.de/source/s?defs=go_intent&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&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&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&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&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&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&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&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&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&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&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&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&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&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&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&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&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&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&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&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&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&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>> Date: Wed, 14 May 2014 10:21:56 -0700<br>> From: moon.linux@yahoo.com<br>> Subject: Re: Wifi Direct GO Negotiation<br>> To: arend@broadcom.com; andrea.chittano@hotmail.it<br>> CC: hostap@lists.shmoo.com<br>> <br>> Hi Arend,<br>> <br>> I agree with what you said regarding the AP.<br>> <br>> One more question: Any device with WPS capabilty can join a P2P network.<br>> <br>> Thanks.<br>> -Anand Moon<br>> <br>> <br>> <br>> On Wednesday, May 14, 2014 2:56 PM, Arend van Spriel <arend@broadcom.com> wrote:<br>> On 14-05-14 05:03, Anand Moon wrote:<br>> > Hi All,<br>> > <br>> > I would like to add new question to this thread.<br>> > <br>> > If the AP has the capability to support p2p and wps, how will <br>> > these two devices communicate with the AP. <br>> > Will this AP become P2P group owner (P2P Go) and the other devices P2P Clients ?<br>> <br>> I am not sure whether this scenario makes sense. P2P typically involves<br>> two STAs. They may be connected to some AP, but if both are connected to<br>> the same AP there may be not so much need to setup a P2P connection.<br>> <br>> > I would like to know how to judge if the wireless interface supports P2P<br>> > is it with the "Supported interface modes" or "Supported RX frame types" ? <br>> > <br>> > If the device support following p2p mode then how do we need to configure them. <br>> > <br>> > Supported interface modes: <br>> > * IBSS<br>> > * managed<br>> > * AP * AP/VLAN <br>> > * monitor <br>> > * mesh point <br>> > * P2P-client <br>> > * P2P-GO <br>> > <br>> > How do we configure these P2P modes for interface?<br>> > Please share your thoughts.<br>> <br>> Just use nl80211 API, ie. NL80211_CMD_SET_INTERFACE. wpa_supplicant is<br>> doing that in src/drivers/driver_nl80211.c<br>> <br>> Regards,<br>> Arend<br>> <br>> <br>> > -Anand Moon<br>> > <br>> > <br>> > On Tuesday, May 13, 2014 6:31 PM, Arend van Spriel <arend@broadcom.com> wrote:<br>> > On 05/13/14 14:03, Andrea Chittano wrote:<br>> >> Hi, my name is Andrea.<br>> >> I'm working on WiFi Direct and I found a thread about it.<br>> >> I've some doubts about it.<br>> >> Let's suppose we have 2 devices. Let's call D1 and D2.<br>> >> Let's suppose D1 sends a request of connection to D2 (D1 doesn't known<br>> >> D2 so no persistent connection there exist).<br>> >> The first step that wpa_supplicant on D1 is to send a GO negotiation<br>> >> request containing, among all,GO intent (of D1).<br>> >> I want to understand how wpa_supplicant on D2 acquires the GO intent of<br>> >> D2 in order to compare it with whichone sent by D1.<br>> >> Can someone explain me this?<br>> > <br>> > Both devices have their own go intent configuration in wpa_supplicant <br>> > configuration file. D2 sends own go intent value in the GO negotiation <br>> > response. The device with the highest GO intent will become GO.<br>> > <br>> > Regards,<br>> > Arend<br>> > <br>> >> Thanks,<br>> >> Andrea<br>> >><br>> >><br>> >><br>> >> _______________________________________________<br>> >> HostAP mailing list<br>> >> HostAP@lists.shmoo.com<br>> >> http://lists.shmoo.com/mailman/listinfo/hostap<br>> > <br>> > <br>> > _______________________________________________<br>> > HostAP mailing list<br>> > HostAP@lists.shmoo.com<br>> > http://lists.shmoo.com/mailman/listinfo/hostap<br>> > <br>> <br></div></div>                                            </div></body>
</html>