Not able to connect SSID at Mobile WiFi List for MODE_APSTA [ error: wifi:max connection, deauth ]
Posted: Thu Feb 03, 2022 10:30 am
Hello Sir,
I am using ESP32 WROOM Chip. I have configured ESP32 as AP and Station mode same time.
As I configured ESP32 as both modes, For AP mode SSID I have given as "SSID1" and for Station Mode, I have given SSID as "AnandRaman"
I am able to connect the ESP32 station to my home router SSID which is "AnandRaman" and I can get the IP address and the internet
when I am selecting the SSID from my mobile wifi list, I am getting error like I (62922) wifi:max connection, deauth!
s_wifi_event_group = xEventGroupCreate();
ESP_ERROR_CHECK(esp_netif_init());
ESP_ERROR_CHECK(esp_event_loop_create_default());
esp_netif_create_default_wifi_sta();
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
ESP_ERROR_CHECK(esp_wifi_init(&cfg));
esp_event_handler_instance_t instance_any_id;
esp_event_handler_instance_t instance_got_ip;
ESP_ERROR_CHECK(esp_event_handler_instance_register(WIFI_EVENT,ESP_EVENT_ANY_ID,&event_handler,NULL,&instance_any_id));
ESP_ERROR_CHECK(esp_event_handler_instance_register(IP_EVENT,IP_EVENT_STA_GOT_IP,&event_handler,NULL,&instance_got_ip));
ESP_ERROR_CHECK(esp_event_handler_instance_register(WIFI_EVENT,ESP_EVENT_ANY_ID,&wifi_event_handler,NULL,NULL));
wifi_config_t wifi_config1 = {
.ap = {
.ssid = EXAMPLE_ESP_WIFI_AP_SSID,
.password = EXAMPLE_ESP_WIFI_AP_PASS,
},
};
wifi_config_t wifi_config2 = {
.sta = {
.ssid = EXAMPLE_ESP_WIFI_SSID,
.password = EXAMPLE_ESP_WIFI_PASS,
},
};
ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_APSTA));
ESP_ERROR_CHECK(esp_wifi_set_config(ESP_IF_WIFI_AP, &wifi_config1));
ESP_ERROR_CHECK(esp_wifi_set_config(ESP_IF_WIFI_STA, &wifi_config2));
ESP_ERROR_CHECK(esp_wifi_start());
Can we connect ESP32 with AP mode and Staton Mode same time ??
error: wifi:max connection, deauth
Please find the attachment. Thanks
I am using ESP32 WROOM Chip. I have configured ESP32 as AP and Station mode same time.
As I configured ESP32 as both modes, For AP mode SSID I have given as "SSID1" and for Station Mode, I have given SSID as "AnandRaman"
I am able to connect the ESP32 station to my home router SSID which is "AnandRaman" and I can get the IP address and the internet
when I am selecting the SSID from my mobile wifi list, I am getting error like I (62922) wifi:max connection, deauth!
s_wifi_event_group = xEventGroupCreate();
ESP_ERROR_CHECK(esp_netif_init());
ESP_ERROR_CHECK(esp_event_loop_create_default());
esp_netif_create_default_wifi_sta();
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
ESP_ERROR_CHECK(esp_wifi_init(&cfg));
esp_event_handler_instance_t instance_any_id;
esp_event_handler_instance_t instance_got_ip;
ESP_ERROR_CHECK(esp_event_handler_instance_register(WIFI_EVENT,ESP_EVENT_ANY_ID,&event_handler,NULL,&instance_any_id));
ESP_ERROR_CHECK(esp_event_handler_instance_register(IP_EVENT,IP_EVENT_STA_GOT_IP,&event_handler,NULL,&instance_got_ip));
ESP_ERROR_CHECK(esp_event_handler_instance_register(WIFI_EVENT,ESP_EVENT_ANY_ID,&wifi_event_handler,NULL,NULL));
wifi_config_t wifi_config1 = {
.ap = {
.ssid = EXAMPLE_ESP_WIFI_AP_SSID,
.password = EXAMPLE_ESP_WIFI_AP_PASS,
},
};
wifi_config_t wifi_config2 = {
.sta = {
.ssid = EXAMPLE_ESP_WIFI_SSID,
.password = EXAMPLE_ESP_WIFI_PASS,
},
};
ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_APSTA));
ESP_ERROR_CHECK(esp_wifi_set_config(ESP_IF_WIFI_AP, &wifi_config1));
ESP_ERROR_CHECK(esp_wifi_set_config(ESP_IF_WIFI_STA, &wifi_config2));
ESP_ERROR_CHECK(esp_wifi_start());
Can we connect ESP32 with AP mode and Staton Mode same time ??
error: wifi:max connection, deauth
Please find the attachment. Thanks