Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Probe Info and Firmware Version

Source: GetProbeInfo, ProbeInfo and the version helpers in src/commands/control.rs; WchLinkVariant in src/probe.rs.

0x0d / 0x01 — GetProbeInfo

Request: 81 0d 01 01.

Response payload (ProbeInfo::from_payload requires at least 3 bytes):

OffsetFieldNotes
0major_versionRaw major byte as reported by the probe
1minor_versionRaw minor byte (may exceed 15 — see below)
2variantOnly interpreted when the payload is 4 bytes long; otherwise wlink assumes Ch549
3—Present in the 4-byte form; meaning unverified

Example: 82 0d 04 02 0f 02 00 → major 0x02, minor 0x0f, variant 0x02 (WCH-LinkE-CH32V305), with a fourth payload byte of unknown meaning. A 3-byte payload carries no variant and makes wlink assume Ch549.

Firmware version encoding

The probe does not report a decimal version. Its two bytes are a packed value, and WCH’s tooling displays versions as major * 10 + minor. This is why README says “firmware version 2.15 is actually v35”.

For raw bytes (major, minor):

packed        = 16 * major + minor
version_code  = if packed < 0x30 { 10 * major + minor } else { packed - 12 }
display       = (packed >> 4, packed & 0x0f)

version_code is monotonic and is what wlink uses for all comparisons. display_version reconstructs the human-readable version by treating the packed value as two nibbles, so an “impossible” minor carries into the major.

Raw bytespackedversion_codeDisplayed asNote
02 080x28282.8Older firmware
02 0f0x2f352.15 (v35)Current baseline in README
02 160x36423.6wlink source spells newer builds as 2.22
02 0a0x2a302.10 (v30)First firmware with SDI print
ConstantValuePurpose
MIN_FW_VERSION_CHIP_INFO_V229 (v2.9)Use GetChipInfo::V2 (0x11 / 0x06) instead of V1
MIN_FW_VERSION_CH32V20542 (v3.6, sometimes written 2.22)First firmware that reports the new-generation CH32V205 family (0xce) correctly

Older firmware misdetects CH32V205 as CH32V20X with garbage ChipID/ESIG; wlink emits a warning but continues.

Variant codes and capabilities

WchLinkVariant::try_from_u8 accepts:

ByteVariant
0x01Ch549
0x02, 0x12ECh32v305
0x03SCh32v203
0x05, 0x85WCh32v208
otherError::UnknownLinkVariant
VariantMode switchPower outputSDI printChip restrictions
Ch549nononoNo CH32V003 / CH32X035 / CH643
ECh32v305yesyesyesnone
SCh32v203yesnononone
WCh32v208yesyesnoNo CH56X / CH57X / CH582 / CH59X

Hardware variants (historical table)

The old protocol.md listed these; they are retained here for orientation but have not been re-verified against current hardware.

Probe MCUVariantNote
CH549WCH-Link-R1-1v1Switch mode by reflashing firmware
CH32V305FWCH-LinkE-R0-1v3Switch mode by button or EEPROM setting
CH32V203WCH-LinkS-CH32V203—
unverifiedWCH-LinkBHardware MCU unknown

See USB Transport for VID/PID and mode-switch frames.