Windows 10: ESP8266 hostByName fails on specific IPAddress

Discus and support ESP8266 hostByName fails on specific IPAddress in Windows 10 Network and Sharing to solve the problem; I'm using ESP8266's to create time controlled switches and I can't get an IPAddress to work with WiFi.hostByName().When the ESP units try to get an ntp... Discussion in 'Windows 10 Network and Sharing' started by rwhite1, Nov 25, 2019.

  1. rwhite1 Win User

    ESP8266 hostByName fails on specific IPAddress


    I'm using ESP8266's to create time controlled switches and I can't get an IPAddress to work with WiFi.hostByName().When the ESP units try to get an ntp Server address, all IPAddresses I try work except 192.168.1.243 which fails with "(IP unset)" and shows no network activity.

    The problem seems to occur when Wifi.config(), WiFi.hostByName() and possibly WiFi.hostname() are used together.Any ideas about why this one address doesn't work?

    Notes:

    Using win10-1903-18362

    Ideas tried that didn't work:
    1. Flush the DNS cache.
    2. Restart the router.
    3. Clean out the hosts file.
    4. Check the other devices an see that they don't use the address.
    5. Verify there's no reference to the address in the registry.
    6. Use a utility to search the network to see if the address is already online elsewhere.

    This is the simplified code:
    #include <ESP8266WiFi.h>
    #include <WiFiUdp.h>
    #include <stdio.h>
    #include <string.h>

    IPAddress hostIP = IPAddress(192, 168, 1, 243);
    IPAddress gateway = IPAddress(192, 168, 1, 1);
    IPAddress subnet = IPAddress(255, 255, 255, 0));

    void setup()
    {
    Serial.begin(115200);
    while(!Serial);
    WiFiUDP Udp;
    WiFiServer server(80);

    Serial.print("\nConnecting to ");
    Serial.println(ssid);
    WiFi.hostname("ESP8266_243");
    WiFi.begin(ssid, password);
    while (WiFi.status() != WL_CONNECTED)
    {
    delay(500);
    Serial.print(".");
    }
    Serial.println("\nWiFi connected.");

    WiFi.config(hostIP, gateway, subnet);
    Udp.begin(4333);
    IPAddress ntpServerIP;
    WiFi.hostByName("us.pool.ntp.org", ntpServerIP);
    } //Setup

    void Loop()
    {
    }

    :)
     
    rwhite1, Nov 25, 2019
    #1

  2. How to add a bypass ipaddress in firewall

    I'm getting a connection failure to one of my server from my local win 10 laptop and i want to rule out if its the firewall that is stopping it do so. So want to bypass just that ipaddress of my server in the firewall at my local laptop. Can someone please
    help on what can be the steps to do that?

    Thanks,
     
    jayanttrav, Nov 25, 2019
    #2
  3. Windows 10 fails to update


    When you finish testing the Avast suggestion, make sure that you restart your machine.

    Then if the issue persists, please return to the trouble shooting list in post# 89

    I think there are three steps that remain; the WU troubleshooter, reset WU components, and manual WU reset.
     
    Slartybart, Nov 25, 2019
    #3
  4. chideock Win User

    ESP8266 hostByName fails on specific IPAddress

    KB4025339 Fails Install 0x80070564


    Thanks
    I am trying Eagle 51's suggestions now. Windows Update troubleshooter found a bunch of errors and fixed all but one.The update is trying to download KB4025339 again. I'll see what happens. At step one troubleshooter finishes with one error unresolved "Potential Windows Update Database Error Detected-Not Fixed". Windows update stalled at 0%.

    At step 2 same troubleshooter error. The KB finished a new download failed to install.
    Did step 3 KB has downloaded but fails to install.

    If Eagle's suggestion doesn't work I'll try EdTittel's suggestion

    Tried bothe Eagle & Ed 's suggestions - do not work. Anyone else?

    I have noticed that the latest update for my nvidia drivers has failed to update. Wondering about that!
     
    chideock, Nov 25, 2019
    #4
Thema:

ESP8266 hostByName fails on specific IPAddress

Loading...
  1. ESP8266 hostByName fails on specific IPAddress - Similar Threads - ESP8266 hostByName fails

  2. WLAN failing to connect "The specific network is not available"

    in Windows 10 Gaming
    WLAN failing to connect "The specific network is not available": After turning on my Windows 11 laptop this morning, the wireless is refusing to connect. It was working fine last night.I have tried a number of troubleshooting steps, all to no avail:Restarted the laptop and routerForgotten the wireless networkUpdated the wireless adapter...
  3. WLAN failing to connect "The specific network is not available"

    in Windows 10 Software and Apps
    WLAN failing to connect "The specific network is not available": After turning on my Windows 11 laptop this morning, the wireless is refusing to connect. It was working fine last night.I have tried a number of troubleshooting steps, all to no avail:Restarted the laptop and routerForgotten the wireless networkUpdated the wireless adapter...
  4. CH340 Driver Not Recognized for ESP8266 Board in Device Manager

    in Windows 10 Software and Apps
    CH340 Driver Not Recognized for ESP8266 Board in Device Manager: I recently installed the CH340 drivers on my device for my ESP8266 board. However, when I connect the board, I don’t see the CH340 driver in Device Manager; it only shows as 'USB Serial Port default.' Could you please help me troubleshoot this issue?...
  5. CH340 Driver Not Recognized for ESP8266 Board in Device Manager

    in Windows 10 Gaming
    CH340 Driver Not Recognized for ESP8266 Board in Device Manager: I recently installed the CH340 drivers on my device for my ESP8266 board. However, when I connect the board, I don’t see the CH340 driver in Device Manager; it only shows as 'USB Serial Port default.' Could you please help me troubleshoot this issue?...
  6. WINDOWS NOT RECOGNISING ESP8266 MODULE

    in Windows 10 Gaming
    WINDOWS NOT RECOGNISING ESP8266 MODULE: I BOUGHT A NODEMCU ESP8266 WIFI MODULE AND CONNECTED IT TO MY LAPTOPWINDOWS 11,ASUS ROG G17.THE MODULE IS NOT RECOGNISED BY MY LAPTOP AND SHOWING THE FOLLOWING ERROR MESSAGE:-...
  7. WINDOWS NOT RECOGNISING ESP8266 MODULE

    in Windows 10 Software and Apps
    WINDOWS NOT RECOGNISING ESP8266 MODULE: I BOUGHT A NODEMCU ESP8266 WIFI MODULE AND CONNECTED IT TO MY LAPTOPWINDOWS 11,ASUS ROG G17.THE MODULE IS NOT RECOGNISED BY MY LAPTOP AND SHOWING THE FOLLOWING ERROR MESSAGE:-...
  8. Specific keys on laptop keyboard are failing

    in Windows 10 Drivers and Hardware
    Specific keys on laptop keyboard are failing: The keyboard on my laptop failed to type some keys. I removed one of them and cleaned it but didn't fix. Sometimes they work, but they mostly are failing. The keys that are failing are also in different zones of the keyboard. Assumed it was electronic issue, so replacement is...
  9. Check and Change Ipaddress for Sharp Ar6023N

    in Windows 10 Network and Sharing
    Check and Change Ipaddress for Sharp Ar6023N: Hi Guys, Please help on how i can check and change an IP address for my Sharp Ar6023N i want to add it to a network https://answers.microsoft.com/en-us/windows/forum/all/check-and-change-ipaddress-for-sharp-ar6023n/93fb8592-3df4-4cc3-864c-99e28c28dfe8
  10. Can only connect to network share using IPaddress

    in Windows 10 Network and Sharing
    Can only connect to network share using IPaddress: HI there. New to the group so Hi everyone and I hope you can shed some light on this.... I have 2 new PC's set up and running, connected to a NAS via a Switch. Internet is available via a router. I need to be able to access folders on and from both machines. I have...