Commit Graph
33 Commits
Author SHA1 Message Date
Valentin V. Bartenev 94d2ddf507 Web: tune httpd config to reduce browser freezes on slow ESP32
The ESP32 processes HTTP requests sequentially on a single task.
Under load — generating chunked HTML pages, running commands, or
serving sequential stats API calls — it can be slow to send data
or loop back to accept the next request.  The previous 2-second
recv/send timeouts were too tight for this: the httpd layer would
drop connections mid-transfer, causing the browser to hang or
show incomplete pages.

Raise recv_wait_timeout and send_wait_timeout from 2 s to 10 s
on both the HTTPS and HTTP-redirect servers, giving the ESP32
enough headroom to finish generating and sending responses without
the transport layer tearing down the connection prematurely.

Set backlog_conn to 0 on both servers. With the previous backlog
of 2, incoming connections completed the TCP handshake and queued
in the kernel while the ESP32 was busy.  The browser saw the
connection as open but received no HTTP response, causing it to
freeze indefinitely.  With backlog 0 (lwIP minimum), connections
that cannot be immediately accepted are refused outright, giving
the browser a fast, recoverable error instead of a silent hang.

Enable lru_purge_enable on the HTTPS server.  Browsers hold
keep-alive connections open for reuse.  With max_open_sockets = 2,
both slots can be occupied by idle keep-alive connections from the
same session, blocking a new connection attempt entirely.  LRU
purge automatically closes the least-recently-used idle keep-alive
connection to make room, ensuring the single client can always
reconnect without a server restart.
2026-05-06 22:14:28 +03:00
Valentin V. Bartenev 9b2358416c Web: yield in sendProgmemChunked loop to prevent task WDT reset
When sending large PROGMEM content in chunks over HTTPS, the lwIP TCP/IP
task (tiT) could monopolize CPU 0 for an extended period without ever
yielding, starving the IDLE0 task and triggering the task watchdog timer.

Add vTaskDelay(1) at the end of each iteration in sendProgmemChunked()
to yield to the scheduler between chunks, allowing the IDLE task to reset
the watchdog and preventing spurious reboots during web panel page loads.
2026-05-06 22:02:57 +03:00
Valentin V. Bartenev 4d404f5301 Web: align page chunk size to MBEDTLS_SSL_OUT_CONTENT_LEN to fix WDT reboot
The hardcoded kWebPageChunkSize of 768 bytes caused the task watchdog
to trigger when serving the web panel over HTTPS.  Each call to
httpd_resp_send_chunk() results in a separate TLS record encryption
via mbedTLS, which on ESP32-S3 uses DMA-backed AES-GCM (esp_aes_process_dma).

The gdma_disconnect() call inside that path enters a critical section,
blocking the IDLE0 task.  With 768-byte chunks, a large page response
requires many such DMA operations in tight succession, starving the IDLE
task long enough to trip the watchdog.

Replacing the hardcoded value with MBEDTLS_SSL_OUT_CONTENT_LEN aligns the
chunk size to the TLS output record buffer, minimising the number of TLS
records (and thus DMA encryption operations) needed to send a full page,
and keeping the httpd task within the watchdog timeout.

Fixes: task_wdt abort in sendProgmemChunked() -> httpd_ssl_send() ->
       esp_aes_process_dma() -> gdma_disconnect() on ESP32-S3.
2026-05-06 21:58:57 +03:00
Valentin V. Bartenev e99cee2a1b Web: pin HTTPS and redirect server tasks to core 0 at low priority
Set task_priority = tskIDLE_PRIORITY + 2 and core_id = 0 for both the
HTTPS server and the HTTP-to-HTTPS redirect server. This keeps web
serving off core 1, which handles radio and application logic, reducing
interference with time-sensitive operations.
2026-05-05 21:00:13 +03:00
Valentin V. Bartenev 46b0df7a4b Removed EastMesh MQTT broker support.
It's intended for Eastern Australia repeaters only.  Using original EastMesh
firmware is prefered in this case.
2026-04-28 00:52:26 +03:00
Valentin V. Bartenev f1912ff184 Added support for MeshCoreTel broker. 2026-04-27 03:15:00 +03:00
Jared Dohrman 4b83142b9e fix: start ota is now consistent across command sources 2026-04-23 09:27:48 +10:00
Jared Dohrman 5c50295552 fix: hide battery voltage range text for PMU-backed web stats 2026-04-22 18:06:29 +10:00
Jared Dohrman 46f0496865 feat: add mqtt client version to repeater app and cli 2026-04-22 13:29:03 +10:00
Jared Dohrman b1a32fa56b fix: make repeater stats battery display board-aware 2026-04-22 10:57:04 +10:00
Jared Dohrman 63e9368c84 fix: improve stats archive rotation and satellites trend handling 2026-04-21 19:14:17 +10:00
Jared Dohrman 0ad50e5bd0 repeater-mqtt-eastmesh-v1.3.8 2026-04-21 18:07:04 +10:00
Jared Dohrman eb1a934849 fix: set radio using , separator 2026-04-21 14:13:57 +10:00
Jared Dohrman 4ae00fcf46 fix: http use ctrl_port = 32769 2026-04-21 13:36:49 +10:00
Jared Dohrman bf57f342b3 fix: require configured mqtt iata before broker connect 2026-04-20 22:30:06 +10:00
Jared Dohrman bcce0071f1 feat: open full web CLI access and add panel redirect flow 2026-04-20 08:59:24 +10:00
Jared Dohrman 663f493817 web: cache repeater title across app and stats pages 2026-04-18 11:17:49 +10:00
Jared Dohrman d00fc588d3 fix(web-panel): apply 4-color thresholds to largest-block memory meters 2026-04-17 21:05:47 +10:00
Jared Dohrman 64402c7f5e fix: improve web stats startup and memory indicators 2026-04-17 17:40:32 +10:00
Jared Dohrman 05fcffc838 fix: start web stats capture from boot on >=4MB PSRAM boards 2026-04-17 14:42:51 +10:00
Jared Dohrman d412e3e84a fix: improve repeater stats UX and persist ESP32 fallback clock 2026-04-17 12:17:35 +10:00
Jared Dohrman ec5406dcc6 fix: tune /stats radio RSSI graph for LoRa signal ranges 2026-04-15 19:05:54 +10:00
Jared Dohrman 656bfdbc67 fix: correct radio RSSI graph scaling on /stats 2026-04-15 18:56:59 +10:00
Jared Dohrman 4000742861 fix: tune /stats noise floor meter thresholds 2026-04-15 18:47:32 +10:00
Jared Dohrman 43b8f5879c fix: correct /stats descending meter ranges 2026-04-15 18:28:49 +10:00
Jared Dohrman 3919a6e36f fix: clean up web panel build filters and tune /stats signal meters 2026-04-15 17:59:23 +10:00
Jared Dohrman f67aaebe7e feat: add SD-backed stats archive and dedicated /stats web console 2026-04-15 17:12:32 +10:00
Jared Dohrman de071cbb79 fix: reduce repeater web panel pressure and improve mqtt diagnostics 2026-04-13 09:42:32 +10:00
Jared Dohrman 71ddba8bdc feat: expand repeater web panel with radio presets, info cards, and clock sync controls 2026-04-12 10:33:13 +10:00
Jared Dohrman 6680e53ef5 fix: improve MQTT/web memory usage and streamline broker controls 2026-04-11 16:40:45 +10:00
Jared Dohrman 104143f209 fix(web): correct noise floor gauge coloring and expose prv.key in web console 2026-04-10 23:55:49 +10:00
Jared Dohrman 328a0ecf6f fix(mqtt): clear legacy prefs, restore status publishing, and expand web controls 2026-04-10 22:24:58 +10:00
Jared Dohrman b5374a705a feat(web,mqtt): add repeater dashboard, MQTT settings, and stabilise HTTPS/TLS startup 2026-04-10 15:18:19 +10:00