My phone doesn`t connect to ESP32 soft ap
Posted: Thu Mar 02, 2017 3:04 am
Code: Select all
static void initialise_wifi(void)
{
tcpip_adapter_init();
wifi_event_group = xEventGroupCreate();
ESP_ERROR_CHECK( esp_event_loop_init(wifi_event_handler, NULL) );
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
ESP_ERROR_CHECK( esp_wifi_init(&cfg) );
ESP_ERROR_CHECK( esp_wifi_set_storage(WIFI_STORAGE_RAM) );
wifi_config_t wifi_config = {
.ap = {
.ssid = WIFI_SSID,
.password = WIFI_PASSWD,
},
};
ESP_LOGI(TAG, "Setting WiFi configuration AP SSID:%s,STA SSID:%s", wifi_config.ap.ssid,wifi_config.sta.ssid);
ESP_ERROR_CHECK( esp_wifi_set_mode(WIFI_MODE_AP) );
ESP_ERROR_CHECK( esp_wifi_set_config(ESP_IF_WIFI_AP, &wifi_config) );
ESP_ERROR_CHECK( esp_wifi_start() );
}
Code: Select all
I (836) cpu_start: Starting scheduler on APP CPU.
I (836) wifi: frc2_timer_task_hdl:3ffbe4c8, prio:22, stack:2048
I (846) wifi: Init lldesc rx mblock:25
I (846) wifi: Init lldesc rx ampdu len mblock:7
I (846) wifi: Init lldesc rx ampdu entry mblock:4
I (846) wifi: pp_task_hdl : 3ffcb380, prio:23, stack:8192
I (856) zq_wifi_test: Setting WiFi configuration AP SSID:esp-AP,STA SSID:esp-AP
I (866) wifi: mode : sta (24:0a:c4:04:1d:1c) + softAP (24:0a:c4:04:1d:1d)
I (27016) wifi: n:1 0, o:1 0, ap:1 1, sta:0 0, prof:1
I (27016) wifi: max connection already. unexpected aid!