Configuration and software to control the yardstick one on the pikvm in the studio
  • C 72.9%
  • Python 24.9%
  • Makefile 2.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-08-22 22:36:49 +00:00
bin Initial commit: Studio sub-GHz RF power automation and YARD Stick One drivers 2026-08-22 22:28:25 +00:00
docs Initial commit: Studio sub-GHz RF power automation and YARD Stick One drivers 2026-08-22 22:28:25 +00:00
src Clean up: Remove compiled ELF binaries and add .gitignore 2026-08-22 22:33:58 +00:00
.gitignore Clean up: Remove compiled ELF binaries and add .gitignore 2026-08-22 22:33:58 +00:00
README.md Docs: Explicitly list individual FREQ0..2 registers in register table 2026-08-22 22:36:49 +00:00

Studio Sub-GHz RF Power Control (studio_yardstick)

Production tools and firmware drivers for automated 433.92 MHz sub-GHz RF power switching in the recording studio using a Great Scott Gadgets YARD Stick One transceiver hosted on PiKVM V4 Plus (pikvm-studio).

For in-depth reverse-engineering analysis and hardware background, see the Sub-GHz RF Studio Power Automation Wiki.


1. Hardware Specifications

  • Host Controller: PiKVM V4 Plus (Raspberry Pi 4 Model B, 2GB RAM, Arch Linux ARM aarch64)
  • RF Transceiver: Great Scott Gadgets YARD Stick One (1d50:605b)
  • RF SoC: Texas Instruments CC1111F32 (24.0 MHz reference crystal)
  • Frontend Amplifier: Skyworks SE2431L (+20 dBm TX power enabled via setAmpMode(1))
  • Carrier Frequency: 433.920 MHz
  • Modulation: ASK / OOK (Amplitude Shift Keying / On-Off Keying)
  • Symbol Rate: 3433.22 baud (T_e = 291.27\,\mu\text{s})
  • Protocol: 33-bit Princeton / Fosmon Pulse-Width Modulation (PWM)

2. CC1111 Calibrated Register Configuration

Because the CC1111 USB SoC utilizes a 24.0 MHz crystal (unlike standalone CC1101 26.0 MHz crystals), registers must be configured with:

Register Address Value Description
FREQ2 0xDF09 0x12 Frequency Synthesizer MSB: \text{FREQ} = \frac{433,920,000}{24,000,000} \times 2^{16} = \mathbf{0x121473}
FREQ1 0xDF0A 0x14 Frequency Synthesizer Middle Byte
FREQ0 0xDF0B 0x73 Frequency Synthesizer LSB
CHANNR 0xDF0C 0x00 Base channel
MDMCFG4 0xDF10 0x08 Channel bandwidth: 187.5 kHz, DRATE_E = 8
MDMCFG3 0xDF11 0x84 DRATE_M = 132 -> 3433.22 baud
MDMCFG2 0xDF12 0x30 30: ASK/OOK, no sync word / preamble
MDMCFG1 0xDF13 0x00 Zero preamble bytes
MDMCFG0 0xDF14 0xF8 Channel spacing exponent
PA_TABLE1 0xDF2F 0xC0 Maximum TX power (+10 dBm base, +20 dBm with SE2431L)
PA_TABLE0 0xDF2E 0x00 Carrier OFF (OOK low)
FREND0 0xDF17 0x01 Use PA_TABLE1 for bit 1
MCSM0 0xDF18 0x18 Auto-calibration on IDLE to TX transition
PKTCTRL0 0xDF08 0x00 Fixed packet length mode

3. Protocol Timing & Framing Structure

  • Bit 0: 1 tick High, 3 ticks Low (1000 -> 291 µs High, 874 µs Low)
  • Bit 1: 3 ticks High, 1 tick Low (1110 -> 874 µs High, 291 µs Low)
  • Trailing Sync: 1 tick High, 35 ticks Low (1 + 35 zeros -> 291 µs High, 10.19 ms Low)
  • Frame: 33 data bits (132 ticks) + Sync (36 ticks) = 168 ticks = 21 bytes (48.93 ms)
  • Burst: 30 back-to-back continuous frames = 630 bytes (~1.468 seconds)

4. Device Payload Truth Table

Device Key Device Name State 33-Bit Binary Bitstream Hex Payload
mrc Moroccan Lamp ON
OFF
110100001100000100001011011110100
110100001100000100001010011110110
0x1a18216f4
0x1a18214f6
rack Recording Rack ON
OFF
001011011010100100001011100110000
001011011010100100001010100110010
0x5b521730
0x5b521532
computer Studio Computer ON
OFF
001011011010100100001101100111110
001011011010100100001100100111100
0x5b521b3e
0x5b52193c
sub Subwoofer ON
OFF
010110100111010000001101000111000
010110100111010000001100000111010
0xb4e81a38
0xb4e8183a
pa Main PA Speakers ON
OFF
010110100111010000001011000110100
010110100111010000001010000110110
0xb4e81634
0xb4e81436
tv TV Monitor ON
OFF
010110100111010000001111000111100
010110100111010000001110000111110
0xb4e81e3c
0xb4e81c3e
neewer Neewer LED Lights ON
OFF
001010010110011000001111010101110
001010010110011000001110010101100
0x52cc1eae
0x52cc1cac

5. Repository Structure

studio_yardstick/
├── bin/
│   └── studio-power          # Production CLI tool for PiKVM (Python / rflib)
├── src/
│   ├── cc1111_rfcat.h        # Symbolic definitions for CC1111 registers & RfCat protocol
│   ├── yard_tx.c             # Standalone C libusb-1.0 direct CC1111 transmitter
│   ├── flipper_replay.c      # Standalone C Flipper Zero RAW .sub pulse replayer
│   └── Makefile              # Build rules for native C tools
├── docs/
│   └── protocol_spec.md      # Detailed 33-bit Princeton/Fosmon PWM timing specification
└── README.md                 # Technical specification and command reference

6. Usage & Operations

Production CLI (studio-power)

The utility is permanently installed on pikvm-studio at /usr/local/bin/studio-power.

# Control individual outlets:
$ sudo studio-power mrc on
$ sudo studio-power mrc off

$ sudo studio-power rack on
$ sudo studio-power rack off

$ sudo studio-power computer on
$ sudo studio-power computer off

$ sudo studio-power sub on
$ sudo studio-power sub off

$ sudo studio-power pa on
$ sudo studio-power pa off

$ sudo studio-power tv on
$ sudo studio-power tv off

$ sudo studio-power neewer on
$ sudo studio-power neewer off

# Whole-studio session turn-up / turn-down:
$ sudo studio-power all on
$ sudo studio-power all off

# List devices:
$ studio-power list

Compiling Native C Utilities

$ cd src
$ make
$ sudo make install

Standalone C Direct Transmission (yard_tx)

# Transmit raw 33-bit code (30 repeats, Power Amplifier ON):
$ sudo yard_tx 110100001100000100001011011110100 30 1

Flipper Zero RAW Pulse Replay (flipper_replay)

# Replay captured Flipper Zero .sub file directly:
$ sudo flipper_replay Mrc_on.sub 1 30

7. External References