OTA Not Working on Windows 11, But Still Works on Windows 10

Hello everyone,

I'm facing an issue with OTA (Over-the-Air) updates for my ESP8266 devices. I've recently upgraded to Windows 11, and I've noticed that OTA updates are no longer working as expected. My ESP8266 device doesn't appear in the network ports list

Here's what I've tried so far:

  • Reinstalled Arduino IDE: I'm using the latest version of Arduino IDE, and I've ensured that the ESP8266 board manager is up-to-date.
  • Installed Bonjour Service: I made sure to install Bonjour Print Services for Windows, as I know it's required for network device discovery.
  • Disabled Firewall/Antivirus: I temporarily disabled my firewall and antivirus to see if they were blocking the connection, but this didn't resolve the issue.
  • Checked Network Configuration: Both my Windows 11 machine and the ESP8266 are connected to the same Wi-Fi network.

The strange part is that OTA updates still work perfectly fine when I switch back to my old Windows 10 machine. The device shows up in the Arduino IDE, and the upload completes without any problems.

Has anyone else experienced similar issues with OTA on Windows 11? Are there any specific settings or additional steps I should take to get it working? Any help or suggestions would be greatly appreciated!

Thanks in advance for your support!

Hi @thinge77. Which version of Arduino IDE are you using (e.g., "2.0.1")? The version is shown on the window title bar and also in the dialog that opens when you select Help > About (or Arduino IDE > About Arduino IDE for macOS users) from the Arduino IDE menus.

I ask for this information because I want to give you the appropriate instructions for the IDE version you are using.

Hi ptillisch,
thank you for your reply
I am using:
Version: 2.3.2
Date: 2024-02-20T10:04:35.814Z
CLI Version: 0.35.3

best regards
thinge77

If you would like to do some troubleshooting, you can check whether the low level mdns-discovery tool used by the Arduino development software to find ports is behaving and able to see the port of your board.


:exclamation: This procedure is not intended to solve the problem. The purpose is to gather more information.


I'll provide instructions you can follow to do that:

During all this, keep an eye out for anything that doesn't match the expected behavior as described at each step.

  1. Open the following folder in Windows "File Explorer":
    C:\Users\<username>\AppData\Local\Arduino15\packages\builtin\tools\mdns-discovery
    
    (where <username> is your Windows username)
    Note that the AppData folder is hidden by default in "File Explorer". You can make it visible by opening the "View" menu, then checking the box next to "☐ Hidden items".
  2. The mdns-discovery folder will contain a subfolder for each of the versions of mdns-discovery which are installed on your computer.
    For example:
    mdns-discovery/
    ├── 0.9.2/
    ├── 1.0.2/
    └── 1.0.5/
    
  3. Hold the Shift key while clicking the right hand button on the mouse on the folder with the highest version (1.0.5 in the example above).
    A context menu will open.
  4. Select "Open PowerShell window here" from the menu.
    PowerShell will now open.
  5. Type the following command:
    mdns-discovery
    
  6. Press the Enter key.
    mdns-discovery will now start. There won't be any obvious sign of this other than that there is no longer a command prompt at the cursor in the terminal.
  7. Type the following command:
    HELLO 1 "arduino-cli 0.21.0"
    
  8. Press the Enter key.
    You should now see a response printed exactly like this:
    {
      "eventType": "hello",
      "protocolVersion": 1,
      "message": "OK"
    }
    
  9. Disconnect your Arduino board from its power source if you have it powered.
  10. Type the following command:
    START_SYNC
    
  11. Press the Enter key.
    You should now see a response printed exactly like this:
    {
      "eventType": "start_sync",
      "message": "OK"
    }
    
    You might also see some additional objects in the output depending on which network ports are available on your computer.
  12. Power your Arduino board.
    You should eventually see a response printed that looks something like this:
    {
      "eventType": "add",
      "port": {
        "address": "192.168.254.127",
        "label": "esp32-b4e62dbf693d at 192.168.254.127",
        "protocol": "network",
        "protocolLabel": "Network Port",
        "properties": {
          ".": "node32s",
          "auth_upload": "no",
          "board": "node32s",
          "hostname": "esp32-b4e62dbf693d.local.",
          "port": "3232",
          "ssh_upload": "no",
          "tcp_check": "no"
        }
      }
    }
    
    This is only an example of what you might see. The output will be different depending on the board you connected.
  13. Disconnect your Arduino board from its power source.
    You should eventually see a response printed that looks something like this:
    {
      "eventType": "remove",
      "port": {
        "address": "192.168.254.127",
        "label": "esp32-b4e62dbf693d at 192.168.254.127",
        "protocol": "network",
        "protocolLabel": "Network Port",
        "properties": {
          ".": "node32s",
          "auth_upload": "no",
          "board": "node32s",
          "hostname": "esp32-b4e62dbf693d.local.",
          "port": "3232",
          "ssh_upload": "no",
          "tcp_check": "no"
        }
      }
    }
    
    This is only an example of what you might see. The port data should be the same as the "add" event you saw when you plugged the board in.

You should continue to see the same results if you repeat steps (10) and (11).

Once you are done with your experiments with the "mdns-discovery" tool, follow these instructions to exit:

  1. Type the following command:
    STOP
    
  2. Press the Enter key.
    You should now see a response printed exactly like this:
    {
      "eventType": "stop",
      "message": "OK"
    }
    
  3. Type the following command:
    QUIT
    
  4. Press the Enter key.
    You should now see a response printed exactly like this:
    {
      "eventType": "quit",
      "message": "OK"
    }
    
    You should now be back at the shell command line.

Hi ptillisch,

I noticed that I only have version 1.0.9 installed on my computer.

I was able to follow the guide up to step 11, but unfortunately, no objects were found at that point.

Best regards,
thinge77

That is normal. The directory listing in my instructions was only an example; not intended to describe the exact contents you are expected to see.

This tells us that the lack of a discovery of the "network" port is not specific to the Arduino IDE application, but rather is at a lower level.

Does your Arduino sketch print debug information about the network connection to Serial? If so, check the Arduino IDE Serial Monitor to see whether it is successfully connecting to your Wi-Fi access point.

If your sketch doesn't print debugging information, try the basic example sketch for the ArduinoOTA library (this sketch does print debug information). You'll find the sketch at File > Examples > ArduinoOTA > BasicOTA in the Arduino IDE menus. Make sure to configure the credentials for your Wi-Fi access point in these lines of the example sketch:

#define STASSID "your-ssid"
#define STAPSK "your-password"

Check Your Network visibility in the network settings.

OTA from Windows (Visual Code/Platformio) only works with Ethernet being private.

Public will lead to:
09:29:10 [DEBUG]: Options: {'esp_ip': '192.168.2.123', 'host_ip': '0.0.0.0', 'esp_port': 8266, 'host_port': 56475, 'auth': 'admin', 'image': '.pio\\build\\ota_upload\\firmware.bin', 'spiffs': False, 'debug': True, 'progress': True} 09:29:10 [INFO]: Starting on 0.0.0.0:56475 09:29:10 [INFO]: Upload size: 320416 09:29:10 [INFO]: Sending invitation to: 192.168.2.123 Authenticating...OK 09:29:10 [INFO]: Waiting for device... 09:29:21 [ERROR]: No response from device

1 Like

Hi ptillisch & ih805_esp8266,

I changed the network settings to private, but unfortunately, nothing happened at first. Then, I followed ptillisch’s "mdns-discovery guide" with the network in private mode, and voilà – now I can see my devices!

I’m a bit nervous about restarting my computer now :blush:

I’ll do some more testing to make sure everything works smoothly and will update you soon.

Thanks so much for your help and guidance!

1 Like

I lost 2 hours of my life searching for the problem, and now it's finally solved. So, in capital letters, it should be stated that the OTA, i.e., the network port, can only be visible if your Wi-Fi network is private and not public. Thank you, ih805_esp8266.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.