The radio connection is established automatically when you click Read from Radio or Write to Radio. There is no separate Connect step.
- Connect the DM-1702 / DM-1702B to a USB port using the programming cable.
- Launch the application (
Bao1702.Desktop). - Click Read from Radio or Write to Radio. The application scans USB printer-class interfaces (VID
0483/ PID5780) to locate the radio automatically. - On successful connection, the radio's model name, firmware version, and DMR ID are displayed in the status bar.
Source of truth: USB discovery via WMI and Win32
SetupDiAPIs. VID/PID confirmed across 8 OEM USB captures.
- Click Read from Radio. The radio is auto-detected and the 245,760-byte native image is downloaded block-by-block with a progress bar.
- The codeplug is decoded and all entity tabs are populated: Channels, Zones, Scan Lists, Contacts, RX Groups, and Group Lists.
- Parameter settings (squelch, VOX, backlight, power, DTMF, keys, startup text) are populated in the Settings tab.
- A pre-read backup is automatically created in the backup catalog.
Each entity tab provides a data grid with inline editing and a detail panel for the selected item.
- Fields: Name, RX Frequency, TX Frequency, Mode (Analog/Digital), Power, Bandwidth, CTCSS/DCS Tones, Color Code, Time Slot, Contact, RX Group, Scan List, GPS System.
- Use Add Channel / Delete Channel on the toolbar.
- Select a row and edit fields in the detail panel on the right.
- Each zone contains an ordered list of channel references.
- Use Add Zone / Delete Zone to manage zones.
- Each scan list references one or more channels by index.
- Priority channels are configurable.
- Fields: Name, Call ID, Call Type (Private/Group/All Call).
- Contacts are referenced by channel digital settings and RX groups.
- Each RX group contains a list of contact references for DMR receive filtering.
- Each group list contains a set of contact references.
- After editing, click Write to Radio. The radio is auto-detected if not already connected.
- The application validates the codeplug — any errors are displayed in the validation panel.
- If no backup exists for this radio, the write is blocked. Use Read from Radio first to create a baseline backup.
- On confirmation,
Dm1702NativeImageBuilder.Build()generates the entire 245,760-byte native image from the codeplug model (the model is the sole source of truth — no preserved-image overlay). The image is written block-by-block.
Source of truth: Write protocol reverse-engineered from 8 OEM USB captures. Re-handshake, transition, and probe sequences validated against stock CPS behavior.
Open and Save are the primary toolbar actions for offline codeplug editing:
- Open (📂) loads a codeplug from a
.codeplugfile (native binary format) or a raw.data/.binimage. - Save (💾) writes the current codeplug to a
.codeplugfile. - Export CSV creates one CSV file per entity type in a chosen directory.
- Import CSV loads CSV files from a directory, validates references, and replaces the current codeplug.
The typical workflow is: Read from Radio → edit → Save to file → iterate offline → Open → Write to Radio.
Backups are created automatically — there is no standalone Backup button:
- A codeplug backup is created automatically each time you read from the radio or before a write operation.
- Firmware backups are created via the Firmware Analysis tab.
- Each backup includes a SHA-256 manifest for integrity verification.
- The backup catalog is used by the safety policy engine to enforce backup-before-write.
The Firmware Analysis tab provides:
- Firmware image read from the connected radio.
- SHA-256, SUM16, and XOR8 checksums.
- Header-declared checksum validation.
- ASCII and UTF-16LE string extraction.
- Per-region entropy analysis.
- Firmware compatibility validation against the connected radio's identity.
The Settings tab exposes all OEM-validated radio parameters (source: Dm1702NativeConfigSerializer.cs, cross-capture binary diffs):
- General — radio name, DMR ID, language, TX timeout, TX preamble duration, mic gain.
- Display — backlight duration (Off/5s/10s/15s/20s/Always), show channel number, show clock.
- Power — default power level (Low/Medium/High), battery saver.
- Audio — squelch level (analog + digital), VOX enable/level, CTCSS/DCS tail revert.
- Security — keypad lock.
- DTMF — PTT ID, kill code, revive code.
- Startup — intro line 1, intro line 2.
- Key assignments — 7 programmable keys (Side Key 1, Side Key 2, Top Key Short, Top Key Long, P1, P2, P3, P4) with short/long press function codes.
All parameter offsets validated at config base
0x5000. Key assignments at+0x150(14 bytes). SeeNativeCoverageAudit.md§ Config and system sections.
Help → About displays the version number, copyright, and build information.
The CLI provides headless operations for scripting and automation.
| Command | Description |
|---|---|
read --output <file> |
Read codeplug from radio and save to file |
write --image <file> |
Write codeplug image to radio (requires backup) |
verify --image <file> |
Validate a codeplug image file |
diff firmware --left <a> --right <b> |
Byte-level diff of two firmware images |
restore --image <file> |
Restore a codeplug backup to the radio |
unsafe force-write --image <file> --ack I_ACCEPT_THE_RISK_OF_BRICKING_THE_RADIO |
Write without safety checks (dangerous) |
# Read codeplug to file
bao1702 read --output my_radio.bin
# Validate before writing
bao1702 verify --image my_radio.bin
# Write back to radio
bao1702 write --image my_radio.bin
# Compare two firmware dumps
bao1702 diff firmware --left fw_old.bin --right fw_new.bin