Building an Autonomous Frequency Scanner
One of the most powerful aspects of the Mycelium framework is its ability to automate mundane, time-consuming tasks. In traditional RF testing, finding an active transmission in a wide band often requires an operator to stare at a waterfall plot for hours. With Mycelium's Directive System, we can automate this completely.
In this walkthrough, we will build a headless script that sweeps a 10 MHz block of spectrum, stops when it detects a transmission exceeding a specific power threshold, records the raw IQ data, and then resumes sweeping.
Step 1: Initializing the Scanner Tool
First, we create a tool configured with a generic `Raw` protocol and our target SDR. We'll start sweeping at 430 MHz.
Step 2: Defining the Scan Logic
Next, we instruct the tool to receive a chunk of samples. Once received, we evaluate the signal power. If it is too low (just background noise), we increment the frequency by 100 kHz. If it exceeds our threshold, we save the data.
Step 3: Logging the Hits
Finally, we need to handle the case where the signal is strong. We use the Signal_Power_GT condition combined with the Save_IQ and Report_CSV actions to document the hit.
Execution Flow
Execution
With those five directives loaded, simply type execute. The `auto_scanner` tool will continuously pull in samples, evaluate them, step the frequency, and save off any spikes it finds into neatly organized, timestamped files.
This entire process happens autonomously, allowing the engineer to focus on analyzing the captured IQ data rather than babysitting the spectrum analyzer.
← Back to Blog