Example sketches for the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By martinayotte
#52733 What can I say other than "it works for me" ... ;)

Maybe you should try connecting the same way I'm doing (maybe the WiFi.reconnect() is the reason) :

Code: Select allsetup() {
  char HostName[32];
  sprintf(HostName, "MyESPAP-%06X", ESP.getChipId());
  Serial.printf("Hello from %s !\r\n", HostName);
  Serial.println("Configuring Access Point ...");
  wifi_station_set_hostname(HostName);
  WiFi.softAP(HostName, password);
  WiFi.mode(WIFI_AP_STA);
  if (WiFi.SSID().length() > 0) {
    Serial.printf("ReConnecting to Remote AP '%s' ...\r\n", WiFi.SSID().c_str());
    WiFi.reconnect();
  }
  // more setup code here for other stuff
}
User avatar
By JimDrew
#52800 I don't have any of this:

Code: Select all  WiFi.softAP(HostName, password);
  WiFi.mode(WIFI_AP_STA);
  if (WiFi.SSID().length() > 0) {
    Serial.printf("ReConnecting to Remote AP '%s' ...\r\n", WiFi.SSID().c_str());
    WiFi.reconnect();
  }
Last edited by JimDrew on Fri Aug 12, 2016 7:46 pm, edited 1 time in total.