I have been trying at least two weeks ago to configure the device with softap+sta mode with your firmware, but always I can't see the ESP in my network list as AP, the code that I use to configure is this below. Have you tried to use the ESP in this mode with mqtt? I call this function before to connect with MQTT....
void configureAP()
{
static char ssid[33];
static char password[33];
static uint8_t macaddr[6];
struct softap_config apConfig;
os_bzero(&apConfig, sizeof(struct softap_config));
wifi_softap_get_config(&apConfig);
wifi_set_opmode(0x3);
switch(wifi_get_opmode())
{
case STATION_MODE:
INFO("Modo de operação: Station");
break;
case SOFTAP_MODE:
INFO("Modo de operação: Access Point Mode");
break;
case STATIONAP_MODE:
INFO("Modo de operação: Access Point Mode + Station");
break;
}
os_memset(apConfig.password, 0, sizeof(apConfig.password));
os_sprintf(password, "%s", WIFI_APPASSWORD);
os_memcpy(apConfig.password, password, os_strlen(password));
os_memset(apConfig.ssid, 0, sizeof(apConfig.ssid));
os_sprintf(ssid, "%s", WIFI_APSSID);
os_memcpy(apConfig.ssid, ssid, os_strlen(ssid));
//apConfig.authmode = AUTH_WEP;
apConfig.authmode = AUTH_WPA_WPA2_PSK;
//apConfig.authmode = AUTH_OPEN;
apConfig.channel = 4;
apConfig.max_connection = 2;
apConfig.ssid_hidden = 0;
wifi_softap_set_config(&apConfig);
wifi_softap_dhcps_start();
switch(wifi_softap_dhcps_status())
{
case DHCP_STOPPED:
INFO("\nDHCP Server parou!\n");
break;
case DHCP_STARTED:
INFO("\nDHCP Server foi iniciado!\n");
break;
}
}
Hi tuan,
I have been trying at least two weeks ago to configure the device with softap+sta mode with your firmware, but always I can't see the ESP in my network list as AP, the code that I use to configure is this below. Have you tried to use the ESP in this mode with mqtt? I call this function before to connect with MQTT....