Change WiFI channel without stop and start

snahmad75
Posts: 445
Joined: Wed Jan 24, 2018 6:32 pm

Change WiFI channel without stop and start

Postby snahmad75 » Wed Nov 28, 2018 4:33 pm

Hi,

While my application is running. I need to change WiFi Access point channel. which takes time. Also ping app on mobile phone. gets timeout. It takes 30 seconds to gets reconnect. It would Phone WiFi has long timeout or ping have.
I can use Windows Laptop. may be it is better. Can I specify client WiFI timeout.

but I have to do

esp_wifi_stop
then start
// configure the softAP and start it */
wifi_config_t ap_config;
ap_config.ap.ssid_len = 0;
ap_config.ap.channel = 3;
ap_config.ap.authmode = WIFI_AUTH_WPA2_PSK;
ap_config.ap.ssid_hidden = wifi_settings.ap_ssid_hidden;
ap_config.ap.max_connection = AP_MAX_CONNECTIONS;
ap_config.ap.beacon_interval = AP_BEACON_INTERVAL;
memcpy(ap_config.ap.ssid, wifi_settings.ap_ssid, sizeof(wifi_settings.ap_ssid));
memcpy(ap_config.ap.password, wifi_settings.ap_pwd, sizeof(wifi_settings.ap_pwd));

ESP_ERROR_CHECK(esp_wifi_set_config(WIFI_IF_AP, &ap_config));
ESP_ERROR_CHECK(esp_wifi_start());

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot] and 60 guests