Wi-Fi Direct Probe response from GO

anjalik at iwavesystems.com anjalik
Sun Apr 19 23:07:03 PDT 2015


Hi,

I have mentioned the place where the function is returning.

void handle_probe_req(struct hostapd_data *hapd,
                       const struct ieee80211_mgmt *mgmt, size_t len)
{
        --------------------------
        --------------------------
        sta = ap_get_sta(hapd, mgmt->sa);
        if (elems.ssid_len == 0 ||
             (elems.ssid_len == hapd->conf->ssid.ssid_len &&
              os_memcmp(elems.ssid, hapd->conf->ssid.ssid, elems.ssid_len) ==
              0)) {
                 if (sta)
                         sta->ssid_probe = &hapd->conf->ssid;
         } else {
                 if (!(mgmt->da[0] & 0x01)) {
                         char ssid_txt[33];
                         ieee802_11_print_ssid(ssid_txt, elems.ssid,
                                               elems.ssid_len);
                         wpa_printf(MSG_MSGDUMP, "Probe Request from " MACSTR
                                    " for foreign SSID '%s' (DA " MACSTR ")",
                                    MAC2STR(mgmt->sa), ssid_txt,
                                    MAC2STR(mgmt->da));
                 }
                 return;  //*********The function returns here ********
         }

        --------------------------
        --------------------------
        --------------------------
        --------------------------

	resp = hostapd_gen_probe_resp(hapd, sta, mgmt, elems.p2p != NULL,
                                       &resp_len);
         if (resp == NULL){
                 wpa_printf(MSG_DEBUG,"handle_probe_req case 7");
                 return;
         }


        --------------------------
        --------------------------

}

In the logcat messages, I am getting the below print

I/wpa_supplicant( 2735): wfd0: CTRL-EVENT-CONNECTED - Connection to  
02:24:56:99:83:b8(GO MacID) completed (auth) [id=0 id_str=]

D/wpa_supplicant( 2735): CTRL_IFACE monitor send - hexdump(len=40): 2f  
64 61 74 61 2f 6d 69 73 63 2f 77 69 66 69 2f 73 6f 63 6b 65 74 73 2f  
77 70 61 5f 63 74 72 6c ...
D/wpa_supplicant( 2735): wpa_driver_nl80211_set_operstate: operstate 1->1 (UP)
D/wpa_supplicant( 2735): netlink: Operstate: linkmode=-1, operstate=6
D/wpa_supplicant( 2735): CTRL_IFACE monitor send - hexdump(len=40): 2f  
64 61 74 61 2f 6d 69 73 63 2f 77 69 66 69 2f 73 6f 63 6b 65 74 73 2f  
77 70 61 5f 63 74 72 6c ...
D/wpa_supplicant( 2735): P2P: Setting up WPS for GO provisioning
D/wpa_supplicant( 2735): AP: Set MAC address filter: 0f:1d:ae:fh:e6:9b
D/wpa_supplicant( 2735): WPS: Button pushed - PBC mode started

I guess the the connection is completed , so accordingly that  
particuar sta entry should be present.(Correct me if I am wrong).

Also I have another doubt regarding the sta entry. Does any kind of  
entry is done when the station sends a probe request to the AP?



> Date: Fri, 17 Apr 2015 15:18:06 +0300
> From: Jouni Malinen <j at w1.fi>
> Subject: Re: Wi-Fi Direct Probe response from GO
> To: hostap at lists.shmoo.com
> Message-ID: <20150417121806.GB12730 at w1.fi>
> Content-Type: text/plain; charset=us-ascii
>
> On Fri, Apr 17, 2015 at 01:38:22AM -0400, anjalik at iwavesystems.com wrote:
>> I analysed the code flow by adding debug prints  and reached the
>> function handle_probe_req(). In the function the station info is
>> obtained as
>>
>> sta = ap_get_sta(hapd, mgmt->sa);
>
>> I checked the value of s its null.
>
> Which is the normal case.. There is no STA entry before connection.
>
>> And returns from the
>> handle_probe_req() instead of moving to the hostapd_gen_probe_resp()
>> within the handle_probe_req().
>
> Where does the function return before calling hostapd_gen_probe_resp()?
>
> --
> Jouni Malinen                                            PGP id EFC895FA
>


> Message: 1
> Date: Fri, 17 Apr 2015 01:38:22 -0400
> From: anjalik at iwavesystems.com
> Subject: Wi-Fi Direct Probe response from GO
> To: hostap at lists.shmoo.com
> Message-ID: <20150417013822.19775pazrurkhg7i at iwavesystems.com>
> Content-Type: text/plain; charset=ISO-8859-1; DelSp="Yes";
> 	format="flowed"
>
> Hi,
>
> I have been searching for the pinpoint issue for the GO failure, the
> Group Formation timeout error. Seems like I got a clue. When the GO is
> created after G0 negotiation between the i.MX6 board and my android
> phone , I tried scanning from a third phone an I could see the board
> name (DIRECT-FG-Android_6cf4) in the AP list. So it is beaconing and
> started to act as AP.
>
> Logcat messages show that the GO device has received the probe request
> but no probe response being sent
>
> D/wpa_supplicant WPS: Probe Request for PBC received from
> 0f:1d:ae:fh:e6:9b (client mac id)
>
> I analysed the code flow by adding debug prints  and reached the
> function handle_probe_req(). In the function the station info is
> obtained as
>
> sta = ap_get_sta(hapd, mgmt->sa);
>
> where the ap_get_sta() is
>
> struct sta_info * ap_get_sta(struct hostapd_data *hapd, const u8 *sta)
> {
>          struct sta_info *s;
>          s = hapd->sta_hash[STA_HASH(sta)];
>          while (s != NULL && os_memcmp(s->addr, sta, 6) != 0)
>                  s = s->hnext;
>          return s;
> }
>
> I checked the value of s its null. And returns from the
> handle_probe_req() instead of moving to the hostapd_gen_probe_resp()
> within the handle_probe_req().
>
> I am stuck with this issue and cannot move forward. Any help would be
> appreciated.
>
>
> Thanks & Regards,
> Anjali





More information about the Hostap mailing list