Our system (with hardware ESP-07) has been using esp_iot_sdk_v1.1.0 without problem for sometime now. When we try to recompile our code with the latest SDK, we found out that we have problem with the system when running as SOFTAP_MODE. The part of our system code are as below,
void ICACHE_FLASH_ATTR wifictrl_StartSoftAP(void)
{
uint8_t mac[6];
struct softap_config apCfg;
struct ip_info ipinfo;
wifi_set_opmode(SOFTAP_MODE);
wifi_softap_dhcps_stop();
wifictrl_SetupDefaultAPCfg(&apCfg,&ipinfo);
wifi_softap_set_config(&apCfg);
wifi_set_phy_mode(PHY_MODE_11G);
wifi_set_broadcast_if(SOFTAP_IF);
wifi_set_ip_info(SOFTAP_IF, &ipinfo);
wifi_softap_dhcps_start();
wifiCtrl_ApStarted=1;
}
/*
* Prepare the default configuration setting according to setting in user_config.h
*/
void ICACHE_FLASH_ATTR wifictrl_SetupDefaultAPCfg(struct softap_config *pAPConfig, struct ip_info *pAP_Ip)
{
uint8_t mac[6];
int count;
wifi_get_macaddr(STATION_IF,mac);
count = os_sprintf(pAPConfig->ssid, WIFI_AP_NAME);
pAPConfig->ssid_len=count+(os_sprintf(&(pAPConfig->ssid[count]),"_%02X:%02X:%02X",
mac[3],mac[4],mac[5]));
os_sprintf(pAPConfig->password, "%s", WIFI_AP_PASSWORD);
pAPConfig->authmode = WIFI_AP_AUTHMODE;
pAPConfig->ssid_hidden = WIFI_AP_SSIDHIDDEN;
pAPConfig->channel = WIFI_AP_CHANNEL;
pAPConfig->max_connection = WIFI_AP_MAXCONN;
pAPConfig->beacon_interval=WIFI_AP_BEACON;
pAP_Ip->ip.addr=ipaddr_addr(WIFI_AP_IP);
pAP_Ip->gw.addr=ipaddr_addr(WIFI_AP_GATEWAY);
pAP_Ip->netmask.addr=ipaddr_addr(WIFI_AP_NETMASK);
}
Our testing are base on 2 type of client tring to connect to the system running under SOFTAP_MODE,
Client 1: Dell XPS15 Notebook with build in wifi adapter, running Windows10.
Client 2: Samasung Galaxy Note4 Phone running with Android 5.1.1.
We testing the same code with your SDK version 1.1.0, 1.1.2 and the latest 1.4.1_pre3 and the result are as below,
With SDK 1.1.0,
Client1: Can connect and obtain the IP from the system
Client2: Can connect and obtain the IP from the system
With SDK 1.1.2
Client1: Can Connect but unable to obtain the IP from the system.
Client2: Can connect and obtain the IP from the system
With SDK 1.4.1_pre3
Client1: Cannot connect at all, the client immediately reject when try to connect.
Client2: Cannot connect at all, the client immediately reject when try to connect.
Please help to look in to the problem and hopefully with the above result, will help you to troubleshot and find the problem bug as soon as possible.
Regards,
KH GohStatistics: Posted by khgoh — Wed Oct 28, 2015 11:46 am
]]>