WLC_E_BEACON_RX and WLC_E_BEACON_FRAME_RX handler in wifi.c

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
shedc_3597396
Level 1
Level 1
First like received

Hi,

I am working with a PhD student and we are trying to analyze the beacon frames in WiFi association. I'm using Wiced-Studio 6.2 with the CYW943907AEWVAL1F board.

I have the following code for the event handler:

if (wwd_management_set_event_handler( event_type_trig,

          event_handler, NULL, WICED_STA_INTERFACE ) != WWD_SUCCESS)

     WPRINT_APP_INFO(("\nFailed to set event handlers! \n"));

the events are:

static const wwd_event_num_t event_type_trig[]  = { WLC_E_BEACON_RX, WLC_E_BEACON_FRAME_RX, WLC_E_NONE};

the event handler:

void* event_handler ( const wwd_event_header_t* event_header, const uint8_t* event_data, /*@null@*/ void* handler_user_data )

{

     if (event_header->event_type == WLC_E_BEACON_FRAME_RX)

        WPRINT_APP_INFO(("\nWLC_E_BEACON_FRAME_RX!\n\n"));

     if (event_header->event_type == WLC_E_BEACON_RX)

        WPRINT_APP_INFO(("\nBEACONS received/lost indication !\n\n"));

    WPRINT_APP_INFO(("\nCall back...\n\n"));

    return NULL;

}

In the wifi.c:

     1. I added WLC_E_BEACON_RX and WLC_E_BEACON_FRAME_RX in the link_events array

     2. In the link_events_handler, I added WPRINT statements for their cases.

I'm not seeing anything triggered. Is there another statement I need to add somewhere to see the beacons?

0 Likes
4 Replies
lock attach
Attachments are accessible only for community members.
RaktimR_11
Moderator
Moderator
Moderator
500 replies posted 250 replies posted 100 replies posted

As discussed Beacon Frame Event Handler not triggering here, I understand that you need to keep track all the activities of the wifi driver, including any instances of beacon reception or loss of an expected beacon. In that case, you need to add the WLC_E_BEACON_RX, WLC_E_BEACON_FRAME in the link_events array just like you mentioned (It should be something like link_events = { WLC_E_LINK, WLC_E_DEAUTH_IND, WLC_E_DISASSOC_IND, WLC_E_PSK_SUP, WLC_E_BEACON_RX, WLC_E_BEACON_FRAME_RX ,WLC_E_NONE };.

I have a few questions regarding the part where you mentioned about "no trigger event". I suggested earlier enabling WPRINT_ENABLE_NETWORK_DEBUG macro in wiced_defaults.h and check the link events. I tested with snip.apsta by enabling that macro and switch the AP off/on following which I could note consistent link_up, link_down events.

  1. Are you not seeing these events in your application with the macro enabled and switching the AP ON/OFF?
  2. WLC_E_BEACON_RX provides the beacons received/lost event. My question is are you sure that CYW43907 is missing any beacon frame from the AP and if so you are not seeing any events? (Have you captured any sniffer traces for the same)

I am attaching the apsta console log here to explain what I am asking you to check.

I am seeing the link up and link downs.

I just realized that I never mentioned that this is being done with power save mode. As such, there should be beacons every interval of 100ms (or somewhere between 100-1000ms set by the AP).

I'm not seeing those beacons. The link up and link down happens fine but for our use case we need to check these beacons that are sent when the board wakes up.

0 Likes

Most likely the WLAN FW for 43907 does not have support for these events enabled hence even if you add the events in link_events, change the maximum number of link events, add support in the NS and all the necessary changes you won't see the events because those events won't be triggered by WLAN FW.

0 Likes

Would there be a place to find information on boards that support this? I couldn't find any such documentation.

I've also tried this with the BCM4343W and CYW954907AEVAL1F boards with no luck.

Furthermore, in the wifi.c, there is a comment that says:

/* Note - These are listed to keep gcc pedantic checking happy */

Does this mean that the following cases might not be supported in general for the Wiced boards?

0 Likes