So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By DAD405
#69726 Have done the test.
By using the IP of the Server everything is working.
Seems to be an DNS issue.

The DNS is set by DHCP for all other clients and should be for the ESP too.
How can I check the DNS settings of the ESP?
Shoud there be any settings on Wifi-Init?

Wifi-Init-Code (for Button mode) is:
Code: Select all
  uint ADCValue = 0;                        // Batteriespannung messen
  ADCValue = ESPm.getVcc() - 0 + 200;               //org 164  hier Korrektur Wert eintragen -60 2,92 -40 2,95 -0 2,98
  float ADCfloat = float(ADCValue);     // ist: 3,35 +200
  String Ubatt = "";
  Ubatt = String(ADCfloat / 1000, 2) + "V";
  LEDoff();
 
  WiFi.mode(WIFI_STA);
  String routername = "WifiBtn-"+String(ESPm.getFlashChipId());
  wifi_station_set_hostname((char *)routername.c_str());
# if defined  seriell
  Serial.println();
  Serial.print("Hostname: ");
  Serial.println(routername);
  Serial.print("Zyklus: ");
  Serial.println(Zyklus[0] - 1);
  Serial.print("U Batt:  ");
  Serial.println(Ubatt);
  Serial.print("Connecting to ");
  Serial.println (ssid);
  // Serial.print(" Pass: ");
  // Serial.println (passwort);
  Serial.print("URL:  ");
  Serial.println (url);
  Serial.print("Nachricht:  ");
  Serial.println (nachricht);
#endif
  LEDblau();
 
WiFi.begin(ssid, passwort);

#if not defined seriell       // Vorbereiten das LED
  pinMode(LEDpin, OUTPUT);
#endif

  while (WiFi.status() != WL_CONNECTED)
  {
    timout++;
    if  (timout > 60) // Wenn Anmeldung nicht möglich
    {
      WiFi.forceSleepBegin();       // Sender OFF um Strom zu sparen
     
    #if defined seriell
        Serial.println("");
        Serial.println("Netzwerk nicht gefunden (Tiemeout)");
        LEDrot();
        delay(5000);
        LEDoff();
    #else
      //pinMode(LEDpin, OUTPUT);
      //digitalWrite(LEDpin, 0);    // LED ON für 5 Sekunden
      //LEDrot; 
      LEDrot();
      delay(5000);
      LEDoff();
      //digitalWrite(LEDpin, 1);
    #endif
      // Schlafen legen...
     #if defined  seriell
      Serial.println("");
      Serial.println("Go to Deepsleep");
     #endif
      WiFi.forceSleepWake();      // Sender ON, sonst beim nächsten aufwachen geht WiFi nicht
      LEDoff();
      ESPm.deepSleep(0, WAKE_RFCAL);
      delay(100);
    }         // End timeout