You can chat about native SDK questions and issues here.

User avatar
By Thomas Coin
#75255 Hello,

I'm working on the ESP Launcher dev platform.
My final goal is to:
    - add custom AT commands
    - send custom events through the AT UART
    - manages GPIOs (WPS button, Wi-Fi activity LED, ...)
    - embed UPnP IGD client

My first try is to enable the AT feature (at_init) and create an access point ("ESP8266", "1234567890"), but I am not enable to connect my smartphone on that AP (no ip).
Here is the code:
Code: Select allvoid ICACHE_FLASH_ATTR
user_set_softap_config(void)
{
    struct softap_config config;

    wifi_softap_get_config(&config);    // Get config first.
   
    os_memset(config.ssid, 0, 32);
    os_memset(config.password, 0, 64);
    os_memcpy(config.ssid, "ESP8266", 7);
    os_memcpy(config.password, "1234567890", 10);
    config.authmode = AUTH_WPA_WPA2_PSK;
    config.ssid_len = 0;   // or its actual length
    config.beacon_interval = 100;
    config.max_connection = 4;    // how many stations can connect to ESP8266 softAP at most.

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

void ICACHE_FLASH_ATTR
user_init(void)
{
    char buf[128] = { 0 };
    at_init();
#ifdef ESP_AT_FW_VERSION
    if ((ESP_AT_FW_VERSION != NULL) && (os_strlen(ESP_AT_FW_VERSION) < 64)) {
        os_sprintf(buf, "compile time:%s %s\r\n"ESP_AT_FW_VERSION, __DATE__, __TIME__);
    }
    else {
        os_sprintf(buf, "compile time:%s %s", __DATE__, __TIME__);
    }
#else
    os_sprintf(buf, "compile time:%s %s", __DATE__, __TIME__);
#endif
    at_set_custom_info(buf);
    at_port_print("\r\nready\r\n");
   
    user_set_softap_config();
}


Here are the logs :
Code: Select all ets Jan  8 2013,rst cause:1, boot mode:(3,3)

load 0x40100000, len 2592, room 16
tail 0
chksum 0xf3
load 0x3ffe8000, len 764, room 8
tail 4
chksum 0x92
load 0x3ffe82fc, len 676, room 4
tail 0
chksum 0x22
csum 0x22
                                                                               
2nd boot version : 1.7(5d6f877)
SPI Speed : 40MHz
SPI Mode : QIO
SPI Flash Size & Map: 32Mbit(512KB+512KB)
jump to run user2 @ 81000


mode : sta(2c:3a:e8:22:04:4d) + softAP(2e:3a:e8:22:04:4d)
add if0
add if1
bcn 100
add 1
aid 1
station: 04:d6:aa:11:9c:ee join, AID = 1
station: 04:d6:aa:11:9c:ee leave, AID = 1
rm 1
add 1
aid 1
station: 04:d6:aa:11:9c:ee join, AID = 1
station: 04:d6:aa:11:9c:ee leave, AID = 1
rm 1


If I remove all the AT related code, the SoftAP is working as expected.
If I remove all the SoftAP related code and create an AP using AT commands, I have the same issue : I can't connect on the created access point:
Code: Select allAT+GMR
AT version:1.4.0.0(May  5 2017 16:10:59)
SDK version:2.1.0(116b762)
compile time:Apr 10 2018 10:37:41
OK

AT+CWMODE_CUR=2
OK

AT+CWSAP_CUR="ESP8266","1234567890",5,3
OK

AT+CWSAP_CUR?
+CWSAP_CUR:"ESP8266","1234567890",5,3,4,0
OK


I have tried NONOS-SDK 2.0, 2.1 and 2.2 and I have the same issue.

Do you have any idea of what can be wrong here ?
I have have reported the issue an github (https://github.com/espressif/ESP8266_NONOS_SDK/issues/113

Thanks by advance.