anjiahao1 opened a new pull request, #4153:
URL: https://github.com/apache/nuttx-apps/pull/4153

   ## Summary
   
   Improve ymodem transfer reliability.
   
   sbrb.py:
   
   - Add -k/--kblocksize to select 128-byte, 1 KiB or a larger extended
     packet size.
   - Add -q/--quiet for automated transfers: print progress only at 10%
     milestones.
   - Reset the retry counter after each successfully received packet and
     after the filename packet.
   - Send two CAN bytes on SIGINT/SIGTERM so the receiver aborts cleanly.
   - Fix the last packet size in recv: write the actual remaining bytes
     instead of the padding length, which truncated the received file.
   
   ymodem.c:
   
   - Align packet selection with sbrb.py: 128-byte SOH, 1 KiB STX, and
     extended STC for larger sizes.
   - Reset the retry counter after the handshake and each successful ACK,
     and bound the retry loop on NAK.
   
   ## Impact
   
   * Is new feature added? NO - transfer reliability fixes.
   * Impact on user: YES - received files are no longer truncated and the
     receiver aborts cleanly on Ctrl+C.
   * Impact on build: NO
   * Impact on hardware: NO
   * Impact on documentation: NO
   * Impact on security: NO
   * Impact on compatibility: YES - sbrb.py gains new options; the default
     128-byte packet mode is unchanged.
   
   ## Testing
   
   Build host: Linux x86_64, NuttX CI Docker image.
   
   Configuration: sim:nsh with CONFIG_SYSTEM_YMODEM=y; the target side
   builds. sbrb.py passes black, flake8 and codespell. An end-to-end
   transfer requires a serial peer and was not run in this environment;
   the last-packet fix is covered by the -k/--kblocksize receive path.
   
   ## PR verification
   
   * [x] This PR introduces only one functional change.
   * [x] I have updated all required description fields above.
   * [x] My PR adheres to Contributing Guidelines and Documentation.
   * [ ] My PR is still work in progress (not ready for review).
   * [x] My PR is ready for review and can be safely merged into a codebase.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to