yangsong8-a1 opened a new pull request, #3387:
URL: https://github.com/apache/nuttx-apps/pull/3387

   
   ## Summary
   
   This PR includes two improvements to the ymodem sbrb.py tool:
   
   1. **Fix serial reliability issues**: Add flush and reset input buffer 
operations when sending commands to ensure reliable ymodem transfer initiation 
over serial connections.
   2. **Add bootloader burn support**: When a device automatically enters 
ymodem rb mode at startup, the PC tool no longer needs to send the rb command. 
Instead, it waits for a specified number of consecutive 'C' characters before 
continuing with the ymodem protocol.
   
   ## Impact
   
   - **Stability**: Improves reliability of ymodem transfers by properly 
clearing serial buffers
   - **Compatibility**: Adds new `-c` and `-w` options for bootloader burn 
scenarios without breaking existing functionality
   - **Code Quality**: Clean implementation following existing code patterns
   
   ## Testing
   
   **Build Host:** Ubuntu 22.04 x86_64
   **Target:**  tc4dx evb
   
   ### Test Steps:
   Functional test on real hardware (bootloader burn scenario):
   - Device enters ymodem rb mode automatically at boot
   - PC waits for 3 consecutive 'C' characters with 30s timeout
   ```
   $ python3 sbrb.py -s /dev -t /dev/ttyUSB0 -b 230400 -k 16 -c 3 -w 30 
vela_core0.bin
   sending
   name:vela_core0.bin filesize:1818624
   100.0% 1818624:1818624 left:00h00m00s
   time used:85.8s speed 20.7kB/s
   
    all time:85.82s average speed:20.7kB/s
   ```


-- 
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