I am running into this problem infrequently, where the first time wifi connection fails mysteriously, for the identical input parameters (SSID name, password, security type)
Tracing through the wwd_wifi_join function, it is clear that all the initial calls succeed. (at least returns the success code!)
wwd_wifi_set_block_ack_window_size(); // call succeeds
wwd_wifi_prepare_join(); // call succeeds
wwd_sdpcm_get_ioctl_buffer(); // returns params
wwd_sdpcm_send_ioctl(); // call succeeds
// So it finally comes to check, if the wifi stack is ready
wwd_wifi_is_ready_to_transceive( WWD_STA_INTERFACE ); // fails
So, when I try to make the call to wiced_join_ap_specific() in a loop with a few retries, wwd_wifi_is_ready_to_transceive() still fails.
The failure code returned by the wwd_wifi_is_ready_to_transceive() function is either
1006 (NOT_AUTHENTICATED) or 1024 (NETWORK_NOT_FOUND)
Note that the whole setup works fine, for the same AP in identical setup several times.
Once in a while, the above error happens. This makes it very unreliable.
Wondering if anyone has any thoughts on the above behavior?