A build-first course for cyber security operators. Learn the RF chain, wire it in GNU Radio Companion, prove it without help, then move up the stack. No magic blocks. No illegal transmitters. No hand-waving.
15 modules45 checkpoints10 live chartssim + hardware pathsrx only by default
15modules
45study / lab / solo checks
2paths: simulated + radio
0transmitters required
00 / LOOP
Study → build → prove → advance
Every module uses the same loop. The point is not to copy a flowgraph. It is to predict what the flowgraph will do, then verify it.
01 / STUDY
Get the model
Read the concept and vocabulary. You cannot debug a spectrum you cannot describe.
02 / BUILD
Wire it in GRC
Build the lab, change one variable, and write down your prediction before you run it.
03 / SOLO
No help question
Close the notes. Answer first. Reveal the solution only after you commit to an answer.
04 / ADVANCE
Mark and move
Tap the three phase chips. When all three are done, the module is complete and the next one unlocks your attention.
Rules of engagement
Radio law is local and receiving is not automatically unrestricted. Never transmit without a licence or written authorization. Never jam, intercept private communications, or replay a signal you do not own. For any transmit experiment, use a dummy load and a shielded enclosure, not an antenna. If you are unsure: do not transmit.
01 / RIG
You do not need fancy hardware to start
You need a working GNU Radio install, a terminal, headphones, and a notebook. A radio makes it real; simulation makes the concepts visible.
Minimum path
Computer + rfswift + GRC
Every lab has a simulated route. Use Signal Source, Noise Source, and Throttle to see DSP without an antenna. This is how you learn to read a flowgraph.
Receive path
RTL-SDR, Airspy, or similar
An RTL-SDR is enough for modules 1–8, 11, 14, and 15. Add a decent antenna, a USB extension, and ferrites. Expect 8-bit dynamic range, not laboratory performance.
Transmit-capable
HackRF, Pluto, Lime, USRP
TX hardware is not a licence to transmit. Use attenuators, filters, a dummy load, and a shielded box. Half-duplex radios cannot receive while transmitting.
Bench kit
Attenuators, adapters, notes
10/20/30 dB SMA attenuators, a DC block, a known-good antenna, and a lab notebook. Record centre frequency, sample rate, gain, timestamp, and what you expected.
If gnuradio-companion is not found
Open a shell inside your rfswift environment first. Confirm the toolchain with gnuradio-config-info --version, python3 -c "from gnuradio import gr; print(gr.version())", and SoapySDRUtil --info. If those fail, fix the environment before debugging a flowgraph.
02 / ROADMAP
Four phases, one stack
Do not jump to digital decoding. The RF chain, sampling, and gain staging are the foundation for every later trick.
This is a complete first pass, not a replacement for the GNU Radio docs, a radio licence, or an RF engineering degree. It gives you the sequence, the labs, the questions, and the vocabulary. The field reference includes a coverage map that separates what is taught, what is only mentioned, and what is still missing.
MODULE 01 / PHASE I · FOUNDATIONS
The RF chain is a data pipeline
Before GNU Radio, learn where the samples come from. Every SDR problem is either physics, timing, or trust. This module gives you the map you will use for the rest of the course.
~45 minrx only3 checkpoints
Tap each chip when you finish that phase. Progress is stored only in this browser.
01 Study / Follow one signal
An SDR does not “listen to a frequency.” It captures a slice of spectrum, converts it to complex baseband, and hands you a stream of numbers. The RF chain is the path between the antenna and those numbers.
Antenna converts an electromagnetic field into a tiny voltage. Resonance and polarization matter more than marketing gain figures.
Filter and LNA select a band and amplify it. The LNA adds noise but can also be overloaded by a strong nearby signal.
Mixer and local oscillator translate RF to baseband: f_baseband = f_rf − f_LO. Negative baseband frequencies are real and useful.
ADC samples and quantizes the signal. More bits means more theoretical dynamic range; more samples per second means more bandwidth.
DDC and decimation select a channel and reduce the rate before the host. This is where “wideband capture” becomes a manageable stream.
Host DSP filters, demodulates, synchronizes, and decodes. GNU Radio lives here.
Transmit is the same chain in reverse: bits → symbols → DAC → mixer → filter → power amplifier → antenna. Most low-cost SDRs are receive-only or half-duplex. That is a safety feature, not a limitation to work around.
Sample rate is width, not tuning range
A complex stream at 2.4 Msps can represent about 2.4 MHz of spectrum, centred on the tuner frequency. It does not mean the radio can tune from 24 MHz to 1.7 GHz at once. The hardware tuner sets the centre; the sample rate sets the window.
Radio
Typical role
What it teaches
RTL-SDR
RX only, 8-bit, ~24–1766 MHz
Cheap wideband receive, gain staging, real-world overload
Host: USB drivers, firmware, untrusted IQ files, and parsers. Treat a capture as hostile input.
Supply chain: fake radios, modified firmware, unknown provenance. Know what you plugged in.
02 Build / Bench check and first flowgraph
This lab has two paths. Do the simulated path even if you have a radio; it isolates GNU Radio from RF problems.
Lab 01Asimulation / no hardware
Open a terminal in your rfswift environment. Run gnuradio-config-info --version, python3 -c "from gnuradio import gr; print(gr.version())", and SoapySDRUtil --info. Note the GNU Radio version.
Start gnuradio-companion. Create a blank flowgraph.
Add Signal Source → Throttle → QT GUI Frequency Sink.
Set the signal source to complex output, frequency 100e3, sample rate 1e6, amplitude 0.7. Set the throttle to 1e6. Set the sink bandwidth to 1e6 and FFT size to 1024.
Run it. You should see a single tone at +100 kHz. Change the tone to −100e3; predict what happens before you run it.
Open the generated Python file (Generate button) and find the connect() calls. The graph is the source; the Python is the proof.
Expected: a clean spectral line that moves across the display; no red blocks; no console traceback.
Lab 01Bhardware / receive only
Connect your antenna. Run SoapySDRUtil --probe="driver=rtlsdr" or the probe for your radio. Confirm a serial and a tunable range.
In GRC, replace the signal source and throttle with RTL-SDR Source (or SoapySDR Source). Set sample rate 2.4e6, centre frequency 100e6, RF gain around 28 dB.
Connect the source to QT GUI Frequency Sink and QT GUI Waterfall Sink. Use a bandwidth of 2.4e6.
Tune across the FM broadcast band. Do not add a throttle: the hardware paces the stream.
Record three observations in your notebook: strongest signal, noise floor appearance, and one thing that changed when you moved the antenna.
If it fails: no device usually means driver, udev permissions, USB power, or the wrong Soapy driver. No display means you are in a headless shell; use the later file-sink labs.
03 Solo check / Close the notes
No-help question
Your SDR is tuned to 100.0 MHz with a 2.4 Msps complex sample rate. A signal appears at +300 kHz in the FFT. What is its actual RF frequency, and what is the full captured range?
Reveal answer
100.3 MHz. Add the baseband offset to the centre: 100.0 + 0.3 = 100.3 MHz. The captured complex range is approximately 98.8–101.2 MHz (2.4 MHz wide, centred on 100.0 MHz).
Second check: a 2.4 Msps radio cannot show a clean 5 MHz-wide signal because its complex bandwidth is only 2.4 MHz. It needs a higher sample rate, a wider front-end, and enough host throughput.
A complex sample carries amplitude and phase. That sounds academic until you realise it is the difference between a spectrum with images and a spectrum you can actually demodulate.
~45 minrx only3 checkpoints
Tap each chip when you finish that phase.
01 Study / Two numbers, one signal
A real sample is one voltage. A complex sample is two: in-phase (I) and quadrature (Q), usually written z = I + jQ. GNU Radio’s native stream type is complex float32.
Magnitude is sqrt(I² + Q²): how strong the signal is.
Phase is atan2(Q, I): where the rotating vector points.
A positive-frequency tone rotates one way; a negative-frequency tone rotates the other way. This is why a complex FFT is not symmetric.
Real sampling must fold the spectrum and creates an image. Quadrature mixing uses two local oscillators 90° apart to reject that image.
Real hardware is imperfect. DC offset appears as a spike at the centre; I/Q imbalance creates a mirror image. Calibration and good gain staging reduce both.
The complex plane is also the constellation diagram. Once you understand I/Q, BPSK, QPSK, and QAM stop looking like arbitrary pictures and become points in the same plane.
Mental model
Think of a complex sample as a arrow with a length and a direction. Amplitude modulation changes the length. Phase modulation changes the direction. Frequency is how fast the direction changes.
CHAPTER VISUAL / I/Q TIME DOMAIN
Flip the sign, reverse the rotation
I is the cosine part; Q is the sine part. Change the sign of the frequency and Q reverses relative to I.
Rotation—
Period—
I (in-phase)Q (quadrature)
In the e^(j2πft) convention, a positive-frequency tone has Q trailing I by 90°; a negative-frequency tone has Q leading I. That sign is what lets complex DSP keep the two sides of the spectrum apart.
02 Build / See negative frequency
Lab 02simulation / ~20 min
Build: Signal Source (complex, 100 kHz) → Add ← Signal Source (complex, −100 kHz). Feed Add → Throttle (1 Msps) → QT GUI Frequency Sink.
Set both amplitudes to 0.5, the sink bandwidth to 1e6, FFT size 1024, centre 0.
You should see two tones, one on each side of zero. Delete the negative source and confirm the spectrum becomes one-sided.
Add QT GUI Constellation Sink after the throttle. A single tone traces a circle. Two tones produce a more complex shape.
Add a small Noise Source (complex, amplitude 0.05) through a second input of Add. Watch the constellation thicken.
Prediction: before running, decide whether a real-valued tone at +100 kHz would show one line or two. Explain the image in one sentence.
03 Solo check / Close the notes
No-help question
A complex baseband tone sits at −300 kHz. The local oscillator is at 99.9 MHz. What is the RF frequency? Why can the negative sign exist at baseband?
Reveal answer
99.6 MHz, because f_rf = f_LO + f_bb = 99.9 + (−0.3). Negative baseband frequencies mean the signal is below the LO, not that the frequency is unphysical. A complex stream preserves that side-of-centre information.
If the same signal were sampled as a real stream, the negative and positive sides would fold together and you would lose the ability to distinguish them without more information.
Most “the signal disappeared” bugs are actually sample-rate, resolution, or unit errors. Learn the three numbers that explain almost every display: sample rate, FFT size, and bandwidth.
~55 minrx only3 checkpoints
Tap each chip when you finish that phase.
01 Study / The numbers behind the picture
Nyquist: a real signal needs a sample rate above twice its highest frequency. A complex signal has a unique span of one sample rate, usually shown from −fs/2 to +fs/2. Anything outside that span aliases into it.
FFT: the display divides the sample rate into N bins. The bin width, often called resolution bandwidth, is fs / N. A larger FFT gives finer frequency resolution but a longer time window and more processing.
Window: reduces spectral leakage at the cost of smearing. Blackman-Harris is a good default for weak signals; rectangular is sharper but leakier.
Averaging: stabilises the noise floor but can hide short bursts. Never average while hunting a burst.
dB: a ratio. +3 dB is about 2× power; +10 dB is 10× power; +20 dB is 10× amplitude.
dBm: absolute power relative to 1 mW. 0 dBm = 1 mW. dBFS is relative to the ADC’s full scale, not the same thing.
Noise floor, quickly
Thermal noise is about −174 dBm/Hz at room temperature. Add the receiver noise figure and 10 log10(bandwidth). A 20 kHz channel with a 6 dB noise figure has a floor near −125 dBm. A bigger FFT shows a lower number per bin because each bin is narrower, not because the receiver became magical.
ADC bits: the ideal signal-to-quantisation-noise ratio is about 6.02N + 1.76 dB. An 8-bit ADC gives roughly 50 dB theoretical; real radios do worse. This is why a strong signal can bury a weak one even when the display looks “clean.”
CHAPTER VISUAL / ALIASING
Outside the window, it comes back
The captured band is only one sample-rate wide. Move a tone beyond the edge and watch where the sampled data puts it.
Window—
Result—
sampled tonealiased
A 2.4 Msps complex stream spans roughly ±1.2 MHz. A tone at +1.5 MHz is outside that span, so it appears at −0.9 MHz after sampling.
Set the FFT size to 256, bandwidth 1e6. Note the noise floor and the tone. Compute the bin width: 1e6 / 256 = 3906.25 Hz.
Change FFT size to 4096. Predict what happens to the per-bin noise floor and the tone before running. Then run it.
Turn on averaging for 2 seconds, then turn it off. Add a very short burst? For now, just notice how averaging smooths the trace and hides moment-to-moment variation.
Hardware path: tune the FM band at 2.4 Msps with FFT 2048. Compute the bin width and estimate the width of one station from the number of bins it covers.
Expected: the tone stays near 250 kHz; the noise floor per bin drops as the FFT grows; the displayed noise looks smoother with averaging.
At 2.4 Msps with an FFT size of 4096, what is the bin width? A carrier drifts by 3 bins; how many hertz is that?
Reveal answer
2.4e6 / 4096 = 585.9375 Hz per bin. Three bins is about 1757.8 Hz.
Follow-up: with FFT 1024 the bin width would be 2343.75 Hz, so the same physical drift would look like less than one bin. The display resolution changed, not the signal.
GRC is a graph editor that generates Python. The runtime is C++ blocks moving typed streams. Once you see the graph as backpressure and metadata, debugging gets much less mysterious.
~50 minsimulation3 checkpoints
Tap each chip when you finish that phase.
01 Study / The graph, the stream, the scheduler
A flowgraph is a set of blocks connected by typed ports. Data moves as streams of items; the scheduler moves buffers and applies backpressure. A block does not process “the signal” in one go; it processes chunks.
Source: produces samples. Hardware sources are paced by the radio; simulated sources are not.
Sink: consumes samples. GUI, audio, file, null, and network sinks are all consumers.
Sync block: one output item per input item. Decimator: fewer outputs. Interpolator: more outputs. Resampler: rational rate change.
Variable: a named value used by expressions. Change it in one place so rates stay consistent.
Data types: complex, float, int, short, byte. The colours and port shapes are not decoration; a mismatch is a hard error.
Throttle is the classic beginner trap. A simulated source can produce samples as fast as the CPU allows. Without a throttle, the flowgraph can starve the GUI, spin a core, or make audio collapse. Hardware sources already have a clock, so do not add a throttle unless you have a specific reason.
Read the generated Python
Press Generate, open the .py file, and find self.connect(...). The graphical graph is a convenience; the generated Python is the actual program. If you can read the connections, you can debug the graph.
02 Build / Hello, spectrum
Lab 04simulation / ~25 min
Build: Signal Source (complex, 100 kHz) → Add ← Noise Source (complex, 0.05). Then Add → Throttle (1 Msps).
Branch the throttled stream to QT GUI Frequency Sink and QT GUI Time Sink. Set both to complex; time sink sample rate 1e6.
Run. Stop. Generate. Open the generated Python and locate the variable samp_rate, the throttle, and the two GUI sinks.
Change samp_rate from 1e6 to 2e6. Update the source, throttle, and sink settings so they use the variable. Predict whether the 100 kHz tone moves on the display.
Make a copy of the flowgraph, set the Options block to a no-GUI generation mode, and run it from the terminal. Notice what disappears when there is no display.
Expected: a tone plus a noise floor, two views of the same stream, and a generated Python file that mirrors the graph.
Debug order
Red block: missing dependency, bad parameter, or type mismatch. Red port: incompatible type. Flowgraph starts then dies: read the console traceback. GUI freezes: check for a missing throttle or an absurd sample rate. Audio stutters: check rate conversion and the audio device.
03 Solo check / Close the notes
No-help question
Why does a simulated flowgraph usually need a Throttle, while an RTL-SDR flowgraph usually does not? What are you actually protecting?
Reveal answer
A simulated source has no real-time clock; it can produce items as fast as the scheduler can run. A throttle paces the stream so CPU, GUI, audio, and file writes are not overwhelmed. An SDR source is paced by the hardware and USB transfer rate, so adding a throttle is usually redundant.
You are protecting the runtime, not the signal. The samples are already valid; the problem is timing and resource pressure.
This is the “hello world” of SDR: a real antenna, a real signal, and a complete chain from RF to audio. Build it twice — once from a simulated FM signal, once from the air.
~60 minrx only3 checkpoints
Tap each chip when you finish that phase.
01 Study / From carrier to sound
FM broadcast lives around 88–108 MHz. It is wideband FM: roughly 200 kHz per station, 75 kHz deviation, with a 19 kHz stereo pilot and often RDS data at 57 kHz. A mono receiver ignores the stereo subcarrier and still recovers the audio.
Tuning: put the station at the centre of the captured window. A 2.4 Msps window is generous; 1 Msps is enough for one station plus margin.
WBFM Receive: internally does FM discrimination, decimation, and de-emphasis. Its output rate is quadrature_rate / audio_decimation.
Audio rate: 48 kHz is the common sound-card rate. Convert to it deliberately; do not hope the audio sink resamples for you.
Gain: start moderate. Too much RF gain on a strong station causes overload and distorted audio, not better reception.
02 Build / Simulated FM, then real FM
Lab 05Asimulation / no hardware
Set variables: samp_rate = 2.4e6, audio_rate = 48e3.
Build: Signal Source (float, 1 kHz, amplitude 0.7) → Frequency Mod (sensitivity 2*math.pi*75e3/2.4e6, about 0.19635) → Throttle (2.4e6).
Feed the throttle into WBFM Receive: quadrature rate 2.4e6, audio decimation 5. Its output is 480 kHz.
Rational Resampler (float, interpolation 1, decimation 10) → Audio Sink at 48 kHz. Add a QT GUI Time Sink on the WBFM output if you cannot hear audio.
Run. You should hear a 1 kHz tone. Change the tone to 440 Hz and predict the pitch change before running.
Expected: clean audio tone; time sink shows a periodic waveform. If it is silent, check the audio device, the 48 kHz rate, and the resampler ratio.
Lab 05Bhardware / local broadcast
Replace the simulated source with RTL-SDR Source: centre 100e6 (or a known local station), sample rate 2.4e6, RF gain 28 dB.
Keep the same WBFM → resampler → audio chain. Add a QT GUI Waterfall Sink for situational awareness.
Tune in 0.2 MHz steps. Find a strong station. Lower the gain if the audio is distorted; raise it if the noise floor dominates.
Write down the station frequency, measured visual bandwidth, gain setting, and audio quality. That is your first receiver log.
Expected: intelligible broadcast audio. If not, verify the centre frequency and sample rate before changing blocks.
Symptom
Most likely cause
Fix
Silence, clean waterfall
Wrong centre or audio device
Check tuning; test with a 1 kHz simulation; check sink device
Distorted audio at high gain
Front-end overload
Lower RF gain; add attenuation; move away from strong transmitter
Audio chipmunks / slow
Rate mismatch
Recompute WBFM output and resampler ratio
Nothing at all
No samples
Probe the radio; check USB, antenna, driver, sample rate support
03 Solo check / Close the notes
No-help question
Your WBFM chain uses a 2.4 Msps quadrature rate, audio decimation 5, then a 1/10 resampler. What is the final audio rate? Why is 48 kHz the target?
Reveal answer
2.4e6 / 5 = 480 kHz, then 480e3 / 10 = 48 kHz. 48 kHz is a standard audio sample rate supported by sound cards and audio software; it also covers the audible band with margin.
Second check: a strong signal at −200 kHz from a 100.0 MHz centre is at 99.8 MHz. Tuning is addition/subtraction, not a property of the display.
Every rate change is a filter problem. Decimate without filtering and the spectrum folds back into your channel. This module makes aliasing visible instead of theoretical.
~50 minsimulation3 checkpoints
Tap each chip when you finish that phase.
01 Study / Shape, then change rate
A filter is a frequency-dependent gain. A low-pass filter keeps low frequencies and rejects high ones. The important parameters are cutoff, transition width, stopband attenuation, and the number of taps. A narrow transition costs more taps and more CPU.
Decimation keeps one sample out of every N. It lowers the rate and the bandwidth, but only after an anti-alias low-pass filter.
Interpolation inserts samples. It must be followed by a low-pass filter to remove the images created by the rate increase.
Rational resampling changes by interp/decim; use it for rates like 50 kHz → 48 kHz (24/25) or 200 kHz → 48 kHz (6/25).
Group delay is real. Filters shift the signal in time; this matters for burst timing and packet sync.
Complex filters can be asymmetric and select positive or negative frequencies; real filters are symmetric.
Rule of thumb
Filter first, then decimate. If you can reduce the rate early, do it — but only after removing the energy that would alias into the new band. Cheap rates are a reward for correct filtering, not a shortcut around it.
CHAPTER VISUAL / FILTER + DECIMATE
Remove it before you fold it
Set a wanted tone and an interferer. The filter keeps the wanted tone; decimation by four shrinks the window. If the interferer survives the filter, it aliases into the new band.
Output rate—
Interferer fate—
before filterafter decimate ×4cutoff
This is an ideal-filter teaching model. Real filters have a transition band, passband ripple, stopband leakage, and group delay; the actual alias level depends on those details.
02 Build / Watch a tone fold
Lab 06simulation / ~25 min
Build two complex tones: Signal Source at 80 kHz (amplitude 0.6) and another at 300 kHz (amplitude 0.6), into Add → Throttle (1 Msps).
Feed the throttle to QT GUI Frequency Sink (bandwidth 1e6) so you can see both tones.
Add Low Pass Filter: complex, sample rate 1e6, cutoff 150e3, transition 50e3, gain 1. Then Keep 1 in N with N = 4. Feed a second frequency sink after it with bandwidth 250e3.
Run. The 80 kHz tone survives; the 300 kHz tone is attenuated before decimation. The new sample rate is 250 kHz.
Bypass or remove the low-pass filter and run again. The 300 kHz tone now folds to 300 − 250 = 50 kHz. That is aliasing, not a new transmitter.
Expected: filtered path shows 80 kHz only; unfiltered path shows an alias at 50 kHz. The display bandwidth must match the actual rate after decimation or the axis lies.
03 Solo check / Close the notes
No-help question
A 300 kHz tone is sampled at 1 Msps and decimated by 4 with no anti-alias filter. Where does it land? What would have prevented it?
Reveal answer
Decimation by 4 gives a new sample rate of 250 kHz. The 300 kHz tone folds to 300 − 250 = 50 kHz. A low-pass filter with a cutoff below 125 kHz, applied before the decimation, would have removed it.
The general lesson: decimation without filtering is spectral vandalism. The energy does not vanish; it reappears where you least expect it.
“Turn up the gain” is not a debugging strategy. Gain changes the noise floor, the signal, and the distortion together. Learn to tell which one you are actually hearing.
~45 minhardware preferred3 checkpoints
Tap each chip when you finish that phase.
01 Study / More gain is not more sensitivity
An SDR has several gain stages: RF/LNA, mixer/IF, and baseband. Each stage adds noise and has a maximum level. The goal is to put the wanted signal high enough above the noise without driving any stage into compression.
Noise figure is how much noise the receiver adds. Lower is better. The first stage dominates.
Sensitivity is the weakest signal you can detect at a given bandwidth and SNR. It is not a single number.
Dynamic range is the span between the noise floor and the overload point. 8-bit radios have less than 12-bit radios.
Intermodulation happens when strong signals mix in a nonlinear stage and create products at new frequencies.
AGC hides level changes. For measurements, turn it off and record the gain.
RSSI is relative and antenna-dependent. It is not a distance sensor.
Cyber lens / denial and deception
A strong nearby transmitter can desensitise a receiver or create false products. This is a physical-layer denial-of-service condition. A defender needs front-end filtering, gain control, and a baseline that distinguishes “new signal” from “my receiver is being overloaded.”
02 Build / Gain sweep
Lab 07hardware preferred / simulation fallback
Hardware: tune a known FM station at 2.4 Msps. Add a QT GUI Range variable for RF gain (0–40 dB), connect it to the RTL-SDR RF gain, and add a frequency sink plus waterfall.
Start at low gain. Raise it in steps. Record: noise floor, signal peak, audio quality, and any new spurious lines.
Find the point where the noise floor rises but the signal no longer improves, or where new products appear. That is your practical gain ceiling for this band.
Simulation fallback: use a weak tone plus a strong tone into Add, then a Multiply Const gain variable. Observe that both rise together; SNR does not improve just because the trace moves up.
Write one sentence explaining why an attenuator can improve reception of a very strong signal.
Expected: a clear gain sweet spot. At the high end, distortion and intermodulation appear; at the low end, the noise floor hides weak signals.
You increase gain by 6 dB. The noise floor and the signal both rise by 6 dB. Did the signal-to-noise ratio improve? What would you need to see for gain to help?
Reveal answer
No. If both rise equally, the ratio is unchanged. Gain only helps when the signal rises more than the noise — typically when the receiver’s own noise was dominating the input. Past that point, gain just pushes the same SNR into a more nonlinear region.
For a strong nearby signal, an attenuator can help by preventing front-end compression, even though it reduces the signal. The goal is linearity, not maximum trace height.
AM, FM, and SSB are different ways of putting a message on a carrier. The demodulator is a decision about which property of the wave carries the information.
~55 minsimulation + rx3 checkpoints
Tap each chip when you finish that phase.
01 Study / Three ways to carry a message
AM: the message changes the carrier’s amplitude. It has a carrier and two sidebands, so a 5 kHz audio signal needs about 10 kHz of RF bandwidth. Simple, but sensitive to amplitude noise and fading.
FM: the message changes the carrier’s frequency. The envelope stays constant, which makes it more resistant to amplitude noise above the threshold. Carson’s rule gives an approximate bandwidth: B ≈ 2(Δf + f_m).
SSB: one sideband, carrier suppressed. It is efficient in bandwidth and power, but requires frequency and phase accuracy. Ham operators use it heavily.
CW: a carrier switched on and off. It is not “digital” just because the key is a switch; it is still an analog carrier.
Demodulation is about recovering the message from amplitude, phase, or frequency. An envelope detector is just a magnitude operation. A quadrature demodulator differentiates phase. A PLL tracks phase or frequency. Audio filtering and de-emphasis shape the result so it sounds right.
Security reality
Analog modulation has no confidentiality or integrity. Anyone with a receiver can demodulate it. The only protections are legal, physical, or at a higher layer. “It sounds like noise” is not encryption.
CHAPTER VISUAL / AM SPECTRUM
Carrier plus two sidebands
For a single-tone AM signal, the carrier stays at the centre and two sidebands appear at ±f_m. The sidebands carry the message; their amplitude is half the modulation index.
RF bandwidth—
Sideband level—
carriersidebands
This is conventional AM with a carrier (DSB-LC) and a single modulating tone. Real audio has many tones, so the sidebands spread into a band. The RF bandwidth is approximately 2 × f_m.
02 Build / AM from first principles
Lab 08simulation / ~30 min
Build a carrier: Signal Source complex, 100 kHz, amplitude 1.0, sample rate 1e6.
Build a message: Signal Source float, 1 kHz, amplitude 0.5, sample rate 1e6 → Add Const (1.0) → Float To Complex.
Feed both into Multiply (complex). This creates an AM-like signal: the carrier is multiplied by 1 + 0.5cos(2π·1k t).
Multiply → Throttle (1e6) → AM Demod. Set channel rate 1e6, audio decimation 20, audio pass 4000, audio stop 8000. Output is 50 kHz.
Resample 24/25 to 48 kHz → Audio Sink. Add a branch from Multiply through Complex to Mag → QT GUI Time Sink to see the envelope.
Expected: a 1 kHz audio tone and a visible amplitude envelope. If the filter design complains, widen the audio transition or lower the channel rate; extremely narrow transitions at 1 Msps are expensive.
Compare
Re-run the FM simulation from Module 05. The FM signal has a constant envelope; the AM signal’s envelope moves with the message. That one observation is worth more than memorising block names.
03 Solo check / Close the notes
No-help question
An AM signal carries 5 kHz audio. What is its approximate minimum RF bandwidth? Why does FM broadcast use a much wider channel?
Reveal answer
AM with a 5 kHz message has a carrier plus two 5 kHz sidebands, so approximately 10 kHz. FM broadcast uses roughly 200 kHz because it transmits a wideband audio signal with up to 75 kHz deviation, plus a stereo pilot and RDS; Carson’s rule and the service design both drive the width.
Second check: a constant-envelope FM signal can be amplitude-limited without destroying the message. An AM signal cannot; clipping the envelope changes the message.
Digital is still analog underneath. Bits become symbols, symbols become waveforms, and the receiver has to recover carrier, timing, and frame boundaries. That is where most real decoders live or die.
~70 minsimulation3 checkpoints
Tap each chip when you finish that phase.
01 Study / Bits do not travel as bits
A digital transmitter maps bits to symbols, shapes the symbols into a waveform, and upconverts. The receiver must undo each step. The ratio sps = sample_rate / symbol_rate is the number of samples per symbol; real receivers usually want several samples per symbol for timing recovery.
OOK/ASK: amplitude on/off or multilevel. Simple remotes and sensors use it. Envelope detection works, but noise and interference look like bits.
FSK: frequency shifts. Noncoherent discriminator or coherent detector. Common in telemetry, remotes, and IoT.
BPSK/QPSK: phase shifts. Needs carrier recovery; a Costas loop is the usual tool. More spectral efficiency, more sync complexity.
QAM: amplitude and phase. Higher throughput, tighter SNR and linearity requirements.
Pulse shaping: a root-raised-cosine filter limits bandwidth and reduces intersymbol interference. The receiver uses a matched filter.
Timing recovery: finds the best sampling instant. Gardner, Mueller-Muller, and the generic Symbol Sync block are common.
Frame sync: a correlator finds a known preamble or access code. A sync word is a filter, not authentication.
Cyber lens / sync is not trust
Anyone can transmit the same preamble. A correlator that locks on a sync word proves only that the bits look like the protocol. It does not prove who sent them, whether they are fresh, or whether the payload is authorized.
CHAPTER VISUAL / CONSTELLATION
Noise turns points into clouds
Higher-order modulation fits more bits into the same plane, but the decision regions get closer. Add noise and watch the clusters overlap.
Points—
Bits / symbol—
ideal symbolsreceived symbols
A real receiver adds carrier offset, timing error, filtering, and phase noise. This chart isolates the SNR effect so the geometry is clear.
02 Build / OOK and FSK decisions
Lab 09AOOK envelope / ~25 min
Build a bit pattern with Vector Source (byte): [1,0,1,1,0,0,1,0,1,0,0,1], repeat Yes.
Char To Float → Repeat (interpolation 50) → Throttle (100 kHz). This gives 100k samples/s and 50 samples per bit.
Float To Complex → Multiply with a complex Signal Source at 10 kHz (sample rate 100 kHz, amplitude 1). The output is OOK at 10 kHz.
Complex to Mag → Low Pass Filter (sample rate 100 kHz, cutoff 5 kHz, transition 5 kHz) → Binary Slicer → Char To Float → QT GUI Time Sink.
Run. The time sink should show the original bit pattern as a square-ish waveform. The repeat block gave you perfect timing; a real signal will not.
Expected: visible on/off keying and a recovered bit stream. The filter delay shifts the edges; that is normal.
Lab 09BFSK discriminator / ~30 min
Use the same bit pattern and repeat chain, but feed Throttle (100 kHz, float) into Frequency Mod with sensitivity 2*math.pi*5000/100000 (about 0.31416).
Feed the complex output into Quadrature Demod with gain 100000/(2*math.pi*5000) (about 3.1831).
Then Low Pass Filter (cutoff 5 kHz, transition 5 kHz) → Binary Slicer → Char To Float → QT GUI Time Sink.
Run. You should recover the pattern. Change the deviation to 2 kHz and recalculate both gain terms; observe what happens if you do not.
Read the installed example digital/mpsk_stage6.grc or the packet examples. Find the pulse-shaping, timing, and carrier-recovery blocks. You are not expected to rebuild it yet; you are learning to recognise the stages.
Expected: a recovered bit stream with some transient at the start. The quadrature demodulator converts frequency deviation to amplitude; the slicer makes the decision.
Want to see the effect of noise before building sync? Open the constellation sandbox.
03 Solo check / Close the notes
No-help question
A receiver runs at 2.4 Msps with a 250 ksymbol/s signal. How many samples per symbol? Why is a constellation that looks like a ring rather than tight clusters a problem?
Reveal answer
2.4e6 / 250e3 = 9.6 samples per symbol. That is plenty of timing information, but the receiver still has to choose the right instant.
A ring usually means carrier phase/frequency is rotating or unstable, or timing/ISI is smearing the points. Tight clusters mean the receiver has recovered carrier and timing and the SNR is adequate. A ring is a sync problem before it is a “decoder” problem.
Bits are not a message. A protocol defines where a message starts, how long it is, what it means, and whether it arrived intact. This is where RF reverse engineering becomes software analysis.
~55 minmessage domain3 checkpoints
Tap each chip when you finish that phase.
01 Study / A packet is a contract
A stream has no inherent message boundaries. Framing adds them. A typical packet has a preamble, a sync word, a length or type field, an address, a payload, and a checksum or FEC. Some protocols whiten the payload to balance the spectrum; some use Manchester or PWM line coding.
CRC detects accidental errors. It is not a MAC and not a signature. An attacker can recompute it.
Whitening prevents long runs of identical bits and shapes the spectrum; it is reversible, not secret.
Bit order and endianness are protocol facts. MSB-first versus LSB-first will make a correct capture look like garbage.
Rolling codes add freshness to prevent simple replay. They do not stop a real-time relay.
FEC corrects errors, but it also gives an attacker more chances to inject a valid-looking frame.
Cyber lens / checksums are not authentication
CRC-16, CRC-32, and a fixed sync word are integrity hints for noisy links, not proof of origin. If the protocol has no key, no nonce, and no authenticated MAC, anyone who can transmit can forge a valid frame.
02 Build / A PDU with a CRC
Lab 10message passing / ~25 min
Add Message Strobe (period 1 s) → Random PDU Generator (min 16, max 32, mask 0xFF, length modulo 2).
Random PDU Generator → CRC Append (CRC size 32, default polynomial and reflection settings) → CRC Check with the same settings.
Connect CRC Check’s ok output to a Message Debug labelled PASS, and its fail output to a second Message Debug labelled FAIL.
Run. The PASS debug should print a PDU. Open the console and compare the byte length before and after the CRC append.
Change one CRC parameter in only one of the two blocks and predict what happens. Then run. This is a classic protocol integration bug.
Expected: a valid PDU passes; mismatched CRC settings produce failures. No sample rate is involved because this is the message domain, not the stream domain.
Message vs stream
Streams carry samples. Messages carry control, PDUs, and metadata asynchronously. GNU Radio can bridge them with PDU-to-tagged-stream and tagged-stream-to-PDU blocks once you are ready for packet radio.
03 Solo check / Close the notes
No-help question
A protocol uses a fixed sync word and CRC-32 but no key. Can an attacker forge a valid packet? Why does a rolling code not stop a relay attack?
Reveal answer
Yes. A CRC is a public function of the bytes; the attacker can build a payload and compute the correct CRC. The sync word only helps the receiver find the frame. Neither provides authenticity or freshness.
A rolling code prevents replaying an old captured code, but a relay forwards the live challenge and response between the legitimate key and the car. The code is fresh; the distance is the lie. Defeating relay requires distance bounding or another physical/secure element control, not just a counter.
A recording is evidence and a laboratory specimen. Learn to capture IQ without corrupting it, play it back deterministically, and analyse bursts instead of staring at a live waterfall.
~60 minrx only3 checkpoints
Tap each chip when you finish that phase.
01 Study / Record the numbers, not the picture
GNU Radio’s complex float32 IQ file is interleaved I and Q, eight bytes per complex sample. At 1 Msps that is 8 MB per second; at 2.4 Msps it is 19.2 MB per second. Record short, deliberate captures, not an hour of everything.
File Sink: raw stream, no metadata. Write down centre frequency, sample rate, gain, timestamp, and radio settings separately.
Tagged File Sink: attaches stream tags and can store burst metadata; more structure, more complexity.
Playback:File Source plus Throttle to preserve timing; without pacing, the graph runs as fast as the CPU allows.
Analysis: inspect the spectrum, envelope, burst length, symbol rate, and bit pattern. Use the time domain before the demodulator.
Tools: GRC is enough to start. inspectrum and Universal Radio Hacker are useful for visual burst work; treat their output as hypotheses, not truth.
Legal and privacy boundary
Capture only signals you are authorized to receive. Do not decode private communications, do not capture personal data, and do not publish raw captures that contain identifiers. A radio receiver is not a licence to surveil.
02 Build / Record and replay
Lab 11AFM capture / ~30 min
Build a receive chain: RTL-SDR Source (centre = local FM station, sample rate 1e6, RF gain 28) → File Sink complex. Set the file to captures/fm.cfile, unbuffered off.
Run for about 5 seconds, then stop. Check the file size: 1 Msps complex float should be about 40 MB for 5 s.
Hash it: sha256sum captures/fm.cfile. Write the hash, centre, rate, gain, and time in your notebook.
Confirm the recording demodulates exactly as it did live. That proves your sample rate bookkeeping.
Expected: audio from the file. If it plays too fast or slow, the playback rate is wrong, not the recording.
Lab 11Bburst inspection / own device only
If you have a 433.92 MHz remote you own, tune an RTL-SDR there at 2 Msps. Do not capture a neighbour’s device.
Build: source → Complex to Mag → Low Pass Filter (cutoff ~50 kHz) → QT GUI Time Sink. Press the remote and watch the burst envelope.
Record a short IQ capture while pressing once. Replay it and measure burst duration and repetition interval.
Do not transmit. Do not replay the remote. The exercise is measurement and documentation.
Expected: a short burst with a repeating frame. You are learning the shape of the signal before decoding it.
03 Solo check / Close the notes
No-help question
You record 1 million complex samples at 1 Msps. How long is the capture and how large is the raw file? Why is a SHA-256 hash useful?
Reveal answer
Duration is 1,000,000 / 1,000,000 = 1 s. Complex float32 is 8 bytes per sample, so the file is about 8 MB. The hash gives you a compact fingerprint: if the file changes, the hash changes. It supports integrity and chain-of-custody claims, but it does not prove the capture is authentic or complete on its own.
Second check: playing the file without a throttle runs as fast as the CPU can push it. The DSP may see the right samples but the wrong wall-clock timing, causing audio underruns or GUI stalls.
Interactive GRC is for learning. Production monitoring is headless, logged, and repeatable. Move from “it runs on my screen” to “it runs at 03:00 and leaves evidence.”
~50 minheadless3 checkpoints
Tap each chip when you finish that phase.
01 Study / From canvas to service
GRC generates Python. That Python can run without a GUI, write files, expose messages, and be supervised by systemd, Docker, or a job scheduler. The design goal is not “a cool waterfall”; it is “a predictable sensor.”
No GUI: remove or disable QT sinks. Use file, WAV, null, network, or message sinks.
grcc: compile a .grc to Python from the command line. Keep the generated file with the graph and version both.
Rate discipline: decimate early, avoid unnecessary copies, and never run a 20 Msps GUI unless you have measured the host.
Logging: timestamp, centre, sample rate, gain, power, event, hash, and software version. A capture without metadata is an orphan.
Integration: PDUs, ZMQ, TCP/UDP, or a small Python wrapper can feed a SIEM, dashboard, or alerting pipeline.
Production rule
A monitor should fail loudly and safely. If the SDR disconnects, log the event and exit non-zero; do not silently keep a dead process alive. If the disk fills, stop the capture before the filesystem does it for you.
02 Build / Headless FM recorder
Lab 12headless / ~30 min
Copy your working FM receiver. Remove every QT GUI block. Set the Options block to a no-GUI generation mode.
Replace Audio Sink with Wav File Sink: 1 channel, 48 kHz, WAV, 16-bit. Or use a raw File Sink float if you prefer.
Generate the Python. Then compile from the shell: grcc fm_rx.grc -o build. Confirm the generated file appears.
Run it under a time limit: timeout 10s python3 build/fm_rx.py. Inspect the WAV with ffprobe, soxi, or an audio editor.
Record the command, exit code, file size, and a hash in your notebook. That is a reproducible run.
Expected: a WAV file that plays back the station; no display required; a non-zero exit only if you intentionally time it out.
Watchdog design
A useful monitor needs a baseline, a threshold, and an evidence path. “I saw something” is not an alert. Log the noise floor, the event power, the timestamp, the centre frequency, and a short IQ clip. Then a human can review it.
03 Solo check / Close the notes
No-help question
Why is a flowgraph full of QT GUI sinks a poor production monitor? Where should you decimate to save CPU?
Reveal answer
GUI sinks need a display, consume CPU for rendering, can block or drop frames, and produce no durable evidence. They are excellent for learning and terrible for unattended monitoring.
Decimate as early as possible after channel selection and anti-alias filtering. Doing DSP at 20 Msps when the information is in a 200 kHz channel is a self-inflicted denial of service.
Past the stock blocks: custom Python, out-of-tree modules, tags, messages, hierarchical reuse, and performance. Use these when the graph stops expressing your idea.
~65 minsimulation3 checkpoints
Tap each chip when you finish that phase.
01 Study / Extend the graph without fighting it
Embedded Python Block: fastest way to prototype a per-buffer operation. Runs inside the flowgraph, easy to edit, slower than C++ and subject to the GIL.
Out-of-tree (OOT) module: a packaged C++/Python block built with gr-modtool. The right choice for reusable, high-rate, or distributable DSP.
Stream tags: metadata attached to a sample position, such as burst start, frequency, or time. Tags travel with the stream and can be read or written by blocks.
Messages/PDUs: asynchronous control and packet objects. They are not paced by the sample stream.
Hierarchical blocks: package a subgraph with parameters, then reuse it like a stock block.
Performance: vectorise, decimate early, avoid per-sample Python, profile before optimising, and benchmark with a null sink.
Start with a Python block, graduate to OOT
If you are still discovering the algorithm, use the Python block. If the algorithm is stable and the rate is high, port it. Do not write a C++ module to avoid learning the math.
02 Build / A custom gate and a tag probe
Lab 13AEmbedded Python Block / ~30 min
Add an Embedded Python Block with one complex input and one complex output. Replace the template with this minimum viable block:
import numpy as np
from gnuradio import gr
class blk(gr.sync_block):
def __init__(self):
gr.sync_block.__init__(
self,
name='burst gate',
in_sig=[np.complex64],
out_sig=[np.complex64],
)
def work(self, input_items, output_items):
x = input_items[0]
y = output_items[0]
y[:] = np.where(np.abs(x) > 0.1, x, 0)
return len(y)
Put it between a noisy tone and a frequency sink. Lower the threshold to 0.01 and observe more noise gets through.
Change the threshold to 4.0 and observe the output go dark. This is a detector with no hysteresis and no timing logic; that is the point.
Open the generated Python and find the block class. Confirm it is instantiated like any other block.
Expected: a gated spectrum. If the block is red, check the NumPy and GNU Radio imports and the exact class name blk.
Lab 13BTags / ~15 min
Add Tags Strobe (float output, key strobe, value TEST, every 1000 samples) → Throttle (100 kHz) → Tag Debug.
Run. The Tag Debug console should print the tag key, value, and sample offset every 1000 samples.
Change the interval to 500 and confirm the offsets change. This is how a decoder can mark a burst boundary without changing the sample stream.
Expected: tag messages in the console. If nothing prints, check the input type and the key filter.
OOT path
When you are ready: gr_modtool newmod myblocks, gr_modtool add -t sync my_block, implement work(), build with CMake, install, and ldconfig. Keep the module in version control and test it with recorded IQ, not live RF.
03 Solo check / Close the notes
No-help question
Why is a Python block a bad choice at 20 Msps, and what are two ways to fix the design without changing the algorithm?
Reveal answer
Python’s per-buffer overhead and the GIL make per-sample Python expensive at high rates. Fixes: decimate/filter before the Python block so it runs at the information rate, or move the hot path into a vectorised NumPy operation or a C++ OOT block. A third option is to run the custom logic only on detections, not every sample.
Measure first. A block that looks slow in Python may be fine at 100 kHz and hopeless at 20 MHz; the rate is part of the design.
Radio is an untrusted network with no cable. Learn the attack classes at a systems level, then build the defensive habits: baseline, detect, capture, verify, and document.
~50 mindefensive / rx3 checkpoints
Tap each chip when you finish that phase.
01 Study / The wireless threat model
Every RF system has a physical layer, a link layer, a protocol layer, and an application layer. Attacks target the weakest trust assumption at any of them. Defenders need the same map.
Class
What it breaks
Defensive question
Jamming / interference
Availability
Can the system detect loss of link and fail safe?
Spoofing
Authenticity
Is the sender authenticated, or only the format?
Replay
Freshness
Is there a nonce, counter, or challenge-response?
Relay
Distance / presence
Is there distance bounding or physical presence?
Eavesdropping
Confidentiality
Is the payload encrypted end-to-end?
Fuzzing / malformed frames
Parser robustness
Are decoders isolated and bounded?
Common examples: fixed-code remotes, tyre-pressure sensors, unauthenticated ADS-B, GPS spoofing, BLE/Zigbee weaknesses, keyless-entry relays, and IMSI catchers. The details differ; the pattern is the same. A protocol that trusts the air is trusting anyone with a transmitter.
Do not become the attack
Jamming, spoofing, and interception can endanger safety and are illegal in most jurisdictions. This module is for threat modelling, detection, and authorized testing only. There are no transmit recipes here because you do not need them to defend a system.
CHAPTER VISUAL / BURST DETECTOR
Every threshold is a trade-off
A detector compares the envelope to a baseline. Lower the threshold and you catch weaker bursts, but noise starts triggering false alarms. Raise it and you miss events.
Bursts detected—
False alarms—
envelopethresholddetections
This is a synthetic envelope, not a real capture. In the field, use hysteresis, minimum duration, and a baseline distribution; one threshold on one sample is not a detector.
02 Build / A defensive burst baseline
Lab 14rx / own signals only
Simulation: Vector Source with a burst pattern such as [0,0,0,1,0,1,1,0,0,0], repeat Yes → Char To Float → Repeat (100) → Throttle (100 kHz) → Float To Complex → Multiply with a 10 kHz complex carrier.
Complex to Mag → Low Pass Filter (cutoff 20 kHz, transition 20 kHz) → QT GUI Time Sink. Add a noise source and find the threshold where the burst is still visible.
Hardware: tune to a legal band or your own 433.92 MHz device. Build source → Complex to Mag → Low Pass Filter → time sink. Record a baseline for 60 seconds with no intentional activity.
Set a threshold several dB above the baseline noise. Log the timestamp, peak power, duration, centre, and a short IQ clip for every event. Do not attempt to decode third-party traffic.
Write a one-page note: baseline, threshold, observed event, false-positive risk, and what you would need to prove the event is meaningful.
Expected: a visible burst and a documented baseline. A detector without a baseline is just a random number generator with a GUI.
03 Solo check / Close the notes
No-help question
A system uses CRC-16 but no key. Can an attacker forge a valid packet? Why does a rolling code not stop a relay attack? What should a defender monitor?
Reveal answer
Yes: CRC is a public error-detection function, so the attacker can recompute it. A rolling code prevents replaying an old capture, but a relay forwards the live exchange; freshness is preserved while distance is faked. Defenders should monitor link quality, power/level anomalies, unexpected frame types, replay-window violations, and physical-layer events, and should authenticate the sender rather than the format.
The broader point: “the packet parsed” is not “the packet is trustworthy.” Parsing is a parser success; trust requires authentication, freshness, and authorization.
Build a legal, receive-only RF sensor that establishes a baseline, detects an event, captures evidence, decodes one known signal end-to-end, and explains its own limitations.
4 sessionsrx only3 checkpoints
Tap each chip when you finish that phase.
01 Study / What “done” means
You are not done when the flowgraph runs. You are done when you can explain every block, measure the signal, predict a failure, and produce evidence another person can review.
Deliverable 01
Working receiver
A tuned, documented chain from antenna to demodulated output for one legal signal: FM audio, NOAA APT, or another authorized broadcast.
Deliverable 02
Baseline + detector
Noise floor measurement, threshold selection, event log, false-positive analysis, and a short IQ capture per event.
Deliverable 03
Evidence pack
Flowgraph, generated Python, metadata, hashes, timestamps, and a report that separates observation from inference.
Deliverable 04
Security review
Threat model, legal basis, privacy handling, one failure mode, and one way an attacker could evade the detector.
02 Build / Four sessions
Capstone buildreceive only / legal band
Session 1 — receiver. Pick a legal signal. Build the full chain in GRC. Record the sample rate at every stage and verify the final rate. Produce one clean audio or decoded output.
Session 2 — baseline. Run a headless monitor for 10 minutes. Log centre frequency, gain, noise floor, peak level, and timestamps. Compute a threshold from the data, not from a feeling.
Session 3 — event capture. Detect a burst or a new carrier. Save a short IQ clip, a screenshot or numeric summary, and a metadata record. Hash the capture.
Session 4 — report. Decode or demodulate one known signal. Explain what you proved, what you inferred, and what you could not prove. Include the legal basis and a privacy note.
Constraints: no transmit, no private communications, no third-party personal data. If you cannot justify the capture legally, choose another signal.
Grading rubric
Area
Pass condition
Chain correctness
Every block’s input/output rate and type is explained; no accidental rate mismatch.
Measurement
Noise floor, bandwidth, FFT resolution, and threshold are calculated and recorded.
Evidence
Capture is hashed, timestamped, and accompanied by centre/rate/gain metadata.
Security analysis
Threat model, legal basis, privacy handling, false positives, and evasion are discussed.
Clarity
A competent peer can reproduce the result from your notes without asking you.
03 Solo check / The final no-help questions
No notes. No flowgraph. Answer out loud.
Walk through your receiver from antenna to output and name the rate at every stage.
What is your noise floor in dBm, and how did you calculate it?
What is your FFT resolution, and why did you choose it?
Where could aliasing occur, and what prevents it?
What does your detector actually measure, and what can it not see?
How would an attacker evade it without jamming?
Why is your capture trustworthy, and what does the hash not prove?
What is the legal basis for every signal you captured?
What breaks first at 10× the sample rate?
What is one limitation of the protocol you decoded?
Reveal the standard
You are looking for specific numbers, named blocks, explicit assumptions, and a clean separation between “I observed” and “I concluded.” Vague answers like “it worked” or “the CRC makes it secure” mean the module is not finished.
Six live tools for the numbers that decide whether a receiver works. Change an input and watch the readouts and charts move. These are teaching models, not calibrated measurements.
6 toolscanvas chartsinstant feedbackruns locally
01 / SPECTRUM
Sample rate, FFT and aliasing
See how the capture window, FFT resolution, and a tone’s offset interact. Push the tone outside the window and watch it fold back.
Complex bandwidth—
FFT bin width—
Actual RF—
Tone status—
tonenoise flooraliased tone
Try 2.4 Msps and +1500 kHz. The window is ±1200 kHz, so the tone folds to −900 kHz. The readout shows the true RF frequency; the chart shows where the sampled data puts it.
02 / UNITS
dB, dBm and power
Convert between log units, linear power, and RMS voltage. Keep the reference explicit: dB is a ratio; dBm is power relative to 1 mW.
Voltage conversion assumes a resistive load: Vrms = sqrt(P × R). At 0 dBm into 50 Ω that is about 0.224 V RMS.
03 / SENSITIVITY
Noise floor and receiver sensitivity
Thermal noise rises with bandwidth. Noise figure adds receiver noise. Required SNR and implementation loss set the usable sensitivity.
Thermal density—
Noise in bandwidth—
Receiver noise floor—
Sensitivity—
receiver noise floorsensitivityyour bandwidth
This is a first-order model: −174 dBm/Hz + NF + 10 log10(B). It ignores antenna noise, interference, and ADC limitations.
04 / LINK
Free-space link budget
Estimate received power, SNR, margin, and theoretical range. The model assumes free space, perfect polarization, and no terrain.
Path loss—
Received power—
Noise floor—
SNR—
Link margin—
Max free-space range—
received powernoise floorrequired sensitivity
Real range is usually much worse: obstructions, Fresnel loss, cable loss, antenna pattern, and interference all take a cut. A positive margin is a hypothesis, not a guarantee.
05 / DIGITAL
Symbols, bits and constellations
Move the symbol rate and modulation order, then add noise. The constellation shows why timing, phase, and SNR are not optional details.
Samples / symbol—
Gross bit rate—
Approx. occupied BW—
Constellation points—
ideal pointsnoisy received symbols
Occupied bandwidth is approximated as Rs × (1 + roll-off). Real transmitters also add filtering, phase noise, and nonlinearity; the ideal points are normalized to unit average power.
06 / STORAGE
IQ capture size and throughput
Plan a capture before you fill the disk. The sample rate sets the write rate; the format and channel count set the bytes per sample.
Samples—
Write rate—
Total capture—
Time to 1 GB—
At 2.4 Msps, complex float32 writes about 19.2 MB/s. A 5-second capture is about 96 MB. Record short, label the centre/rate/gain, and hash the file.
FIELD REFERENCE / KEEP THIS OPEN
The numbers, blocks, and failure modes
A compact reference for the lab. Use the primary sources in the field library when you need depth. This page is intentionally denser than the lessons.
Formula sheet
Quantity
Formula
Notes
Baseband frequency
f_bb = f_rf − f_lo
Negative values mean below the LO.
Complex bandwidth
BW = fs
Unique span is roughly −fs/2 to +fs/2.
FFT bin width
RBW = fs / N_fft
Also called resolution bandwidth.
Samples per symbol
sps = fs / Rs
Needs to be comfortably above 2 for timing recovery.
Capture duration
T = N / fs
N is number of complex samples.
Complex float32 size
8 bytes/sample
Interleaved I and Q, 4 bytes each.
Power ratio
dB = 10 log10(P1/P2)
3 dB ≈ 2× power; 10 dB = 10×.
Amplitude ratio
dB = 20 log10(A1/A2)
6 dB ≈ 2× voltage.
Absolute power
dBm = 10 log10(P / 1 mW)
0 dBm = 1 mW.
Ideal ADC SNR
6.02N + 1.76 dB
N bits; real receivers are worse.
Thermal noise
−174 dBm/Hz + NF + 10 log10(B)
At room temperature, approximate.
Carson’s rule
B ≈ 2(Δf + f_m)
Approximate FM bandwidth.
AM bandwidth
B ≈ 2 f_m
Carrier plus two sidebands.
GRC interface map
Area
What it does
Habit
Canvas + block search
Place blocks and wire typed ports.
Search by function, not by remembered label. Read the port type before connecting.
Options block
Flowgraph ID, title, author, generation mode.
Set a no-GUI mode for production copies; keep the interactive original.
Variables
Named values and expressions used across blocks.
Define samp_rate, center_freq, and rates once. Do not hard-code the same number in five places.
Block properties
Parameters, callbacks, and documentation for one block.
Read the block’s docs tab. If a value is bold, it can often change at runtime.
Ports
Typed stream or message connections.
Complex, float, byte, and message are not interchangeable. A red port is a type error.
Generate / Run
Produces Python; runs the flowgraph.
Generate after a change, then inspect the Python when behaviour is surprising.
Console / Errors
Tracebacks, warnings, block output.
Read the first error, not the last. Reduce the graph to the smallest failing path.
Variables / runtime
Live values and GUI controls.
A value can look right in the canvas and still be wrong at runtime. Check both.
Examples
Installed reference flowgraphs.
Open, run, and label the stages before copying anything. Examples are study material, not cargo cult.
GRC block map
Job
Blocks to reach for
Watch out
Simulate
Signal Source, Noise Source, Random Source, Vector Source
Use the same settings on both sides; test with a known vector.
Hardware notes
Device
Typical capability
Best use / caveat
RTL-SDR
RX, 8-bit, ~24–1766 MHz, ~2.4 Msps stable
First receiver, spectrum survey, FM/NOAA/ADS-B. Low dynamic range; overloads easily.
HackRF One
Half-duplex, 8-bit, ~1–6000 MHz, up to 20 Msps
TX/RX learning with a dummy load and shield. Half-duplex; harmonics and filtering matter.
PlutoSDR
12-bit, ~325 MHz–3.8 GHz, ~61 Msps
Better dynamic range, embedded Linux, good for DSP. Check firmware and clocking.
LimeSDR / USRP
12–16-bit, wider bandwidth, 2×2 capable
Precision, MIMO, higher cost. Overkill for a first receiver.
Airspy / Nooelec
RX, 12-bit or improved front end
Better receive performance than a basic RTL-SDR; still RX only.
Transmit checklist
Licence or written authorization · dummy load or shielded enclosure · attenuator rated for the power · appropriate filter · known TX/RX sequencing · power and frequency limits written down · a second person to kill power. If any item is missing, do not transmit.
Glossary
ADC
Analog-to-digital converter. Samples and quantises the analog signal.
AGC
Automatic gain control. Convenient for listening, bad for measurements.
Aliasing
Energy outside the sampling band folding into it. Prevent with filtering before rate reduction.
Baseband
Signal after mixing, centred near zero hertz.
Complex sample
An I/Q pair represented as I + jQ.
Constellation
I/Q plane plot of symbol points.
CRC
Cyclic redundancy check. Error detection, not authentication.
Decimation
Reducing sample rate by keeping one of every N samples, after filtering.
dBFS
Power relative to ADC full scale. Not dBm.
dBm
Power relative to 1 mW.
FFT
Fast Fourier transform. Converts time samples to frequency bins.
FLL
Frequency-locked loop. Tracks carrier frequency offset.
I/Q
In-phase and quadrature components of a complex baseband signal.
Interpolation
Increasing sample rate, followed by an anti-image filter.
LNA
Low-noise amplifier. First gain stage; sets noise figure but can overload.
LO
Local oscillator. Sets the tuning centre for the mixer.
Noise figure
How much noise the receiver adds, in dB.
Nyquist
Sampling theorem: real signals need fs > 2B; complex signals have a one-sample-rate span.
PDU
Protocol data unit. A message object used for packets and control.
RBW
Resolution bandwidth; FFT bin width in this context.
RSSI
Received signal strength indicator. Relative and antenna-dependent.
Sample rate
Samples per second; sets the complex bandwidth.
SNR
Signal-to-noise ratio. The number that usually decides whether decoding works.
Symbol rate
Symbols per second; related to sample rate by samples per symbol.
Tag
Metadata attached to a stream at a sample offset.
Throttle
A pacing block for sources that have no real-time clock.
Next frontiers
This manual is the spine, not the ceiling. After the capstone, choose one lane and go deep:
RF engineering
Antennas, propagation, link budget
Gain, patterns, polarization, Fresnel zones, feedline loss, noise temperature, and the link equation. This is where “my signal is weak” becomes a calculation.
DSP
Filter design and estimation
Taps, windows, group delay, polyphase filters, resampling, PLLs, equalizers, and detection theory. Build the intuition behind the blocks.
Digital receivers
OFDM, FEC, equalization
Pilots, cyclic prefixes, soft decisions, Viterbi, LDPC, channel estimation, and MIMO. This is the road to Wi-Fi, LTE, and DVB.
Security
Protocol reversing and RF defense
Field formats, checksums, rolling codes, authenticated framing, replay windows, RF fingerprinting, and detection engineering.
Tooling
OOT blocks and reproducible labs
CMake, gr-modtool, CI, IQ fixtures, versioned Docker images, and signed evidence pipelines.
Hardware
Clocking, shielding, and measurement
TCXO/OCXO, phase noise, attenuators, filters, EMC, dummy loads, and calibrated power measurement.
Coverage map and accuracy limits
Short answer: no, this is not all of RF
No single manual is. This one is a practical SDR + GNU Radio spine for a cyber security operator. It covers the receive chain, IQ, sampling, filters, gain, analog and digital demodulation, framing, capture, automation, and RF security. It does not replace an RF engineer, a radio licence, or a dedicated antenna/propagation text.
Area
Depth here
Where / caveat
RF chain, IQ, sampling, FFT, dB
Covered
Modules 1–3 and toolbench
GNU Radio flowgraphs, filters, rates
Covered
Modules 4–6, 13
Noise, gain, dynamic range
Covered at system level
Module 7; front-end IP3 and phase noise are only mentioned
Analog and digital demod
Covered at introductory level
Modules 8–9; OFDM, FEC, equalisation and MIMO are next steps
Framing, CRC, packets
Covered conceptually
Module 10; protocol-specific decoders vary widely
Capture, replay, evidence
Covered
Module 11
Automation, headless, monitoring
Covered
Module 12
RF security and threat modelling
Covered defensively
Module 14; no attack recipes
Antennas, feedlines, VSWR, Smith chart
Touched only
Needs a dedicated RF-engineering course
Mixers, image reject, phase noise, IP3, spurs
Mentioned only
Module 1/7; needs front-end design and measurement practice
OFDM, FEC, equalisation, MIMO, multiple access
Not covered
Next frontiers; required for Wi-Fi/LTE/5G depth
Cellular, satellite, radar, GPS specifics
Not covered
Protocol/standards study; legal and safety critical
RF law and EMC compliance
Principles only
Jurisdiction-specific; get local advice
RF exposure, electrical safety, lightning
Not covered
Follow local safety rules and hardware manuals; this is not an installation guide
Accuracy posture
GNU Radio block names and core simulated chains were checked against GNU Radio 3.10.9.2 in this environment. Labels and parameters can differ in other versions.
The noise-floor tool uses the standard first-order −174 dBm/Hz + NF + 10 log10(B) model; it ignores antenna noise, interference, ADC behaviour, and front-end nonlinearity.
The link budget is free-space only. It ignores terrain, Fresnel obstruction, multipath, polarization mismatch, cable loss, and antenna patterns.
The constellations are ideal AWGN models. They do not include phase noise, carrier offset, timing error, ISI, or nonlinear distortion.
Hardware ranges are typical, not guarantees. Always confirm your specific radio, antenna, and local regulations.
Field library
Primary sources and useful tools. Open these when you need to go deeper than the module.
Before you capture: confirm the band is legal to receive in your jurisdiction; confirm you are not intercepting private communications; confirm storage and sharing comply with privacy law. Before you transmit: hold a licence or written authorization; use a dummy load/shield; verify power, frequency, bandwidth, and filters; document the test. When in doubt, do not transmit.