aethersdr / aethersdr/AetherSDR
CWX: firmware never emits `cwx queue=` on drain — retire reply-radio_index workaround if it lands (fw 4.2.20 observed)
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 221
- Forks
- 117
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 299
Description
Summary
FlexRadio firmware does not emit a cwx queue= status when the CWX keyer buffer drains, so a client has no direct "queue empty" signal to release TX after a CWX macro/send finishes. With sync_cwx=1 the radio holds TX for its full hardware interlock timeout (~60 s) unless the client issues an explicit xmit 0 — but without queue= the client can't tell when to send it.
This is the root cause behind #3949 / #3979. The workaround there detects drain indirectly by capturing the radio_index from the final cwx send reply and watching the live cwx sent= counter reach the batch end (radio_index + nChars - 1).
Observed
- FLEX-6500, firmware 4.2.20.41343:
cwx queue=is never sent during or after a CWX transmission (verified via the automation-bridgeget cwxsnapshot over multiple keyed macros —sent=advances per character,queue=never arrives). - The reply
radio_indexis the batch's first-char (insertion-start) queue position, not the last char — the drain-watch end index must be computed asradio_index + nChars - 1.
Not yet confirmed on the 8600 / fw 4.2.18 (the nominal target), though both share the CWX protocol lineage.
Why this is upstream
If a future firmware starts emitting cwx queue= on drain (the natural, direct signal), the reply-radio_index watch in CwxModel/RadioModel becomes redundant and can be retired in favour of the simpler queue= path (a legacy fallback for it already exists in CwxModel::applyStatus). This issue tracks that retirement condition per the Optimistic Updates Policy.
Action if/when fixed upstream
- Confirm
cwx queue=(empty/0) fires on drain on the target firmware. - Re-enable the
queue=→queueEmpty()path as primary; remove the reply-radio_index+nCharsmachinery inCwxModel/RadioModeland theget cwxcwxEndIndex/epoch fields. - Pin the firmware version at which the echo appeared.
Refs: #3949, #3979.
🤖 Generated with Claude Code
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by verifying whether the target firmware emits an empty cwx queue= event on drain. Then inspect CwxModel::applyStatus, the reply-radio_index and nChars handling in CwxModel/RadioModel, and the get cwx cwxEndIndex/epoch fields; done means the queue path is primary and the workaround is removed once upstream behavior is confirmed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100