A toolkit for flashing firmware to RT6D radios via serial connection.
This project includes four main programs:
- rt6d-flasher (
main.go) - Main flasher for uploading firmware to RT6D radios - hex2bin (
hex2bin.go) - Intel HEX to binary file converter - spi-tool (
spi-tool.go) - SPI flash backup and restore utility - spi-flash (
spi-flash.go) - Alternative SPI flash tool
- Go 1.21 or higher
- Dependency:
go.bug.st/serial(downloaded automatically)
# Compile the main flasher
go build -o rt6d-flasher main.go
# Compile the hex2bin converter
go build -o hex2bin hex2bin.go
# Compile the SPI tool
go build -o spi-tool spi-tool.go
# Compile the alternative SPI flash tool
go build -o spi-flash spi-flash.go
# Or use the build script
./build.shgo mod download./rt6d-flasher <serial_port> <firmware_file> [flags]Flags:
-iradio- Use for Iradio UV98 Plus model
Examples:
# On Linux/macOS
./rt6d-flasher /dev/cu.wchusbserial112410 firmware.hex
./rt6d-flasher /dev/ttyUSB0 firmware.bin
# For Iradio UV98 Plus
./rt6d-flasher /dev/cu.wchusbserial112410 firmware.hex -iradio
./rt6d-flasher /dev/ttyUSB0 firmware.bin -iradio
# On Windows
./rt6d-flasher COM3 firmware.hex
# For Iradio UV98 Plus on Windows
./rt6d-flasher COM3 firmware.hex -iradioSupported firmware formats:
- Intel HEX (
.hex) - Binary (
.bin)
Flashing procedure:
- Connect the data cable to the radio
- Turn OFF the radio completely
- Press and HOLD the PTT key
- While holding PTT, turn ON the radio
- Keep holding PTT for 2-3 seconds after power on
- Release PTT - radio should be in programming mode
- Press Enter to start the update
./hex2bin <input_hex_file> <output_bin_file>Example:
./hex2bin allcode.txt firmware_converted.bin./spi-tool <command> <serial_port> <file>Commands:
backup- Backup SPI flash to filerestore- Restore SPI flash from file
Examples:
# Backup SPI flash
./spi-tool backup /dev/cu.wchusbserial112410 spi_backup.bin
./spi-tool backup COM3 spi_backup.bin
# Restore SPI flash
./spi-tool restore /dev/ttyUSB0 spi_backup.bin
./spi-tool restore COM3 spi_backup.binSPI Tool procedure:
- Connect the data cable to the radio
- Turn ON the radio normally (no special procedure needed)
- Press Enter to start backup/restore operation
- Automatic detection of available serial ports
- Support for Intel HEX and binary files
- Communication protocol with retries and timeouts
- Checksum verification
- Real-time progress reporting
- Robust error handling
- Accurate Intel HEX to binary conversion
- Support for extended address records
- RT6D-specific ARM address mapping
- Format validation
- Complete SPI flash backup (32MB)
- SPI flash restore from backup file
- Block-by-block operation with progress indication
- Checksum verification for data integrity
- Automatic retry mechanism for failed operations
main.go- Main flasher source codehex2bin.go- Converter source codespi-tool.go- SPI tool source codespi-flash.go- Alternative SPI flash toolgo.mod/go.sum- Go dependency configuration
rt6d-flasher- Main flasher executablert6d-flasher-windows-arm64- Windows ARM64 buildhex2bin- Converter executablespi-tool- SPI tool executablespi-flash- Alternative SPI flash executable
HEX/- Intel HEX firmware files directoryRT880-V1_12A.HEXRT880G-V1_12.HEX
BIN/- Binary firmware files directoryRT880-V1_12A.BINRT880G-V1_12.BIN
RT880G_V1.14.bin- Firmware v1.14 for RT880GRT880_V1.14.bin- Firmware v1.14 for RT880RT880-V1_12A.cs- C# source for RT880 v1.12ART880G-V1_12.cs- C# source for RT880G v1.12
build.sh- Build scriptdist/- Distribution directory
kk.bin,kk.spi- Sample backup filesspi.bin,spi2.bin,spi3.bin- SPI flash backup files
- Baud Rate: 115200
- Data Bits: 8
- Parity: None
- Stop Bits: 1
- Port not found: Verify the device is connected and drivers are installed
- Communication error: Ensure the radio is in programming mode (follow PTT procedure)
- Checksum error: Verify firmware file integrity
- Timeout: Check cable connection and radio status
# Linux AMD64
GOOS=linux GOARCH=amd64 go build -o rt6d-flasher-linux main.go
# Windows AMD64
GOOS=windows GOARCH=amd64 go build -o rt6d-flasher.exe main.go
# macOS (Intel)
GOOS=darwin GOARCH=amd64 go build -o rt6d-flasher-macos-intel main.go
# macOS (Apple Silicon)
GOOS=darwin GOARCH=arm64 go build -o rt6d-flasher-macos-m1 main.go