Skip to content

put --verify: the board keeps talking while it hashes a big file - #213

Merged
bdbarnett merged 1 commit into
mainfrom
webrepl-put-verify
Nov 5, 2026
Merged

bdbarnett merged 1 commit into
mainfrom
webrepl-put-verify

Conversation

@bdbarnett

Copy link
Copy Markdown
Collaborator

put no longer reports a failed copy for a big file that landed intact. Verifying a copy hashes the file on the board in one exec that printed nothing until it finished, and mpremote gives up on a reply after 10 s with no byte from the board ("timeout waiting for first EOF reception"). The board now prints a dot every 64 KB while it hashes, which mpftp ignores, and reads 2 KB per step instead of 512 bytes. A board that really stops answering still times out after 10 s of silence. The same hashing serves serial, WebREPL and BLE, so all three get it.

I reproduced the issue on an ESP32-S3 over WebREPL with an 8,589,932-byte random file on its internal flash: the released mpftp uploaded it in 3 min 20 s and then failed with "timeout waiting for first EOF reception". With this change the same put finished in the same time and reported verified with a SHA-256 equal to the local file's. A new test in cli/tests/test_hash_file.py hashes a file of that size through the board-side code and checks it prints at least one byte per 64 KB; it fails without the change. Not checked on the SD card of the board in the report.

Closes #202

Verifying a copy hashes the file on the board in one exec, which printed
nothing until it finished. mpremote gives up on a reply after 10 s with no
byte from the board, so an 8.5 MB file on an SD card that took longer to hash
was reported as a failed copy though it had landed intact ("timeout waiting
for first EOF reception"). The board now prints a dot every 64 KB while it
hashes, which mpftp ignores, and reads 2 KB per step instead of 512 bytes. A
board that really stops answering still times out after 10 s.

Closes #202
@bdbarnett
bdbarnett merged commit babd84b into main Nov 5, 2026
8 checks passed
@bdbarnett
bdbarnett deleted the webrepl-put-verify branch November 5, 2026 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

put over WebREPL: verify times out on one 8.5 MB file though the file lands intact

1 participant