- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Team,
I am working on wiced 6.4 sdk in FREE_RTOS platform.
After joining to access point if you go out of range from router and come back it is not able to rejoin again.
I am using wiced_network_up() and wiced_network_down() for connection and disconnection.
If you go out of range will device send any notification to router that it is disassociating?
what if it didn't send notification to router that it is disassociating and attempts to connect again?
Thanks,
Raviteja.
- Tags:
- confirguring wifi
- connecting to wifi
- freertos-lwip
- wiced wifi-101
- wiced-studio
- wifi
- wifi ap
- wifi applications
- wifi driver
- wifi onboarding
- wifi only
- wifi protocols
- wifi psoc
- wifi security
- wifi station
- wifi tutorial
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Raviteja
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
Murali
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Murali,
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 ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Raviteja
Could you try it out with this API?
Thanks
Murali
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is above method is correct to deauthenticate?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried both the test cases you requested and it seems to be reconnecting to my linux based softAP without any issues.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Have you verified with above change?