- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We have trouble using the following feature to keep track of wifi activities.
The changes are as follows:
Added to the main thread:
if (wwd_management_set_event_handler( event_type_trig,
event_handler, NULL, WICED_STA_INTERFACE ) != WWD_SUCCESS)
WPRINT_APP_INFO(("Failed to set event handlers! \n"));
The list of events is:
static const wwd_event_num_t event_type_trig[] = {WLC_E_BT_WIFI_HANDOVER_REQ, WLC_E_BCNRX_MSG, WLC_E_BEACON_FRAME_RX,WLC_E_WAKE_EVENT,WLC_E_PROBRESP_MSG,
WLC_E_ACTION_FRAME,WLC_E_PSK_SUP, WLC_E_PSM_WATCHDOG, WLC_E_WNM_STA_SLEEP, WLC_E_AUTH, WLC_E_BEACON_RX, WLC_E_ASSOC};
The event handler is:
void* event_handler ( const wwd_event_header_t* event_header, const uint8_t* event_data, /*@null@*/ void* handler_user_data )
{
WPRINT_APP_INFO(("\nCall back...\n\n"));
return NULL;
}
The program crashes when using WICED 6.1.
When using WICED 5.1, the program works fine, but beacon packets do not call the function.
We realized the the stack utilization is increases when using this feature. Nevertheless, even after removing most the variables, the program still crashes on 6.1.
Solved! Go to Solution.
- Labels:
-
Debug
-
softAP
-
TCPIP
-
WICED Studio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi :
I think you need to add WLC_E_NONE to the end of the array to see if the crash still exists.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Which WICED platform (MCU+WLAN module) are you using in your application? Try increasing the stack size of the thread. Use mallinfo and check how much memory is being consumed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi :
just find one instruction, we need to add WLC_E_NONE in every wwd_event_num_t array like below.
static const wwd_event_num_t link_events[] = { WLC_E_LINK, WLC_E_DEAUTH_IND, WLC_E_DISASSOC_IND, WLC_E_PSK_SUP, WLC_E_NONE };
please have a try.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
After adding WLC_E_NONE the program does not crash anymore. But no event is detected.
The event set looks like this:
static const wwd_event_num_t event_type_trig[] = {WLC_E_NONE, WLC_E_BT_WIFI_HANDOVER_REQ, WLC_E_BCNRX_MSG, WLC_E_BEACON_FRAME_RX,WLC_E_WAKE_EVENT,WLC_E_PROBRESP_MSG,
WLC_E_ACTION_FRAME,WLC_E_PSK_SUP, WLC_E_PSM_WATCHDOG, WLC_E_WNM_STA_SLEEP, WLC_E_AUTH, WLC_E_BEACON_RX, WLC_E_ASSOC};
And the event handler is set as this:
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"));
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi :
I think you need to add WLC_E_NONE to the end of the array to see if the crash still exists.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Adding WLC_E_NONE to the end of the list fixed the problem. No more crashes.
However, reception of beacon packets does not trigger the call back function.
What event must be added to the list to notify the call back function about beacon packets?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
bdezfouli_2507241 wrote:
However, reception of beacon packets does not trigger the call back function.
What event must be added to the list to notify the call back function about beacon packets?
(WLC_E_BEACON_RX, WLC_E_BEACON_FRAME_RX) are not implemented, see