Commit Graph
7 Commits
Author SHA1 Message Date
Valentin V. Bartenev 47f41847ac Improve OTA behaviour when WiFi is already connected
When startOTAUpdate() was called while the device was already connected
as a STA (web panel or MQTT active), it would bring up an open
"MeshCore-OTA" AP alongside the existing connection and report its IP
(softAPIP, typically 192.168.4.1) in the reply.  The OTA AsyncWebServer
also listens on the STA interface, so the update page was reachable via
the existing network IP, but that address was not reported.

Two problems with the old behaviour:
- Raising an open AP while a STA connection is active is a security
  concern.
- The reported AP address is not useful to a user who is already on the
  same network as the device; they would naturally try the STA IP.

New behaviour:
- If the device is already connected as a STA (WiFi.status() ==
  WL_CONNECTED), skip softAP() entirely and report WiFi.localIP() in
  the reply.  The OTA server is already reachable on that address.
- If there is no STA connection, keep the original behaviour: bring up
  the "MeshCore-OTA" AP and report softAPIP().

In both cases the reply now includes the network name so the user knows
which interface to connect to:
  STA: "Started: http://<ip>/update (WiFi: <ssid>)"
  AP:  "Started: http://<ip>/update (AP: MeshCore-OTA)"

If a user specifically wants to perform OTA via the dedicated AP, they
can disable the current WiFi interface first, after which startOTAUpdate
will fall into the AP path as before.
2026-05-08 03:49:35 +03:00
Jared Dohrman 46f0496865 feat: add mqtt client version to repeater app and cli 2026-04-22 13:29:03 +10:00
taco c7eea3915d fix: remove esp_wifi.h from esp32board.h
saves ~500 bytes of dram and allows Tbeam to compile again
2026-01-30 15:07:40 +11:00
recrof 585558a9bb added basic support for LilyGo Tlora C6 2025-05-30 14:31:44 +02:00
Scott Powell d8952f3710 * ESP32Board: can now download entire log file via OTA webserver (URL: /log) 2025-05-09 16:17:36 +10:00
Scott Powell f861b68a09 * refactor: ESP32 OTA lib-deps now selectively added 2025-03-23 17:36:31 +11:00
Scott Powell a4bb3782a4 * OTA update for ESP32 targets 2025-03-22 23:51:44 +11:00