ESP as a AP

anupak
Posts: 1
Joined: Wed Sep 09, 2015 10:28 pm

ESP as a AP

Postby anupak » Wed Sep 09, 2015 10:39 pm

Hi,

I am trying to use the ESP-01 as an AP (with AUTH_WPA_WPA2_PSK) authorization. I have based my code off the sample code. The ESP does behave as a AP, but with no authentication (i.e. open network). Am I missing something?

My code is as follows:

Code: Select all

/* Setup the Acess point settings */
void ICACHE_FLASH_ATTR user_set_ap_config(void)
{
    struct softap_config config;

    wifi_set_opmode(0x02);

    wifi_softap_get_config(&config); // Get config first.
    os_memset(config.ssid, 0, 32);
    os_memset(config.password, 0, 64);
    os_memcpy(config.ssid, SSID, os_strlen(SSID)); // Changes from sample
    os_memcpy(config.password, PASSWORD, os_strlen(PASSWORD));  // Changes from sample
    config.authmode = AUTH_WPA_WPA2_PSK;
    config.ssid_len = 0;// or its actual length
    config.max_connection = 4; // how many stations can connect to ESP8266 softAP at most.

    wifi_softap_set_config(&config);// Set ESP8266 softap config .
}


FYI: I am using an android phone to connect to ESP.

Regards
Anupak

ESP_Faye
Posts: 1646
Joined: Mon Oct 27, 2014 11:08 am

Re: ESP as a AP

Postby ESP_Faye » Fri Sep 18, 2015 2:46 pm

Hi,

What a strange problem !

Maybe you could provide your bin files and I'll test it .

Who is online

Users browsing this forum: No registered users and 2 guests