- Thu Jan 29, 2015 1:11 pm
#8466
Hello everyone,
I'm using the esphttpd fw with some modifications for mqtt, but when i
change the SSID of the ESP in AP+STA mode, the
DHCP server just
don't work and i can't to connect with other device in the ESP, the only way to fix is to restore the device to the original settings, anyone had this kind of problem?
Here is my init function:
void user_init(void)
{
stdoutInit();
ioInit();
//system_restore();
/****** Print Some inf. about ESP ******/
os_printf("\n\n");
os_printf("\nPrinting AP Settings:\n");
struct softap_config cfgESP;
while(!wifi_softap_get_config(&cfgESP));
os_printf("\nSSID:%s",cfgESP.ssid);
os_printf("\nPASSWORD:%s",cfgESP.password);
os_printf("\nCHANNEL:%d",cfgESP.channel);
os_printf("\nAuthentification:%d",cfgESP.authmode);
os_printf("\nSSID Hidden:%d",cfgESP.ssid_hidden);
os_printf("\nMax Connections:%d",cfgESP.max_connection);
os_printf("\n\n");
/****** Change SSID ******/
memset(cfgESP.ssid, 0, 32);
strcpy(cfgESP.ssid, WIFI_APSSID);
wifi_softap_set_config(&cfgESP); /****** Init WS ******/
httpdInit(builtInUrls, 80);
os_printf("\nWebServer=Ready\n");
/****** MQTT polling to connect ******/
os_timer_disarm(&mqtt_timer);
os_timer_setfn(&mqtt_timer, (os_timer_func_t *)CheckForMQTT_cb, (void *)0);
os_timer_arm(&mqtt_timer, 500, 1);
os_printf("\nMQTT timer=Started\n");
}
Thanks.
You do not have the required permissions to view the files attached to this post.