Skip to content

Add ATU Band Pre-Tune Sweep with IARU-Region Band Stepping and Memory Clear #2624

Description

@TnxQSO-Admin

Request preparation

  • I used an AI assistant to help structure this request
  • I checked for existing issues covering the same feature

What would you like?

What

A new dialog that steps the TX slice through a set of pre-calculated center
frequencies across selected HF/6m bands, triggering atu start at each point
and waiting for the result before moving to the next. The user confirms each
step via a popup before the radio transmits. A companion function to clear ATU
memories per band or for all bands is included.

Why

The internal ATU builds up its memory database one frequency at a time during
normal operation. On a new antenna, after a factory reset, or after clearing
memories for an antenna change, the first transmission on any untuned frequency
requires a live tune cycle that delays operation. Pre-tuning the full band
before a session eliminates this delay and ensures seamless ATU recall across
the entire band plan.

The SmartSDR Windows client offers no automated way to do this. It must be
done manually, frequency by frequency. AetherSDR can close this gap.

How Other Clients Do It

SmartSDR for Windows has no band pre-tune sweep. The user must manually QSY
to each desired frequency and press ATU. The MEM button must be active before
each tune for the result to be stored.

Third-party tools such as Commander (DXLab) and logging programs can sequence
the VFO but do not integrate ATU triggering.

Suggested Behavior

Access

Two new entries are added to the right-click context menu on the ATU button
in TxApplet (the same menu that will eventually expose Clear ATU Memories):

  • Pre-tune bands... -- opens AtuPreTuneDialog
  • Clear ATU memories... -- opens a confirmation sub-menu (see below)

The Pre-tune bands... entry is grayed out with a tooltip if MEM is not
enabled: "Enable MEM before running the pre-tune sweep."

Configuration Dialog -- AtuPreTuneDialog

Opening Pre-tune bands... shows a modal dialog with:

  • IARU Region selector (1 / 2 / 3) -- determines band limits used for
    center frequency calculation.
  • Band checklist -- one checkbox per band. All bands are checked by
    default. Each row shows: band name, segment size (kHz), number of tuning
    points, and estimated time at 15 s/point.
  • Mode selector -- Step (confirm each point) or Auto (run unattended).
  • An Operator Responsibility disclaimer, shown in full every time the
    dialog opens:

Operator Responsibility: You must ensure that your transmissions do not
interfere with other radio traffic. Always verify that the selected frequency
is clear before tuning, and never leave this process unattended unless you
fully understand its behavior, failure modes, and risks. AetherSDR transmits
at tune power on each frequency in the sweep. You are responsible for
compliance with your license and local regulations. Do not use this function
for unattended or automated transmission unless you fully understand its
behavior, failure modes, and risks.

  • A START button and a CANCEL button.

Segment Calculation (IARU Region 1)

Center frequencies are computed as:

first_center = band_start + (segment_size / 2)
next_center  = previous_center + segment_size
last_center  = min(last_center, band_end - segment_size / 2)

The last segment is clamped so that center + segment_size/2 never exceeds
band_end. The radio never transmits outside the band plan.

Reference table for IARU Region 1:

Band Start (kHz) End (kHz) Segment (kHz) Points First center (kHz)
160m 1800 2000 9 23 1804.5
80m 3500 3800 9 34 3504.5
60m 5351.5 5366.5 9 2 5356.0
40m 7000 7200 25 8 7012.5
30m 10100 10150 25 2 10112.5
20m 14000 14350 51 7 14025.5
17m 18068 18168 51 2 18093.5
15m 21000 21450 75 6 21037.5
12m 24890 24990 75 2 24927.5
10m 28000 29700 75 23 28037.5
6m 50000 52000 101 20 50050.5
All 129

Separate tables for IARU Region 2 and 3 are required. Exact band limits for
those regions need to be sourced and verified before implementation.

Step Mode (per-point confirmation)

For each center frequency:

  1. AetherSDR sends slice t 0 <freq_mhz> to move the RX slice to the target
    frequency. The user can now listen and observe the panadapter to check
    whether the frequency is clear.
  2. Dialog shows: Ready to tune: 14025.5 kHz (20m, point 1/7) with Tune
    this frequency
    , Skip, and Abort buttons.
  3. On Tune this frequency: AetherSDR waits 300 ms for the slice to settle,
    then sends atu start.
  4. Dialog shows a spinner and the current frequency while waiting for
    atuStateChanged on TransmitModel.
  5. On TUNE_SUCCESSFUL or TUNE_OK: shows a green checkmark, logs the
    result, advances to next point.
  6. On TUNE_FAIL_BYPASS or TUNE_FAIL: shows a warning icon and the
    result. User can choose Continue or Abort.
  7. On Abort: sends atu bypass, restores the original slice frequency,
    and closes the dialog.

Auto Mode

Same sequence but without per-point confirmation. An always-visible ABORT
button is shown throughout. On any TUNE_FAIL the sweep pauses and asks
the user whether to continue or abort.

After the Sweep

The slice is restored to the frequency it was on before the sweep started.
A summary is shown: X points tuned successfully, Y skipped, Z failed.

Clear ATU Memories

The second right-click menu entry Clear ATU memories... opens a small
confirmation dialog with two choices:

  • Clear current band -- clears memories only for the active band.
  • Clear all bands -- clears the entire ATU memory database.

Both require an explicit confirmation click before the command is sent.
This mirrors SmartSDR's right-click "Clear ATU Memories" on the ATU button,
which currently has no equivalent in AetherSDR.

Protocol Hints

Known and confirmed from existing AetherSDR source:

atu start                      # initiate a tuning cycle (TransmitModel.cpp:440)
atu bypass                     # bypass the ATU (TransmitModel.cpp:445)
atu set memories_enabled=1     # enable memory storage (TransmitModel.cpp:450)
slice t 0 <freq_mhz>           # tune TX slice to frequency

ATU status arrives via sub atu all:

atu status=TUNE_SUCCESSFUL atu_enabled=1 memories_enabled=1 using_mem=1

Status enum values handled by parseAtuTuneStatus():
NONE, TUNE_NOT_STARTED, TUNE_IN_PROGRESS, TUNE_BYPASS,
TUNE_SUCCESSFUL, TUNE_OK, TUNE_FAIL_BYPASS, TUNE_FAIL, TUNE_ABORTED,
TUNE_MANUAL_BYPASS

Unknown -- needs research:

  • The command to clear ATU memories is not present anywhere in the AetherSDR
    codebase. SmartSDR exposes this via right-click but the underlying TCP
    command is undocumented in the public API wiki. Candidates: atu clear,
    atu set clear=1, or similar. Requires a Wireshark capture against SmartSDR
    to confirm before the Clear ATU Memories function can be implemented.
  • The atu dump command exists (returns R|0| with no visible payload in
    FlexLens). Its response format is unknown. May expose stored memory entries.
  • IARU Region 2 and Region 3 band limits need to be sourced before those
    regions can be implemented.

Acceptance Criteria

  • The Pre-tune and Clear ATU memories entries are accessible via right-click
    on the ATU button in TxApplet and nowhere else. No new persistent UI
    elements are added to the panel.
  • The Pre-tune entry is grayed out when MEM is not enabled, with a tooltip
    explaining why.
  • The Operator Responsibility disclaimer is shown in full every time
    AtuPreTuneDialog is opened.
  • In Step mode the radio never transmits on a given frequency until the user
    clicks Tune this frequency. In Auto mode an ABORT button is always
    visible and functional.
  • The last tuning point on any band never exceeds band_end minus half the
    segment size, ensuring transmissions stay within the band plan for the
    selected IARU region.
  • After the sweep, the TX slice is restored to the frequency it was on before
    the sweep started.
  • The Clear ATU Memories function (once the protocol command is identified)
    offers both per-band and all-bands variants, each requiring explicit
    confirmation before execution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    GUIUser interfaceNew FeatureNew feature requestenhancementImprovement to existing featuremaintainer-reviewRequires maintainer review before any action is takenprotocolSmartSDR protocolsafetyEquipment protection concern

    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