Skip to content

XIAO: loading its page no longer stops the Teensy link - #138

Merged
renatorgr merged 1 commit into
mainfrom
xiao-page-weak-wifi
Nov 13, 2026
Merged

renatorgr merged 1 commit into
mainfrom
xiao-page-weak-wifi

Conversation

@renatorgr

Copy link
Copy Markdown
Owner

Requested by Renato · project thread

What changes for Renato

On 13 Nov the XIAO C3 page (http://192.168.0.68/, Starlink WiFi at -72 dBm) stayed blank for several seconds, and the Teensy log of the same moment says XIAO silent for 10 s (no hello). The cause: the ESP32 core's web server writes an answer in one go and returns only when the browser has taken all of it. The page is 53 kB; on a weak link that took about 10 s, and all that time the XIAO's loop was stuck there, so no hello went to the Teensy and the Teensy's data piled up unread.

  • Loading the page no longer stops the XIAO. Answers go out as fast as the connection takes them; while the browser catches up, the XIAO keeps the link to the Teensy going (hello, status, log) and feeds its watchdog. A browser that takes nothing for 20 s is given up (the same limit as uploads). The Teensy page already sends its page in pieces this way.
  • The browser keeps the page. / now has an ETag (the build date) and Cache-Control: no-cache, as the Teensy page: a new visit with the same build gets 304 Not Modified (a few hundred bytes) instead of 53 kB, so on the same PC or phone it opens at once. A new build sends the page again; the page's own build check (Teensy and XIAO pages replace themselves after a firmware update #131) still works.
  • A silent spare connection gives way. Browsers open a connection in advance and may leave it silent; the core waited up to 5 s on it and served no one else. Now it is dropped after 1 s when another connection is waiting.
  • XIAO C3 / S3 .bin and _USB.bin rebuilt (esp32 core 3.3.12, 13 Nov 13:25), so Install from GitHub offers it. No change to the Teensy firmware, the link protocol or the page.

How to test (bench, XIAO on Starlink)

  1. XIAO page → Firmware → Install from GitHub (or choose v4.5_XIAO_ESP32C3.bin). After the restart the header says built 13 Nov 2026 13:25.
  2. Close the tab, open http://192.168.0.68/ again a few times. The Teensy page Messages tab must show no XIAO silent for 10 s line.
  3. The second and later visits open faster (Firefox: F12 → Network, / shows status 304).

Checks run here

  • Compiled with arduino-cli and esp32 3.3.12 for XIAO_ESP32C3 (1 153 888 bytes, 88 %) and XIAO_ESP32S3 (1 039 856 bytes, 31 %), --warnings all: no warnings in the sketch.
  • _USB.bin = merged image cut at 0x10000 + program size; the first 64 kB (bootloader, partitions) are the same bytes as the old files.
  • python3 .github/scripts/check_changelog.py: OK.
  • Not run on a real XIAO: the bench test above is the first.

Generated by Claude Code

The core's WebServer wrote each answer in one go and waited for the browser
until it had taken all of it. The 53 kB page on a weak WiFi link (Starlink,
-72 dBm) took about 10 s, and loop() was away from the Teensy all that time:
no hello ("XIAO silent for 10 s" in the Teensy log), the page blank.

- LinkWebServer: answers go out as fast as the connection takes them, and
  the Teensy link (hello, data) and the loop watchdog keep going meanwhile;
  a browser that takes nothing for 20 s is given up.
- A spare connection a browser leaves silent is dropped after 1 s when
  another one waits (the core held it up to 5 s).
- The page has an ETag (build date) with Cache-Control: no-cache, as the
  Teensy page: a new visit of the same build gets 304, not 53 kB again.
- XIAO C3 / S3 .bin and _USB.bin rebuilt (esp32 3.3.12, 13 Nov 13:25).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VKEBDG3GK6dn24UboyTvCp
@renatorgr renatorgr self-assigned this Nov 13, 2026
@renatorgr
renatorgr marked this pull request as ready for review November 13, 2026 13:41
@renatorgr
renatorgr merged commit ac764cf into main Nov 13, 2026
4 checks passed
@renatorgr
renatorgr deleted the xiao-page-weak-wifi branch November 13, 2026 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants