Recognise the IC-7851, IC-7600, IC-9100, Xiegus and the Lab599 TX-500

Their Hamlib models, CI-V addresses or ID; replies and flrig names, from
Hamlib 4.7.2 and flrig 2.0.12. Xiegus share their addresses with Icoms, and
the TX-500 answers as a TS-2000 does, so a probe lists both.

The probe takes a CI-V ID of two bytes, as some Xiegus answer, and
`radio probe` capitalises "One of".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
David Young
2026-11-29 12:55:10 -07:00
co-authored by Claude Opus 5.5
parent ad57b6b1a4
commit 4794c186ee
5 changed files with 94 additions and 10 deletions
-4
View File
@@ -14,10 +14,6 @@ unconfigure` to undo it.
- [ ] Run `TEST.md` against real radios, and mark the `radios.conf` values
they confirm `# verified`. Fix or remove the ones they don't
- [ ] More radios in `radios.conf`: Icom IC-7851, IC-7600 and IC-9100; Xiegu
(which speak CI-V) and Lab599 (Kenwood-style CAT). Check each one's
Hamlib model, CI-V address or `ID;` reply, and flrig name, as for the
others
- [ ] Radios with older Yaesu CAT that doesn't answer `ID;` (FT-817, FT-818,
FT-857, FT-897): find out what `radio probe` could safely send them
to tell what they are, or have `radio configure --model` set them up
+9
View File
@@ -41,6 +41,15 @@ Hamlib does. Check `radio detect --probe` names the right one; if not, note
what `echo "OM;" > /dev/ttyUSB0` gets back (with `cat /dev/ttyUSB0` running
in another terminal, at the radio's baud rate).
A Xiegu answers Icom's "read transceiver ID" from an address an Icom uses too,
so `radio detect --probe` lists both; check the Xiegu is among them. Note the
reply's address and ID bytes, which `python3 -c 'import sys;
sys.stdout.buffer.write(bytes.fromhex("fefe00e01900fd"))' > /dev/ttyUSB0` gets
(with `xxd /dev/ttyUSB0` running in another terminal, at the radio's baud
rate): the G90's address is 88 by flrig and A4 by Hamlib. The IC-7851, IC-7600
and IC-9100 have USB serial chips: note the serial number `radio` lists, and
whether it names the radio, as the IC-7300's does.
Interfaces to try, as well as radios with built-in USB: a Digirig (CP2102 and
CM108 behind its own hub, RTS keys PTT), an FTDI CAT cable, and an Icom CI-V
cable.
+6 -3
View File
@@ -366,8 +366,9 @@ for baud in sys.argv[2:]:
options = om.group(1).decode() if om else ""
print(baud, "cat_id", found.group(1).decode(), options)
break
# To any address (00) from a computer (E0); the radio answers to E0 from its address
found = re.search(rb"\xfe\xfe\xe0(.)\x19\x00.\xfd", ask(bytes.fromhex("fefe00e01900fd")), re.S)
# To any address (00) from a computer (E0); the radio answers to E0 from
# its address, with its ID: one byte from an Icom, two from some Xiegus
found = re.search(rb"\xfe\xfe\xe0(.)\x19\x00[^\xfd]{1,2}\xfd", ask(bytes.fromhex("fefe00e01900fd")), re.S)
if found:
print(baud, "civ", found.group(1).hex().upper())
break
@@ -599,7 +600,9 @@ probe() {
reason="$(cant_probe "$port")"
[ -z "$reason" ] || { echo "Can't ask: $reason" >&2; return 1; }
if probe_port "$port"; then
echo "$(describe_answer), at $ANSWER_BAUD baud"
local described
described="$(describe_answer)"
echo "${described^}, at $ANSWER_BAUD baud"
elif [ -n "$PROBE_ERROR" ]; then
echo "Can't ask: $PROBE_ERROR" >&2
return 1
+58 -1
View File
@@ -19,7 +19,8 @@
# no driver for it, or several (the TS-480's HX and SAT)
#
# A radio needs usb_serial=, cat_id= or civ=, or `radio` can't recognise it.
# The Hamlib model numbers were checked against Hamlib 4.6. The other values
# The Hamlib model numbers were checked against Hamlib 4.6 (the IC-7851,
# IC-7600, IC-9100, Xiegus and Lab599 against 4.7.2). The other values
# come from the radios' CAT manuals and Hamlib's tables; mark one "# verified"
# once a real radio has answered with it.
@@ -60,6 +61,55 @@ hamlib=3090
usb_serial=IC-905 *
civ=AC
# These three have USB too, but what their USB serial chips' serial numbers
# say isn't known, so they're recognised by asking them
[Icom IC-7851]
hamlib=3075
flrig=IC-7851
civ=8E
[Icom IC-7600]
hamlib=3063
flrig=IC-7600
civ=7A
[Icom IC-9100]
hamlib=3068
flrig=IC-9100
civ=7C
# Xiegu. They speak CI-V, at addresses Icoms use too, so asking one may list
# an Icom as well; give --model to say which it is. Their USB serial chips
# (a CH340 in the G90's DE-19 interface) carry no model. The G90's address is
# flrig's; Hamlib says A4. The X6100, X6200 and G106 answer "read transceiver
# ID" with two bytes, which Hamlib reads as their model; radio goes by the
# address they answer from, as for the Icoms
[Xiegu G90]
hamlib=3088
flrig=Xiegu-G90
civ=88
[Xiegu X6100]
hamlib=3087
flrig=X6100
civ=A4
[Xiegu X6200]
hamlib=3091
flrig=X6200
civ=A4
[Xiegu X5105]
hamlib=3089
flrig=Xiegu-5105
civ=70
[Xiegu X108G]
hamlib=3076
civ=70
# Yaesu. Their USB serial chips (CP2105) carry no model, so they're recognised
# by asking them, with `radio detect --probe`
@@ -143,6 +193,13 @@ hamlib=2041
flrig=TS-890S
cat_id=024
# Lab599. Kenwood-style CAT, answering ID; as a TS-2000 does
[Lab599 TX-500]
hamlib=2050
flrig=TX500
cat_id=019
# Elecraft. They all answer ID; as a Kenwood TS-570 would; their reply to OM;
# tells them apart
+21 -2
View File
@@ -343,7 +343,11 @@ while time.monotonic() < end:
heard = b""
if sys.argv[2] == "icom" and civ_request in heard:
# With CI-V USB echo on, the radio echoes the request first
os.write(master, civ_request + bytes.fromhex("fefee0a41900a4fd"))
os.write(master, civ_request + bytes.fromhex("fefee094190094fd"))
heard = b""
if sys.argv[2] == "xiegu" and civ_request in heard:
# An X6100: its ID in two bytes, from the IC-705's address
os.write(master, bytes.fromhex("fefee0a419006100fd"))
heard = b""
EOF
python3 "$BATS_TEST_TMPDIR/fake_radio.py" "$BATS_TEST_TMPDIR/pty" "$1" 3>&- &
@@ -371,7 +375,22 @@ teardown() {
fake_radio icom
run bash "$REPO/radio" probe "$PTY"
[ "$status" -eq 0 ]
[ "$output" = "Icom IC-705 (Hamlib model 3085), at 38400 baud" ]
[ "$output" = "Icom IC-7300 (Hamlib model 3073), at 38400 baud" ]
}
@test "probe hears a Xiegu's two-byte ID, and lists the radios at its address" {
fake_radio xiegu
run bash "$REPO/radio" probe "$PTY"
[ "$status" -eq 0 ]
[ "$output" = "One of: Icom IC-705 (Hamlib model 3085), Xiegu X6100 (Hamlib model 3087), Xiegu X6200 (Hamlib model 3091), at 38400 baud" ]
}
@test "--probe lists a Lab599 TX-500 with the TS-2000, which answers ID; alike" {
usb 1-4 0403:6001 FTDI "FT232R USB UART" A12345
port 1-4 ttyUSB0
answers ttyUSB0 "38400 cat_id 019"
run bash "$REPO/radio" --probe
[ "${lines[0]}" = "1. One of: Kenwood TS-2000 (Hamlib model 2014), Lab599 TX-500 (Hamlib model 2050), answered on ttyUSB0 at 38400 baud" ]
}
@test "probe says when nothing answers on a real port" {