v1.1.1 — Yaesu PTT-on-connect fix
Patch release fixing a safety-critical bug that keyed Yaesu radios into transmit on connect.
Full detail in issue #11 and the CHANGELOG entry.
Fixed
IOKitSerialPort.open()now de-asserts DTR and RTS after configuring termios. macOS opens serial ttys with DTR asserted by default, and CP210x / FTDI drivers leave RTS in its power-on state. Yaesu HF radios (FT-DX10, FT-DX101, FT-991A, FT-891, FT-450D, FT-950, FT-2000, FT-DX3000/5000, and many earlier models) drive hardware PTT off one of these lines on their CAT USB port — so simply opening the port keyed the radio into TX and held it there until the USB cable was physically unplugged.
ClearingCRTSCTSin termios only disables flow-control use of the pins; the fix usesioctl(TIOCMBIC, TIOCM_DTR | TIOCM_RTS)to actually drive them low.
RTS is preserved whenhardwareFlowControlistrue, so hardware-flow-controlled devices continue to work.
Safety and regulatory concern under FCC §97.213 and equivalent regimes worldwide — a CAT library that keys on connect is not fit to ship. Reported by a downstream MacWinlink user on a Yaesu FT-DX10 with a Silicon Labs CP2105 USB-UART.
Added
SerialTransport.setDTR(_:)/setRTS(_:)— public API to drive the DTR and RTS modem control lines from the transport layer. Sinceopen()now de-asserts both lines, callers whose device legitimately needs DTR or RTS asserted (some GPS pucks, Kenwood TS-590 with DTR-as-PTT configured, external TNCs) can opt in explicitly.IOKitSerialPortimplements viaTIOCMBIS/TIOCMBIC;TCPSerialTransportis a documented no-op;MockSerialTransportrecords calls asrecordedDTR/recordedRTSfor test assertions.
Compatibility
No API breakage. The two setDTR / setRTS methods are additive on the SerialTransport protocol with default no-op implementations, so downstream conformers don't need to update.
Regression coverage
- New
IOKitSerialPortModemLineTestsopens anopenpty(3)pair, hasIOKitSerialPortopen the slave, and reads the master's modem-line state viaTIOCMGET. Asserts both DTR and RTS are low afteropen(). Regression guard for issue #11. MockSerialTransportTestsgained coverage for the newsetDTR/setRTSrecording and reset behavior.
Test status: 459 tests, 0 failures.
Consumer update
The MacWinlink app has already bumped its SPM pin to 1.1.1 (ARSFI/MacWinlink@3a12adc) and shipped beta21 with the fix. Other SwiftRigControl consumers should bump when convenient — the fix is safety-relevant for any macOS app driving a Yaesu radio over CAT USB.