Skip to content

rigctld dump_state handshake slow with WSJT-X #63

Description

@ten9876

Bug

WSJT-X takes 9-55 seconds to complete the initial CAT handshake when connecting to AetherSDR's rigctld server. Commands (band change, PTT) queue up during this time and execute all at once when the connection stabilizes.

Root Cause

WSJT-X's NET rigctl backend sends \dump_state on connect and parses the response line-by-line expecting a specific field format. Our cmdDumpState() response in RigctlProtocol.cpp may have incorrect field counts, missing terminators, or format mismatches that cause WSJT-X to wait for more data until it times out.

Evidence from WSJT-X logs

read_string_generic(): read failed, direct=1 - Success
netrigctl_close: close error

This "read failed" happens after 9-55 seconds, indicating a read timeout waiting for expected data.

What Works

  • After the initial handshake timeout, commands work correctly
  • echo "f" | nc localhost 4532 returns frequency instantly
  • TCP_NODELAY is enabled, socket writes are immediate

Fix Needed

Compare our dump_state output against actual rigctld --model=2 output field-by-field. The NET rigctl protocol expects exact field counts per section. Reference: Hamlib source rigs/dummy/netrigctl.c function netrigctl_open().

Files

  • src/core/RigctlProtocol.cppcmdDumpState() (line ~303)

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority: highHigh priorityprotocolSmartSDR protocol

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions