Add FixedAttenuator class and udev rules for RF test bench

FixedAttenuator supports --attenuator fixed:XX for non-programmable
inline SMA pads (set_db is a no-op returning the fixed value).
Udev rules grant non-root USB access for NanoVNA and HMC472A.
This commit is contained in:
Ryan Malloy 2026-02-20 10:56:36 -07:00
parent 3d2cd477b2
commit a12a394099
2 changed files with 1010 additions and 950 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,24 @@
# RF Test Bench udev rules
# Install: sudo cp udev/99-rf-testbench.rules /etc/udev/rules.d/ && sudo udevadm control --reload-rules
#
# Provides non-root access and stable /dev symlinks for:
# /dev/skywalker1 - Genpix SkyWalker-1 DVB-S receiver (USB bulk device, not serial)
# /dev/nanovna - NanoVNA-H vector network analyzer (ttyACM)
# /dev/attenuator - HMC472A digital attenuator on ESP32-S3 (ttyACM)
# --- Genpix SkyWalker-1 (09c0:0203) ---
# Custom firmware: Product="SkyWalker-1 Custom", Serial="0001"
# Stock firmware: Product="Genpix SkyWalker-1", Serial="00857"
# Kernel dvb_usb_gp8psk driver blacklisted in /etc/modprobe.d/blacklist-gp8psk.conf
SUBSYSTEM=="usb", ATTR{idVendor}=="09c0", ATTR{idProduct}=="0203", MODE="0666", SYMLINK+="skywalker1"
# Cypress FX2 bare/unprogrammed (04b4:8613) - for recovery/development
SUBSYSTEM=="usb", ATTR{idVendor}=="04b4", ATTR{idProduct}=="8613", MODE="0666"
# --- NanoVNA-H (0483:5740) ---
# Match on model to avoid hitting other STM32 CDC devices
SUBSYSTEM=="tty", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5740", ATTRS{product}=="NanoVNA-H", MODE="0666", SYMLINK+="nanovna"
# --- HMC472A attenuator on ESP32-S3 native USB CDC ---
# Espressif VID=303a, PID=1001 (USB JTAG/serial), match on product string
SUBSYSTEM=="tty", ATTRS{idVendor}=="303a", ATTRS{product}=="hmc472a-attenuator", MODE="0666", SYMLINK+="attenuator"