esp8266 / esp8266/Arduino

I can't use OTA update when ESP is an Access Point

Open
#5,866 18 comments 1 reaction 0 assignees View on GitHub
Dominant language
C++
Stars
16.7k
Forks
13.1k
PR merge metrics
No merged PRs in 30d

Description

### Basic Infos
- [X] This issue complies with the [issue POLICY doc](https://github.com/esp8266/Arduino/blob/master/POLICY.md).
- [X] I have read the documentation at [readthedocs](https://arduino-esp8266.readthedocs.io/en/latest) and the issue is not addressed there.
- [X] I have tested that the issue is present in current master branch (aka latest git).
- [X] I have searched the issue tracker for a similar issue.
- [X] If there is a stack dump, I have decoded it.
- [X] I have filled out all fields below.

#### Platform

- Hardware: [ESP-12]
- Core Version: [latest git hash or date]
- Development Env: [Arduino IDE]
- Operating System: [Ubuntu]

### Settings in IDE

- Module: [Nodemcu]
- Flash Mode: [dio]
- Flash Size: [4MB]
- lwip Variant: [v2 Lower Memory]
- Reset Method: [nodemcu]
- Flash Frequency: [40Mhz]
- CPU Frequency: [80Mhz]
- Upload Using: [OTA]

### 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](https://stackoverflow.com/help/mcve) Sketch

#include
#include
#include
#include

#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();
}

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.