Could you look into this example /43xxx_Wi-Fi/apps/snip/link_status/link_status.c
This provides some insight in reconnecting an STA to an AP after STA loses connection with the AP.
Thanks for the response.
we have looked into this example /43xxx_Wi-Fi/apps/snip/link_status/link_status.c . This is what we are following in our application for connection process.
we have debbugged this issue and below are observations
1. Device is not connecting to Linux Based SoftAp after disconnection either by surprise power off or by going out of the range.
In both the cases Linux Based SoftAp is not aware of the disassociation of the device and assumes that device is still connected and rejects all the association requests.
logs of Softap are below:
wlan1: STA IEEE 802.11: Station sent another assoc req before assoc resp. Discarding
But we tested the Pod with the Standard D-link router where it is able to reconnect without any issues.
2. Android mobile is able to reconnect to softap in both the scenarios. Captured wireshark logs in monitor mode for both Mobile and our Device scenarios and found that mobile is sending a deauthentication frame after couple of association requests are failed.
3. Explored the Wiced SDK code to send the deauthentication packet from our device in the above scenario. But didn't find any suitable API.
Is there any API to send deauthentication packet to access point ?
we tried with this api also, still the issue is there.
if ((result = wiced_network_up(WICED_STA_INTERFACE, WICED_USE_EXTERNAL_DHCP_SERVER, NULL)) != WICED_SUCCESS)
printf(( "Failed to bring up network\r\n" ));
if (result == 1025)
result = wwd_wifi_deauth_all_associated_client_stas( WWD_DOT11_RC_UNSPECIFIED, WWD_STA_INTERFACE );
if(result != WWD_SUCCESS)
printf("Not able to deauthenticate\n");
result = WICED_ERROR;
Is above method is correct to deauthenticate?
I tested this again by running the link_status application on a CYW43907 using WICED 6.4
I set up a PC running ubuntu 18.04 LTS as a softAP. Also i tried it out with an android phone.
In both the cases as soon as i turn off the AP, my device(CYW43907) disconnects and automatically connects back without any issues or use of any other API.
What you are facing seems to be a project specific issue. Could you indicate the type of linux based softAP being used, the setup and could you share your project so that i could look into it?
I also tested by turning off the AP, in that case our device((CYW43907) ) able to connect back without any issues.
Could you please try by powering off the (CYW43907) device?
and also test by taking your device (CYW43907) out of range from softap and come back?
I tried both the test cases you requested and it seems to be reconnecting to my linux based softAP without any issues.
How much time it is taking to connect back once it comes in range?
will it send deauthentication frame automatically once it disconnects?
Have you noticed any deauthentication frame received by softap when you go out of range in wireshark logs?
In softAP, if you see hostapd configuration file, there is ap_max_inactivity timeout variable. After this timeout our device is able to connect back in both the scenarios. If this timeout is too long then it won't connect.
How much is ap_max_inactivity_timeout in your softAP?
In link_status application, it is not using any deauthentication api to send to softAP.
Can you make sure that wwd_wifi_deauth_sta() is working? It looks like it is sending deauthentication packets only if it is configured as AP, if it joins as station to softAP then it is not sending any deauthentication packet to softAP.
In our project softAP, ap_max_inactivity timeout is 10000 sec. Mobile is able to connect in both scenarios with this. But our device is not able to connect with this.
Can you try with this change in hostapd.conf file?
Have you verified with above change?