1 of 1 people found this helpful
You can try checking the active_join_mutex status; instead of your own semaphore which should give you the indication of assoc completed. If you are setting up WICED platform as a softAP, then you can check for WLC_E_ASSOC_IND for the event and put debug prints/asserts if necessary.
This is part of the code I am using:
static host_semaphore_type_t WICED_DEEP_SLEEP_SAVED_VAR( active_join_mutex );
result = wiced_rtos_init_semaphore(&active_join_mutex);
if ( result != WWD_SUCCESS )
/* could not create semaphore */
WPRINT_APP_ERROR(("||||||||| ERROR: Could not create LwIP semph_wifi_join_cmpltd_hdle semaphore"));
if (wwd_wifi_join_specific( (const) &alternative_ap, (const) security_key, key_length,
&active_join_mutex, WICED_STA_INTERFACE ) != WWD_SUCCESS)
WPRINT_APP_INFO(( "\nAlternate join failed! \n"));
WPRINT_APP_INFO(( "\n***JOIN SPECIFIC***: Switching the AP...! \n"));
WPRINT_APP_INFO(( "\n******Waiting for a join process to complete...******\n"));
host_rtos_get_semaphore( &active_join_mutex, NEVER_TIMEOUT, WICED_FALSE );
WPRINT_APP_INFO(( "\n******Semaphore for join has been set******\n"));
And the semaphore is never set!
Could you please provide a sample code for checking the mutex?
active_join_mutex is internal and cannot be accessed easily.
You can print the active_join_mutex status in a debug build by just putting a print statement
If you want to use the release build, you can print done variable in wwd_wifi_join_wait_for_complete in the following way
If the value of done is WICED_TRUE, the assoc process is not completed or if it is WICED_FALSE, the assoc process has gone through. I haven't tried using my own semaphore though but can try it if this does not help your use-case.