Skip to content
KitploitKITPLOIT
ToolsBlog
Log in
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
amradio — FPGA-based 12-channel AM radio broadcast system with formal verification of a hardware watchdog for fail-safe emergency alert transmission in unmanned tunnels. | Kitploit
Tools/GitHubGitHub/park07/amradio
Embedded Systems SecurityHardware HackingHardware SecurityHardware & IoT SecurityPapers & ResearchLearning & EducationFirmware Analysis
GitHubpark07/amradio

amradio

FPGA-based 12-channel AM radio broadcast system with formal verification of a hardware watchdog for fail-safe emergency alert transmission in unmanned tunnels.

View Repository
331146 months agoReviewed by Kitploit

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

AM Radio Break-in System

A 12-channel AM radio broadcast system using Red Pitaya FPGA for emergency alert transmission in unmanned tunnels.

Why AM radio in a tunnel? During construction and maintenance, vehicles with standard AM radios transit through tunnels that have no mobile coverage. AM signals propagate along tunnel structures via leaky feeder cables, and receivers are cheap, robust, and already present in every vehicle. The system broadcasts pre-recorded emergency alerts across multiple frequencies so that any AM radio tuned to any station in the band will receive the message. A hardware watchdog ensures RF output is killed if the control system fails — because automatically restarting a transmitter in an unmanned tunnel is not an acceptable failure mode.

Channels: 12 Platform: Red Pitaya Backend: Rust Frontend: JavaScript Formal Verification: 14/14 PASS


Features

FeatureStatus
12 simultaneous carrier frequencies✅
Runtime frequency configuration (no hardware changes)✅
AM modulation with pre-recorded audio✅
Dynamic power scaling✅
MVC architecture (Rust + JavaScript)✅
Event-driven pub/sub via event bus✅
Stateless UI — device is source of truth✅
Network polling & auto-reconnect✅
Fail-safe hardware watchdog (5s timeout)✅
Formal verification (14 properties, 6 covers, all proven)✅

Architecture

System Architecture

Software Layer

  • Framework: Rust (Tauri) backend + JavaScript frontend
  • Architecture: MVC with event-driven pub/sub
  • Model (model.rs): NetworkManager handles TCP/SCPI, device state, 500ms polling, auto-reconnect with exponential backoff
  • View (view.js, index.html): Stateless — only renders confirmed device state. Never assumes hardware state.
  • Controller (controller.js): Handles user input, publishes events to bus
  • Event Bus (event_bus.rs, event_bus.js): Components communicate through a central bus instead of calling each other directly. Rust emits events to JS frontend via Tauri bridge.
  • State Machine (state_machine.rs): IDLE → ARMING → ARMED → STARTING → BROADCASTING → STOPPING. Intermediate states prevent invalid transitions.
  • Source of Truth: The device, not the software. UI only updates after hardware confirms.

Hardware Layer

  • NCO: 12 Numerically Controlled Oscillators generate carrier frequencies (505–1605 kHz)
  • AM Modulator: Combines audio source with each carrier
  • Dynamic Scaling: Output power adjusts based on enabled channel count
  • Audio Buffer: BRAM stores pre-recorded emergency messages (16,384 sample buffer at ~5 kHz playback rate). AXI audio loader available for runtime loading.
  • Watchdog Timer (wd.v): Hardware fail-safe — if GUI heartbeat stops for 5 seconds, RF output is killed and latched. Only manual operator reset restores output.
  • SCPI Server (am_scpi_server.py): Runs on Red Pitaya, parses text commands, converts frequencies to phase increments, writes to FPGA registers via /dev/mem.

Signal Generation Flow

GUI click → invoke("set_frequency") → model.rs sends "FREQ:CH1 700000" over TCP
→ am_scpi_server.py converts to phase_inc = (700000 × 2³²) / 125MHz
→ writes to FPGA register via /dev/mem → NCO generates carrier → AM modulates → RF output

Formal Verification

The watchdog timer is mathematically proven correct using bounded model checking and k-induction (SymbiYosys + Z3 SMT solver). Unlike simulation-based testing which checks individual scenarios, formal verification proves correctness across every possible input, in every possible state, for all time.

14 Safety Properties (All PASS)

Category#PropertyGuarantee
Basic1Reset clears all!rstn → counter=0, triggered=0, warning=0
2Heartbeat prevents triggerHeartbeat resets counter, clears triggered and warning
6Disable kills everything!enable → all outputs cleared
7Counter boundedCounter never exceeds TIMEOUT_CYCLES
8Force reset worksforce_reset clears all state
9Warning low before thresholdcounter < WARNING_CYCLES → warning=0
Safety3No early triggertriggered ONLY when counter ≥ TIMEOUT_CYCLES
4Trigger guaranteed at timeoutLiveness: timeout always fires trigger
5Warning before triggertriggered=1 → warning=1
5bContrapositive!warning → !triggered
10Warning high in zonecounter > WARNING_CYCLES → warning=1
11Counter increments correctlyExactly +1 per clock cycle during counting
Output12time_remaining at zerocounter=0 → time_remaining = TIMEOUT_SEC
13time_remaining at triggertriggered → time_remaining = 0
14time_remaining monotonicDecreases every cycle during counting

6 Cover Scenarios (All Reached)

#ScenarioStepsDescription
1Trigger fires23Counter reaches timeout
2Warning without trigger21In warning zone, not yet timed out
3Exact timeout boundary22Counter = TIMEOUT_CYCLES exactly
4Last-second heartbeat19Heartbeat at counter = T-1
5Recovery from triggered24Triggered state cleared by force_reset
6Warning-to-trigger lifecycle23Warning then immediate trigger

Running Verification

cd fpga/formal/
sby -f wd.sby

Expected output: SymbiYosys Verification Output

SBY [wd_prove] DONE (PASS, rc=0)
    summary: successful proof by k-induction.
SBY [wd_cover] DONE (PASS, rc=0)
    summary: 6/6 cover statements reached.

Scalability

Verification uses CLK_FREQ=1, TIMEOUT_SEC=5 to keep state space tractable. Production uses CLK_FREQ=125000000. The RTL is parameterised — same if/else logic, same state transitions. Proof at reduced scale implies correctness at production scale.

See fpga/formal/README.md

Requirements

Hardware

  • Red Pitaya STEMlab 125-10
  • AM Radio receiver(s) for testing
  • Ethernet cable (for Red Pitaya connection)

Software

DependencymacOSWindows
Rust + Cargocurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shDownload rustup-init.exe from rustup.rs
Node.js (LTS)brew install node or nodejs.orgnodejs.org
Xcode Command Line Tools (macOS only)xcode-select --install—
Visual Studio Build Tools (Windows only)—Download — select "Desktop development with C++"

Formal Verification (optional)

  • SymbiYosys
  • Yosys
  • Z3 SMT solver

Installation

1. Clone the repository

git clone https://github.com/Park07/amradio.git
cd amradio/am_radio

2. Build the GUI

macOS

# Install Rust (if not installed)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env

# Install Xcode CLI tools (if not installed)
xcode-select --install

# Install Node.js via Homebrew (if not installed)
brew install node
Download Tool