|
| 1 | +# riden-flashtool |
| 2 | +**Rust-based firmware tool for Riden RD60xx PSUs** |
| 3 | + |
| 4 | +Unofficial cross-platform tool for flashing Riden RD6006(P)/RD6012/RD6018/RD6024 power supplies. |
| 5 | +> Derived from [tjko/riden-flashtool](https://github.com/tjko/riden-flashtool/) with Rust implementation |
| 6 | +
|
| 7 | +## Features |
| 8 | +- Firmware flashing via serial port |
| 9 | +- Device detection and diagnostics |
| 10 | +- Bootloader mode switching |
| 11 | +- Serial port listing (`-l` flag) |
| 12 | +- No external dependencies |
| 13 | + |
| 14 | +## Installation |
| 15 | +1. Install [Rust toolchain](https://www.rust-lang.org/tools/install) |
| 16 | +2. Build from source: |
| 17 | +```bash |
| 18 | +cargo build --release |
| 19 | +# Binary appears at: ./target/release/riden-flashtool |
| 20 | +``` |
| 21 | + |
| 22 | +## Usage |
| 23 | +### Basic commands |
| 24 | +```bash |
| 25 | +# List available serial ports: |
| 26 | +./riden-flashtool -l |
| 27 | + |
| 28 | +# Get device info (normal mode): |
| 29 | +./riden-flashtool /dev/ttyUSB0 |
| 30 | + |
| 31 | +# Flash firmware (auto-detects baudrate): |
| 32 | +./riden-flashtool /dev/ttyUSB0 firmware.bin |
| 33 | + |
| 34 | +# Specify custom baudrate: |
| 35 | +./riden-flashtool /dev/ttyUSB0 firmware.bin --speed 115200 |
| 36 | +``` |
| 37 | + |
| 38 | +### Example Output |
| 39 | +```bash |
| 40 | +Serial port: /dev/ttyUSB0 (115200bps) |
| 41 | +Firmware size: 109888 bytes |
| 42 | +Check if device in bootloader... No |
| 43 | +Found device: RD6006 (60062) v1.40 |
| 44 | +Rebooting to bootloader... |
| 45 | +Device info (bootloader): |
| 46 | + Model: RD6006 (60062) |
| 47 | + Firmware: v1.40 |
| 48 | + S/N: 000xxxxx |
| 49 | +Updating firmware...b'OK' |
| 50 | +Firmware update complete. |
| 51 | +``` |
| 52 | +
|
| 53 | +## Recovery Mode |
| 54 | +If device fails to boot after flashing: |
| 55 | +1. **Manual bootloader entry**: Press/hold `ENTER` while powering on unit |
| 56 | +2. Re-run flashtool with firmware file |
| 57 | +
|
| 58 | +## Troubleshooting |
| 59 | +- `No response from device`: |
| 60 | + - Verify "Interface" setting is **USB** in PSU menu |
| 61 | + - Connect directly to computer (avoid USB hubs) |
| 62 | + - Ensure serial port permissions (Linux: `sudo usermod -aG dialout $USER`) |
| 63 | +- Failed flashing: Retry in bootloader mode (manual method above) |
0 commit comments