Measured on a T-Deck with link counters (now in the HELLO reply as "rx"):
every request arrived and was answered, but 1 reply in 5 stayed in the
HW-CDC's 64-byte FIFO until the next write, so the page sat out its 3 s
timeout and asked again. Every frame is now flushed. During an upload the
session also waits 15 ms (was 5) for the next chunk instead of paying a UI
pass per chunk. 256 KB: SD 2.1 s, internal 3.2 s, tiles 6.5 s (LittleFS-bound);
selftest up 79 KB/s, down 61 KB/s. scripts/usbfiles.py reads what has arrived
instead of waiting out its 50 ms timeout per reply.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A built-in USB Files app (T-Deck and Heltec V4 for now) lets the page at
files.wadamesh.com browse, upload, download, rename and delete files on the
SD card, internal storage and the map tiles over Web Serial. File level, not
USB mass storage: the device keeps its filesystems mounted, the radio keeps
running, and the firmware enforces what may change. Live data (identity,
contacts, settings, history; /meshcomod on the card) is download-only.
- UsbFilesProtocol.h: framed messages (E7 5A, CRC32), a resyncing parser,
path checks and the access policy; host tests in test/.
- UsbFilesSession: one request at a time (both Arduino USB serial drivers
drop bytes when their RX queue is full), RX queue sized per session, SD
data through a DMA-capable bounce buffer, FatFs listings with sizes, a
beacon so the page never talks first, SD Scan's malware verdict per file.
- The companion link and MyMesh's console step off USB while it runs.
- Website: labelled side buttons, a USB Files button and card; the
files.wadamesh.com page, vhost and deploy script.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>