Skip to content

feat(flexcontrol): accept aether-pad CDC controllers via VID/PID alias#3111

Closed
nigelfenton wants to merge 1 commit into
aethersdr:mainfrom
nigelfenton:feat/aetherpad-cdc-alias
Closed

feat(flexcontrol): accept aether-pad CDC controllers via VID/PID alias#3111
nigelfenton wants to merge 1 commit into
aethersdr:mainfrom
nigelfenton:feat/aetherpad-cdc-alias

Conversation

@nigelfenton

Copy link
Copy Markdown
Contributor

Summary

Extends FlexControlManager::detectPort to scan a small compile-time list of compatible USB IDs instead of matching only FlexRadio's native FlexControl pair (0x2192 / 0x0010). Adds the Arduino Giga R1 CDC pair (0x2341 / 0x0266) so the aether-pad project's AetherControl persona is detected automatically — no driver changes, no VID/PID spoofing.

Motivation

The FlexControl protocol documented in FlexControlManager.h is small, well-specified, and OS-portable, which makes it an attractive integration target for community-built controllers. The only blocker today is the strict VID/PID gate in detectPort().

aether-pad is an Arduino Giga R1-based standalone control surface. Its AetherControl persona emits the documented FlexControl token stream verbatim:

Direction Tokens
aether-pad → host D;, D02;D06;, U;, U02;U06; (rotation, accelerated)
aether-pad → host X1S;/X1C;/X1L; (Aux1 tap/double/hold; same for X2, X3)
aether-pad → host bare S;/C;/L; (encoder PUSH button — per #2263 capture)
aether-pad → host F0304; (init/reset announce)
host → aether-pad I000; / I100; / I010; / I001; (Aux LED state)

From AetherControl's perspective it's a real FlexControl; the only thing that differs is the USB IDs the device advertises during enumeration.

Change

detectPort() now iterates a static constexpr table of {vid, pid} pairs. The native FlexControl pair stays first, so behaviour for operators using genuine FlexRadio hardware is unchanged. Adding additional compatible controllers (other open-hardware boards, vendor variants) in the future is one line in the table.

static constexpr struct { quint16 vid; quint16 pid; } kCompatibleDevices[] = {
    { VendorId, ProductId },   // FlexRadio FlexControl (native)
    { 0x2341,   0x0266   },    // Arduino Giga R1 CDC (aether-pad)
};

Precedent

Mirrors the same pattern already established for the controller-emulator HID path used by aether-pad's RC-28 persona (HidDeviceParser::kSupportedDevices entry that routes the Arduino HID VID/PID to IcomRC28Parser). Single approach for both controller-class personas.

Testing

  • Genuine FlexControl detection: unchanged — native VID/PID matches first iteration.
  • aether-pad in AetherControl persona: enumerates as Arduino CDC, gets matched on second table entry, returns its port name to the dialog's Detect/Connect flow.
  • LED round-trip (I…;) and tuning events confirmed by the aether-pad operator UI on the touchscreen indicator state.

Cross-platform

Patch lives in shared model code; no platform-specific guards needed. The aether-pad bench has been validated on Windows; macOS and Linux build paths are unchanged from current main.

Out of scope

  • No protocol changes.
  • No new configuration surface (the table is compile-time; user-extensible allowlists could come later if there's demand).
  • No spoofing of FlexRadio VID/PID anywhere in the firmware ecosystem — that path was rejected on ethical grounds.

Status

Filing as draft — the aether-pad firmware side (multi-persona menu, AetherControl USB CDC emitter wiring, per-persona screens) is still in progress on nigelfenton/aether-pad@feat/rc28-test-mode. This PR can be ready-for-review once the firmware bench is fully exercising the alias end-to-end.


73, Nigel G0JKN/W3

FlexControlManager::detectPort previously matched only the native
FlexRadio FlexControl USB IDs (0x2192 / 0x0010). This change extends
detectPort to scan a small compile-time table of compatible devices,
adding Arduino Giga R1 CDC (0x2341 / 0x0266) used by the aether-pad
project's AetherControl persona.

The aether-pad firmware emits the documented FlexControl token stream
verbatim (D;, D02;..D06;, U;, U02;..U06;, X{1,2,3}{S,C,L};, bare S;/C;/L;
for the knob, F0304; init) and reads I000;..I111; LED commands back
into the on-screen Aux indicators. From AetherControl's point of view
it's a real FlexControl; only the USB IDs differ.

Mirrors the precedent set by the IcomRC28Parser HID alias on the
controller-emulator path that aether-pad already uses for its RC-28
persona.

No behaviour change for operators using a genuine FlexControl: the
native VID/PID still matches first.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@nigelfenton

Copy link
Copy Markdown
Contributor Author

Hi Pat — #3111 isn't redundant with #3171; they're sibling aliases for two different USB device classes. #3171 (merged today) added the RC-28 HID emulator alias in HidDeviceParser.cpp. #3111 adds the FlexControl CDC emulator alias in FlexControlManager.cpp — completely disjoint files, both following the same allowlist pattern with the native VID/PID preserved as the first table entry. The aether-pad firmware can present either persona depending on a menu selection.

It's still draft because the firmware-side AetherControl persona (multi-persona menu UI, CDC emitter wiring, per-persona LED state on the touchscreen) hasn't finished its bench-validation pass. The RC-28 persona was fully validated 2026-05-20; AetherControl is the next track. The upstream patch itself is finished — CI is green and the diff (+14/-3) is mechanically the same shape #3171 just took.

I'll rebase against current main and mark Ready once the firmware bench exercises the CDC alias end-to-end. Thanks for chasing.

73 Nigel G0JKN

@nigelfenton

Copy link
Copy Markdown
Contributor Author

Closing for now.

The host-side change here is complete and clean (and still merges fine against main), but it's only half of a feature: it's gated on the aether-pad firmware AetherControl (FlexControl-CDC) persona, and that side has hit a hardware limit.

On the Arduino Giga R1, mbed_giga 4.5.0's PluggableUSB framework exposes only a single composite CDC interface, regardless of how many arduino::USBSerial instances are constructed — both the normal Serial and the intended actrlSerial ended up on the same endpoint. The Phase-4a "second CDC endpoint for AetherControl" approach was therefore reverted (2026-05-25, hardware test).

Until the firmware can present the FlexControl token stream on the Arduino CDC ID and be bench-validated end-to-end, there's nothing for this VID/PID alias to detect — so I'd rather not carry a half-feature in the queue (and the merged RC-28 HID path, #3171, already covers aether-pad's working controller persona).

The branch (feat/aetherpad-cdc-alias) and this one-file change are preserved, so this is a trivial reopen once the firmware side is solved.

73, Nigel G0JKN/W3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant