Skip to content

Add AnyTone AT-D578UV support (#47) - #144

Merged
ww8l merged 1 commit into
mainfrom
issue-47-d578
Oct 16, 2026
Merged

ww8l merged 1 commit into
mainfrom
issue-47-d578

Conversation

@ww8l

@ww8l ww8l commented Oct 16, 2026

Copy link
Copy Markdown
Owner

Closes #47.

Programs the AnyTone AT-D578UV over its USB cable. It supports:

  • channels, zones, scan lists and talkgroup contacts;
  • 264 menu settings, plus the radio's own DMR ID and name;
  • the 500,000-entry call-sign (caller-ID) database;
  • the air-band memory, which only the D578UV PLUS has.

How it fits

The D578 speaks the same clone protocol as the D890UV, but over the D868/D878-family memory map with D578 overrides (firmware 1.21).

  • Shared with the D890: the transport, the window write engine and the codeplug planner. They are now parameterized (PlanLimits, IdentExpect).
  • The D578's own: its map, record codecs, program and settings sessions, and call-sign DB.
  • Firmware gate: sessions refuse any radio whose ident isn't revision V111, the revision the 1.21 map was built for. No readable region carries the firmware version.
  • Program dialog: the D578 uses the AnyTone dialog. Its Verify, Restore and latest-backup commands now take a driver_key, and refuse a backup written for the other model.

Measured on a real D578UV (fw 1.21)

  • Writes rebuild a whole flash half. A write rebuilds the entire 128 KB half it lands in, from only that session's data. A 16 KB settings write erased the GPS-roaming table next to it. Writes now carry every window of the half that holds data.
  • The radio owns the end-of-half marker. Sending it, even unchanged, left new data in the inactive half, and the radio kept showing old channels. Writes now never send that frame.
  • CTCSS: no 150.0 Hz entry. Borrowing the D890's table would shift every tone from 151.4 Hz up.
  • Call-sign DB layout: the end-of-database address is a real address, gaps included (qdmr writes it differently). Names stop at 15 bytes.
  • Simplex offsets: simplex channels store their RX frequency in the offset field.
  • Settings labels: "Boot Zone A/B" is really the current zone. Backlight is stored 0–4 for menu steps 1–5.

Verification

Re-encode gates. Each takes the radio's own data and must reproduce it byte for byte:

  • all 392 channels, 21 zones, 21 scan lists and 38 contacts, plus the contact ID table;
  • the radio's existing 281,304-entry call-sign database (an env-gated test against a local dump, kept out of the repo because it is radioid.net data).

Hardware ladder on the radio, each step read back and restored:

Step Result
Identity write ✅
One-byte name change ✅
Full 208-channel codeplug ✅ zones checked on screen
Restore ✅
Band probe, 136–520 MHz edges ✅ 6/6
Settings (brightness, name colour) ✅ checked on screen
Call-sign DB, 310,769 entries ✅ 18 MB read back exactly

Full regression through the shipping program and settings paths: 120 windows swept before and after. Nothing changed outside the plan.

Dialog: Verify and Restore ran on the radio. The frontend was driven with stubbed IPC and real fixtures.

Not verified:

  • Air band: the test radio isn't a PLUS. The README says so.
  • Transmit, on any band.
  • Inverted DCS (stored as code + 512, per qdmr and dmr-tools): the test radio has none.
  • Settings beyond the two checked on screen: they rest on qdmr and dmr-tools agreeing (189 of 191 offsets). 59 fields are withheld.

Also in this PR

  • Bluetooth tab: a new settings tab for every radio that has Bluetooth (D578, D890, BT-9000, FTM-300, ID-5100, ID-52, TH-D75). Connections keeps the COM-port, CI-V and data settings.
  • Text encoding: settings text and radio names are folded to ASCII (Zürich → Zurich). Before, they were cut off at the first accented character or filled with ?. This also changes the D890.
  • Channel-fit check: ExpandedChannel is now Clone. The D578 seed lists the air band as receive-only, so the codeplug screens stop calling air channels out of range.

Follow-up for the D890 (not in this PR): #143.

🤖 Generated with Claude Code

Program the AT-D578UV over its USB cable: channels, zones, scan lists,
talkgroup contacts, 264 menu settings plus the radio's DMR ID and name, the
500,000-entry call-sign database, and the PLUS model's air-band memory.

The D578 speaks the D890's clone protocol over the D868/D878 memory map with
D578 overrides (firmware 1.21), so the transport, window engine and planner
are shared and parameterized (PlanLimits, IdentExpect); the map, codecs and
sessions are the D578's own. Sessions require ident revision V111, the
revision the fw-1.21 map was built for.

Measured on a real D578UV, not taken from the published maps:
- A write rebuilds the whole 128 KB flash half from that session's data; the
  rest is erased. Writes now carry every data window of the half and never
  send the radio's end-of-half marker frame, which left data in the inactive
  half when sent.
- The CTCSS table has no 150.0 Hz entry (unlike the D890's).
- The call-sign DB's end address is a real address; names stop at 15 bytes.
- Simplex channels store their RX frequency as the offset.

Every channel, zone, scan list and contact on the radio re-encodes byte for
byte, and its 281,304-entry call-sign database does too. Hardware ladder on
the radio: identity, one-byte, full codeplug, restore, band probe, settings,
call-sign DB (18 MB read back exact). Air band only exists on the PLUS and is
unverified on a screen.

Also: a Bluetooth settings tab for every radio that has Bluetooth; settings
text and radio names folded to ASCII instead of truncated or '?'-filled; the
AnyTone dialog's Verify/Restore/latest commands take the driver key and refuse
another model's backup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ww8l
ww8l merged commit 9279048 into main Oct 16, 2026
3 checks passed
@ww8l
ww8l deleted the issue-47-d578 branch October 16, 2026 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Anytone ATD-578 Support

1 participant