-
Notifications
You must be signed in to change notification settings - Fork 13.3k
I can't use OTA update when ESP is an Access Point #5866
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
+1 I have this issue on NodeMcu v1 (SILABS / ESP 12-E), Windows 10, Arduino IDE and VS Code, all latest on git |
What do you think is the solution to this @bigFin |
I'm not sure, I was able to perform OTA in hard AP mode on my previous build of the esp8266 core (not sure what that was), but not on the devices that I've flashed with the current git branch. I was temporarily able to perform an OTA update in hard AP mode with ESP8266mDns and WiFiUDP disabled but this isn't working now. |
I just submitted a pull request that fixes the issue for me: PR 5894 |
More on this issue .. I was using the IP of the Device to upload .. |
@zacharydrew FYI, your pull request does not fix the issue for me. |
@bigFin, agreed. It’s a partial fix at best. It works intermittently for me or sometimes not at all. Before this change it never worked however. I did see somewhere you can still use the esptool tool upload the binary directly to the IP though. |
@zacharydrew I'm using ESP8266FS on VS code and I believe this extension utilizes ESPtool.py already. |
Esptool to the numerical IP address rather than the mDNS esp8266.local address. I hadn’t heard of ESP8266FS, I will have to take a look! |
@zacharydrew neither the IP or the .local address work for me. |
There is an update for mDNS in current master.
|
@d-a-v It does not work if Here is the Code :
|
Please try with |
Well, it worked once. mDNS Debugging enabled shows strange IP address after some time. |
can you tell me the name of the app you are using on your mobile phone ..
Yup .. I noticed that on my mobile phone I'm using an app Called "Service Browser" |
Service Browser too. There is a bug in UDP, I'm currently investigating. |
It appears that
It works on my android phone every time (with "Service Browser" app). |
I am waiting for the merge to test the UDP fix .. |
Basic Infos
Platform
Settings in IDE
Problem Description
I can't perform Arduino OTA update on an ESP serving as the access point on my network. The IDE fails to detect the network port when my laptop is connected to the network created by my ESP module. OTA works fine when I set the ESP as a station and connect it to another network with my laptop connected to that network also.
MCVE Sketch
#include <ESP8266WiFi.h>
#include <ESP8266mDNS.h>
#include <WiFiUdp.h>
#include <ArduinoOTA.h>
#ifndef STASSID
#define STASSID "my-ssid"
#define STAPSK "my-password"
#endif
IPAddress apIP(192, 168, 1, 1);
const char* ssid = STASSID;
const char* password = STAPSK;
void setup() {
Serial.begin(115200);
Serial.println("Booting");
WiFi.mode(WIFI_AP);
WiFi.softAPConfig(apIP, apIP, IPAddress(255, 255, 255, 0));
WiFi.softAP(ssid, password);
ArduinoOTA.begin();
Serial.println("Ready");
Serial.print("IP address: ");
Serial.println(WiFi.localIP());
}
void loop() {
ArduinoOTA.handle();
}
The text was updated successfully, but these errors were encountered: