Set up older Yaesus with radio configure --model, without asking them

The FT-817, FT-818, FT-857 and FT-897 have no ID command, and take every
five bytes they're sent as a command, so radio doesn't probe them: --model
sets one up on its only serial port, at the CAT rate it comes with
(baud= in radios.conf), or --baud's. Where nothing answered, radio says so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
David Young
2026-11-29 13:06:27 -07:00
co-authored by Claude Opus 5.5
parent 4794c186ee
commit d910982ea7
7 changed files with 149 additions and 14 deletions
+5 -3
View File
@@ -117,16 +117,18 @@ EOF
}
check_radio() {
check_keys hamlib usb_serial cat_id civ flrig elecraft
check_keys hamlib usb_serial cat_id civ flrig elecraft baud
[[ "${CONF[elecraft]:-K3}" =~ ^(K3|K3S|KX2|KX3|K4)$ ]] || problem "elecraft= should be K3, K3S, KX2, KX3 or K4"
check_required hamlib
[[ "${CONF[hamlib]}" =~ ^[0-9]+$ ]] || problem "hamlib= should be a Hamlib model number"
[ -n "${CONF[usb_serial]}${CONF[cat_id]}${CONF[civ]}" ] || problem "needs usb_serial=, cat_id= or civ="
[ -n "${CONF[usb_serial]}${CONF[cat_id]}${CONF[civ]}${CONF[baud]}" ] || problem "needs usb_serial=, cat_id=, civ= or baud="
[ -z "${CONF[baud]}" ] || [ -z "${CONF[usb_serial]}${CONF[cat_id]}${CONF[civ]}" ] || problem "baud= is only for a radio radio can't recognise"
[[ "${CONF[baud]:-4800}" =~ ^(4800|9600|19200|38400|57600|115200)$ ]] || problem "baud= should be a serial rate"
[ -z "${CONF[cat_id]}" ] || [[ "${CONF[cat_id]}" =~ ^[0-9]{3,4}$ ]] || problem "cat_id= should be 3 or 4 digits"
[ -z "${CONF[civ]}" ] || [[ "${CONF[civ]}" =~ ^[0-9A-F]{2}$ ]] || problem "civ= should be two hex digits, in capitals"
}
@test "radios.conf: every radio has a Hamlib model and a way to recognise it" {
@test "radios.conf: every radio has a Hamlib model, and a way to recognise it or its CAT rate" {
parse_conf "$REPO/radios.conf" check_radio
check_unique_sections "$REPO/radios.conf"
no_problems