SiliconLabs / wiseconnect

Next-generation Silicon Labs Wi-Fi API for SiWx91x chipset family.
Other
15 stars 10 forks source link

SL_WIFI_NETWORK_DOWN_EVENTS callback not invoked for 2 minutes after router unplugged #9

Open schoeler opened 1 year ago

schoeler commented 1 year ago

Hi,

We are testing the sad paths of our networking stack, and observe no indication that the router ssid has disappeared for two minutes. Is there a way to decrease the interval of time it takes for the sl stack to return a network down event?

Thanks,

image

Silabs-Chandra commented 1 year ago

Hello Schoeler, From the above log, it looks like disconnection event came with error code 0x10019 around 2min.. By default, rejon max retries is set to 20, which it takes around 2min to get the AP disappear event to the application. You can modify it by using advanced client configuration and changing max retries

sl_wifi_advanced_client_configuration_t reconnection_config = {0}; reconnection_config.max_retry_attempts = 10; status = sl_wifi_set_advanced_client_configuration(SL_WIFI_CLIENT_INTERFACE, &reconnection_config); if (status != SL_STATUS_OK) { printf("Failed to set advanced client interface configuration: 0x%lx\r\n", status); return; } Please, feel free to raise a salesforce case, if you have any further questions on this...!

schoeler commented 1 year ago

Thanks Chandra

I think we will adjust this parameter down to match the default TCP keepalive interval