Repository navigation
ymodem: a file in use does not cancel the batch - #63
Merged
Merged
Conversation
A file another program reads just then - a view being shown - does not open for writing until it is closed (FatFs locks it), and the transfer was cancelled at once. It is tried again every 100 ms for 2 s: the sender waits for the answer to the header longer (3 s, ten times). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 12, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ymodem recvcancelled the whole batch when a received file could not be opened for writing. FatFs does not let a file that is open for reading be opened for writing. That can last a moment (a view being loaded) or as long as another program keeps the file open (the MP3 being played), so uploading a music folder stopped at the track that was playing.WAIT_START) and the helper thread sends no NAK meanwhile. The sender (ymodem_send.py) waits 3 s for the header's answer and retries it ten times.ymodem_send.py(Upload to the SD card the device has, not to /mnt/dmsdio0_0p1 dmod-boot#127) shows this and exits with an error.The real cause of the first case, a view kept open for seconds while it was being made, is fixed in choco-technologies/dmview#20.
Test plan
build/sdcardgo through right after a reset🤖 Generated with Claude Code