Storage: share the card with a phone's browser (#88) #89

Merged
twisla merged 5 commits from web-files into main 2026-10-07 22:37:13 +00:00
Owner

For #88: get files on and off the SD card from a phone's browser, with nothing to install.

Using it

  • w in the Storage App opens a "Share" screen: the address as a QR code and in letters, and a six-digit code.
  • In a browser on the same network: scan or type the address, type the code. List, download, upload (several files), new folder, delete.
  • Back stops it. It also stops on leaving the Storage App.

What it is

  • ESP-IDF's HTTP server (already in the framework) and one 5.4 KB page served from flash.
  • The code is new each time; five wrong ones close it for a minute. A browser that got it right holds a cookie.
  • Uploads go to <name>.part and are renamed when whole. A file that exists is replaced only after the page asked.
  • The Storage App's rules apply: the firmware's own folders can't be deleted.
  • Every access to the card goes through the storage task, 8 KB at a time.

Known limits

  • Not encrypted. The screen says so.
  • One request at a time: a second request during a long download waits for it.
  • About 200 KB a second. A folder must be empty to be deleted from the page.

Checked

  • 533 host tests pass (5 new: paths a browser may name, the code and its lockout, the JSON).

  • From a PC with curl: every request and every refusal; a 2.6 MB file up and down, compared byte for byte.

  • In Chromium at a phone's width: logging in from the scanned address, uploading, downloading, a new folder, deleting, replacing, a refusal shown.

  • Back: the server is gone and the memory is back.

  • On a real phone: the QR code, scanned with the camera, opens the page and logs in.

Not checked: Safari, a card pulled mid-transfer, sharing with IRC connected, Home or the screen turning off while sharing.

Costs 57 KB of flash, and 13 KB of memory while sharing.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT

For #88: get files on and off the SD card from a phone's browser, with nothing to install. **Using it** - `w` in the Storage App opens a "Share" screen: the address as a QR code and in letters, and a six-digit code. - In a browser on the same network: scan or type the address, type the code. List, download, upload (several files), new folder, delete. - Back stops it. It also stops on leaving the Storage App. **What it is** - ESP-IDF's HTTP server (already in the framework) and one 5.4 KB page served from flash. - The code is new each time; five wrong ones close it for a minute. A browser that got it right holds a cookie. - Uploads go to `<name>.part` and are renamed when whole. A file that exists is replaced only after the page asked. - The Storage App's rules apply: the firmware's own folders can't be deleted. - Every access to the card goes through the storage task, 8 KB at a time. **Known limits** - **Not encrypted.** The screen says so. - **One request at a time:** a second request during a long download waits for it. - About 200 KB a second. A folder must be empty to be deleted from the page. **Checked** - 533 host tests pass (5 new: paths a browser may name, the code and its lockout, the JSON). - From a PC with curl: every request and every refusal; a 2.6 MB file up and down, compared byte for byte. - In Chromium at a phone's width: logging in from the scanned address, uploading, downloading, a new folder, deleting, replacing, a refusal shown. - Back: the server is gone and the memory is back. - On a real phone: the QR code, scanned with the camera, opens the page and logs in. **Not checked:** Safari, a card pulled mid-transfer, sharing with IRC connected, Home or the screen turning off while sharing. Costs 57 KB of flash, and 13 KB of memory while sharing. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT
twisla added 1 commit 2026-10-07 22:12:01 +00:00
Storage: share the card with a phone's browser (#88)
Site / build (pull_request) Successful in 16s
CI / build (pull_request) Successful in 1m51s
6b02cd3d5f
`w` in the Storage App starts a small HTTP server and shows its address,
as a QR code and in letters, with a six-digit code. A browser on the same
network that has typed the code can list, download, upload, make folders
and delete, under the Storage App's rules. The server runs only while that
screen is open. Nothing is encrypted, and the screen says so.

Uploads are streamed to the card under a temporary name and renamed when
whole. Every access to the card is handed to the storage task, 8 KB at a
time, from the server's own task.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT
twisla added 1 commit 2026-10-07 22:26:51 +00:00
Devlog: "Press w", the SD card in a phone's browser (#88)
Site / build (pull_request) Successful in 15s
CI / build (pull_request) Successful in 1m39s
057af773e4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT
twisla added 1 commit 2026-10-07 22:30:56 +00:00
Devlog: "Press w" with the phone's screenshot and a photo of the device (#88)
Site / build (pull_request) Successful in 15s
CI / build (pull_request) Successful in 1m32s
63c2da8138
Both pictures were resized and saved again from their pixels alone: no
metadata is carried over.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT
twisla added 1 commit 2026-10-07 22:33:21 +00:00
F1, devlog: the QR code scanned with a real phone (#88)
Site / build (pull_request) Successful in 9s
CI / build (pull_request) Successful in 1m31s
d7092ee6d6
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT
twisla added 1 commit 2026-10-07 22:35:18 +00:00
Devlog: "Press w" is v0.18.0
Site / build (pull_request) Successful in 9s
CI / build (pull_request) Successful in 1m25s
e3fe618c7f
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT
twisla merged commit f0306dd880 into main 2026-10-07 22:37:13 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: twisla/roro9stack#89