My phone doesn`t connect to ESP32 soft ap

long585
Posts: 11
Joined: Mon Dec 26, 2016 8:19 am

My phone doesn`t connect to ESP32 soft ap

Postby long585 » 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!

ESP_Yake
Posts: 109
Joined: Mon Mar 06, 2017 12:23 pm

Re: My phone doesn`t connect to ESP32 soft ap

Postby ESP_Yake » Mon Mar 06, 2017 12:36 pm

Hi, You just lack of some param, here is my code. :)

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 = EXAMPLE_WIFI_SSID,
            .password = EXAMPLE_WIFI_PASS,              
	        .authmode = WIFI_AUTH_WPA2_PSK,        //Set auth mode,default mode is open
            .max_connection=3                       //Set max connection
        },

    };
    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() );
}

malikrahul2010
Posts: 2
Joined: Mon Jul 17, 2017 12:34 pm

Re: My phone doesn`t connect to ESP32 soft ap

Postby malikrahul2010 » Tue Jul 25, 2017 8:01 am

can you please prvide me the entire code...as I am unable to find out the header files and all...I am doing coding on arduino ide...
my email id is malikrahul2010@gmail.com

Who is online

Users browsing this forum: No registered users and 145 guests