2026-09-28

A 2.74 GHz receiver behind a 16 MHz wire

LILYGOT-Display P4ESP32-P4LR2021SDRSoftware Defined RadioRTL-SDRP25ADS-BPOCSAGUSB High-SpeedSPIIMBEFlipper ZeroMeshCore
A 2.74 GHz receiver behind a 16 MHz wire

The receiver in this handheld tunes from 100 MHz to 2.74 GHz. It decodes digital voice at 9,600 bits per second, aircraft transponders at 1 megabit per second, and pager traffic at 2,400 bits per second, with no computer attached. What separates the services it can hear from the ones it cannot is not the analogue front end. It is a 16 MHz serial bus.

LakeShark is an open-source project, GPL-3.0, that turns a LILYGO T-Display P4 into a handheld radio scanner. The board carries an ESP32-P4, which the module vendor rates at 360 MHz on two RISC-V cores, with 768 KB of internal SRAM and 32 MB of PSRAM, a 4.1-inch AMOLED at 568 by 1232 pixels, GPS, an inertial sensor, and one radio chip. The radio chip is the interesting part. It is a Semtech LR2021, a LoRa transceiver built to move a few hundred bits a second of sensor data across kilometres, being asked to behave like a wideband receiver.

The project's first commit is dated June 2026 and its release tags reach 2.17 in October. That pace is why its documentation reads more like a lab notebook than a manual, and it is where every figure below comes from: measured sample rates, FIFO fill levels, gain settings that work and gain settings that clip the converter. None of it was measured on a board here.

The finding worth the space is that this receiver reaches its own radio through three completely different ports, and those ports differ by a factor of 4,000 in what they can carry. The sample stream that a software decoder needs is the narrow one, and it stops at 250,000 complex samples a second. Everything faster than that has to be demodulated inside the radio chip, in hardware the vendor did not write for the purpose.

Three doors into one receiver

Path What crosses the wire Rate Ceiling set by
Onboard demodulators Decoded bits, not samples 2,400 bit/s for pagers, 9,600 bit/s for P25 voice the protocol
Raw I/Q 16-bit I and Q, 4 bytes per sample 250 kS/s measured, 500 kS/s theoretical the 16 MHz SPI bus
USB host 8-bit I/Q from an external dongle 2.4 MS/s typical, 4.8 MB/s USB 2.0 High-Speed

Three paths exist because each one solves a different problem. The chip's own demodulators are the efficient route for anything it was designed to receive, and the processor sees a bit stream at a few kilobits per second. The raw I/Q path is a bypass: an undocumented command hands the baseband over before any demodulation happens, and the processor sees samples instead. The USB host is the brute-force route, where a dongle that costs less than the board does all the radio work and the board only has to keep up with the bytes.

The rest of this is about those ceilings, because they are what a designer actually has to work with.

The path the vendor never documented

An LR2021 normally demodulates internally. LoRa, FSK, FLRC, and the framing around them, are done inside the chip, whose documented coverage is 150 to 960 MHz on one input and 1.5 to 2.5 GHz on the other. The module on this board is sold for 830 to 945 MHz or for 400 to 520 MHz, depending on the variant, which is a front-end question rather than a chip question.

What the project found is that a command in the radio's ROM, undocumented and present in ROM version 1.24, will route the raw baseband out instead: 16-bit I and Q with amplitude and phase intact. Measured on one board, that path receives from 100 MHz to 2,740 MHz, with the image calibration failing below 100 MHz and the synthesiser refusing to lock above about 2,750 MHz. Two separate tests established it. The first swept the board's own 40 MHz clock harmonics, which appear at every multiple of 40 MHz without any transmitter, and confirmed that a tone moved by exactly the retune step. The second put a HackRF in a shielded box and confirmed real outside signals at 100, 103, 106, 1,300, 2,600 and 2,740 MHz. Below 98 MHz the same tone that stands 14 to 16 dB above the noise at 100 MHz is simply gone.

Sample rate is not a register. It follows the LoRa bandwidth setting at four times the configured bandwidth, a relation the project measured to within about half a percent at four settings, and which also means the rate knob is labelled in hertz of spectrum rather than in samples.

Bandwidth I/Q rate MB/s Bus share Result
31.25 kHz 125 kS/s 0.50 25% clean, FIFO 36 to 156 B
62.5 kHz 250 kS/s 1.00 50% clean, FIFO 160 to 668 B
125 kHz 500 kS/s 2.00 100% overflow at 1.2 to 2.3 ms
250 kHz 1 MS/s 4.00 200% overflow at 0.7 ms

What arrives is not a calibrated signal. The stream is zero-IF: each 32-bit word carries I in the low halfword and Q in the high halfword, with a positive radio offset producing a positive frequency in I plus jQ, which fixes the sign convention for everything downstream. Amplitude is uncalibrated and relative, image rejection is about 41 dB at 433.9 MHz, and gain comes in coarse fixed steps of 12 or 13 dB with a boost setting that adds 0.5 to 1.4 dB. The chip's own automatic gain control tracks a fixed step on weak signals and sits about 20 dB behind one on strong ones, which is why the working configuration on this board is a fixed 26 dB rather than anything automatic.

The capture interface has two shapes, and the difference matters for anything real-time. A 256-pair window in the radio's SRAM can be read out in one go, which is enough for a 1024-byte snapshot and exact reproducibility, and the firmware hides that window when the live path needs the memory, which is why the project notes that the memory is restored. The FIFO is the streaming path: bounded bursts of 1 to 250 milliseconds, or a checked session that runs until it is stopped, and only the second is suitable for a decoder that has to keep up.

Half the wire is overhead

Four bytes per sample, a bus that moves two megabytes a second, and a measured ceiling of exactly half that. The arithmetic is not subtle, and it is worth doing because the conclusion generalises to every microcontroller that reads a fast converter through a serial port.

At 250 kS/s the stream needs one megabyte a second, which is 50 percent of a 16 MHz SPI bus. At 500 kS/s it needs two, which is the entire bus with nothing left for commands, address phases, or the gaps between transfers. The measured behaviour matches: the 1,024-byte FIFO overflows within 1.2 to 2.3 milliseconds at 500 kS/s, and within 0.7 milliseconds at 1 MS/s.

The 50 percent figure is not a coincidence either. The FIFO is drained in transfers of up to 64 bytes, which take 32 microseconds of wire time each. One megabyte a second is 15,625 such transfers, one every 64 microseconds. The other 32 microseconds go to the command phase, polling the chip's busy line, and the interrupt latency between one CPU-driven transfer and the next. Half the wire carries data and half carries protocol.

That has a design consequence beyond this board. The ceiling is set by bytes, not by samples, so anything that halves the bytes per sample would double the rate. Eight-bit samples, or a decimation stage inside the radio ahead of the export, would move the ceiling to 500 kS/s of 8-bit I/Q or to 250 kS/s of usable bandwidth at half the rate. Neither exists in this ROM, and the project says so plainly: the limit belongs to the link, and a host with a tighter read loop could move it.

Three interfaces, four thousand to one

The 1,024-byte FIFO is worth a number of its own. At 250 kS/s it holds 1.024 milliseconds of samples. Any code path that blocks the drain loop for longer than that loses data, and the loss is not recoverable from the protocol because there is no sequence number in the sample stream. This is the reason the firmware configures parts of the audio pipeline to stay out of flash, and the reason a long capture is reported as clean or not clean rather than as a percentage.

What 250,000 samples a second can carry

A complex stream of 250 kS/s has 250 kHz of usable span. That is the whole budget, and it is instructive to spend it service by service, because the answers divide cleanly into two groups.

Service Physical layer Minimum complex rate Against the ceiling
POCSAG, 2,400 bit/s 2-level FSK, 4.5 kHz deviation 24 kS/s 10%
Narrowband FM voice 5 kHz deviation 25 kS/s 10%
P25 Phase 1 4-level FSK, 4,800 symbols/s 48 kS/s 19%
Broadcast FM 75 kHz deviation, 200 kHz channel 200 kS/s 80%
Bluetooth LE, 1M 1 Msymbol/s GFSK 2 MS/s 8 times over
ADS-B, 1090 MHz 1 Mbit/s pulse position 2 MS/s 8 times over

P25 Phase 1 is the comfortable case, and it is worth seeing how much room is left. The channel carries 9,600 bits a second, of which 1,728 bits every 180 milliseconds form the link data unit, and 1,296 of those bits are the vocoder output: a 7,200 bit/s stream of 144-bit frames, one every 20 milliseconds. At 250 kS/s the demodulator sees 52 samples per symbol and the occupied 12.5 kHz channel sits in 5 percent of the available span, which leaves the rest for the filter skirt and for frequency error. At the lower 125 kS/s rate it is still 26 samples per symbol.

Broadcast FM is the marginal case. A 200 kHz channel fills 80 percent of the span, so the filter that separates one station from the next has almost no transition region to work with, and any offset in the synthesiser eats into what is left. The project's own list puts broadcast FM below the digital voice decoders in robustness, which is what this arithmetic predicts.

ADS-B and Bluetooth LE are in a different category. Both need roughly two samples per bit to recover timing from a pulse-position or GFSK waveform at 1 Mbit/s, which is 2 MS/s, eight times the ceiling. No amount of cleverness in the decoder fixes that, because the samples never arrive.

Required sample rate per service

The half the chip does itself

Both services in the last two rows of that table still work on this board, and the reason is that neither of them goes through the sample path.

The LR2021 has several demodulators that are not LoRa. For pagers there is a native FSK stream path with clock recovery: 512, 1,200 and 2,400 baud probed in turn, 4,500 Hz deviation, a snapped 11.7 kHz filter, a 16-bit preamble detector, and a 32-bit frame sync that can be normal or complemented because the polarity of a pager transmitter is not something the receiver can assume. The output is BCH-qualified batches, counted and reported as clean, corrected or lost words. For aircraft there is a Mode S receive path inside the chip that produces messages at 1090 MHz. For Bluetooth the chip's own BLE engine picks up advertising on channels 37, 38 and 39 through the 2.4 GHz input, without the processor ever seeing a sample.

This is the difference between 9.6 kbit/s and 8 Mbit/s in the first figure, and it is not an optimisation. It is the only way those services can exist on this hardware. The processor reads decoded bits at a rate 830 times lower than it would read the samples that produced them.

There is a second, quieter consequence. Because the split is arithmetic rather than a matter of taste, the split tells you what the board can and cannot be extended to do. A new narrowband mode can be written in software against the existing I/Q stream. A new wideband mode cannot, unless the vendor's ROM happens to contain a demodulator for it, and undocumented ROM features are not a foundation anyone should build a product on.

The dongle, and the port that made the design possible

The third path is the conventional one: a USB dongle does the radio, the board does the bytes. An RTL-SDR in its common form streams 8-bit I and Q, two bytes per sample, and at 2.4 MS/s that is 4.8 MB/s. The board's host port is USB 2.0 High-Speed with an integrated transceiver, 480 Mbit/s, so the stream uses about 8 percent of it. The project measured roughly 510 kB/s of stream while listening to a weather broadcast at 162.55 MHz, which is 255 kS/s at two bytes per sample.

The comparison that matters is with Full-Speed, 12 Mbit/s, which is what the earlier ESP32 parts offer. That is 1.5 MB/s, and 4.8 MB/s is 3.2 times more than it can carry. An analysis of a USB scope front end reached the same conclusion from the other side: 9.93 MB/s of samples was 8.3 times over the Full-Speed limit, and the port, not the converter, decided what that product could do. High-Speed USB is not a convenience feature on a radio board. It is the feature that makes the board a radio.

The power side is less obvious and more painful. Reading the board's schematic, the USB-A socket's VBUS comes from the 5 V rail through a TPS2051C distribution switch, and that 5 V rail comes from the USB-C input. The internal battery feeds a separate input, and no boost converter connects it to the 5 V rail. So a dongle plugged into a board running on its own cell has no power at all, which answers the question of battery life with a dongle attached: zero, until the board itself is powered over USB-C. A power bank on the USB-C port runs both.

Nothing in the processor controls that switch either. No GPIO is assigned to it, so the firmware cannot cut and restore power to a dongle that has wedged. Recovery is a root-port reset instead: tear the device down in the order that is safe while it is still on the bus, power the port off so the host stack sees a disconnect, power it back on, and let the dongle enumerate from address zero. The project budgets two automatic resets, refilled only after ten seconds of samples actually moving, because a stuck dongle reports itself as healthy and a naive watchdog would keep resetting forever.

The CPU is not the bottleneck

The instinct on a 360 MHz part with no vector unit is that demodulation will be the constraint. It is not, and the reason is a small detail in the datasheet: the P4's custom instruction set includes 128-bit vector operations with a complex multiply, in eight additional 128-bit registers.

A 128-bit register holds eight 16-bit values, which is four complex samples. If the packed complex multiply retires four products per instruction, the unit does 1.44 billion complex multiply-accumulates a second at 360 MHz. Even at half that, the receive chain does not come close.

Stage Work Share of one core at 360 MHz
Mix to baseband 0.5 M complex MAC/s 0.03%
48-tap decimating filter at 250 kS/s 12.0 M complex MAC/s 0.83%
26-tap matched filter at 25 kS/s 0.65 M complex MAC/s 0.05%
IMBE vocoder, 50 frames a second about 10 M cycles/s 2.8%
Whole receive chain about 13 M complex MAC/s plus the vocoder under 4%

The vocoder dominates, and it is still under 3 percent. The estimates assume four complex products per vector instruction and 200,000 cycles for one vocoder frame, both of which are round numbers rather than measurements, but the conclusion survives a factor of three either way.

Memory tells a similar story with one surprise. The PSRAM is 16 bits wide, double data rate, and runs at 200 MHz in this firmware against a 250 MHz maximum, which is 800 MB/s. A frame at 568 by 1232 in 16-bit colour is 1.40 MB, and scanning it out at 60 Hz is 84 MB/s, or 10.5 percent of the memory ceiling. The I/Q stream at 250 kS/s is one megabyte a second, or 0.125 percent.

Two budgets, one of them surprising

The screen costs 84 times what the radio costs. For anyone budgeting a similar device, that ratio is the useful takeaway: the display, not the receiver, is the load that decides whether the memory subsystem needs to be fast, and the radio is almost free by comparison.

Storing a second costs a megabyte

Once samples exist, they have to go somewhere, and the three formats this project writes differ by two orders of magnitude.

What is kept Per second Per hour
Raw I/Q at 250 kS/s, 16-bit 1.0 MB 3.6 GB
Edge durations for a 1 kbit/s OOK signal 8 kB 29 MB
Decoded vocoder frames, 7,200 bit/s 900 bytes 3.2 MB

A 32 GB card holds about 8.9 hours of continuous I/Q, which sounds generous until you notice that 250 kS/s is a narrow slice of spectrum: an hour of recording covers one channel, not a band. The edge format is 125 times smaller because it keeps only the transitions of an on-off keyed signal, in the Flipper convention of signed microsecond durations in which marks are positive and spaces negative. The vocoder frames are smaller again, and they are the only one of the three that is a final product rather than an input to further work.

That ratio is the argument for decoding on the device rather than recording for later. It is also the argument against it: the edge file cannot be re-demodulated differently, and the I/Q file can.

Transmitting is the hard direction

Receiving is forgiving. A receiver that is slightly wrong still produces audio. A transmitter that is slightly wrong produces interference, and the project's transmit path is bounded tightly for that reason.

Bound Value
Sample format signed 8-bit I and Q
Magnitude limit I squared plus Q squared up to 3,136, a radius of 56
Rates 4,800 to 125,000 complex samples a second
Longest buffer 32,767 samples, 900 ms per run

The interesting result is that amplitude survives. Initialising the radio in an OOK configuration and then issuing a raw command passes both magnitude and phase, where a GFSK initialisation would produce a constant envelope. A two-ring, four-phase amplitude and phase shift keyed waveform comes out of the receiver with both rings intact, which is only possible if the amplitude information survived the whole chain. Measured error vector magnitude on settled plateaus was 5.6 to 7.7 percent, and the note that magnitudes above about 64 saturate is the kind of limit that only appears when someone measures it.

Two independent checks are more convincing than the EVM figure. A P25 test burst transmitted at 915 MHz was recovered by a separate receiver as 72 vocoder frames, all matching the software reference, with the network access code, talk group and source identifier decoding correctly. A sensor packet format was decoded by an unmodified third-party decoder as three temperatures, and a deliberately corrupted checksum produced no reading at all, which is the control that makes the first result mean something.

Transmission is also the part of this that is regulated everywhere. Receive-only operation is the default, the project states the caveat, and the transmit path exists as an experiment on test equipment rather than as a feature.

The numbers that came from the bench

Five measurements in the project's notes are worth repeating, because each one contradicts an assumption.

Measurement Result
Working receive gain on the board 26 dB
IQ components clipped at 49.6 dB gain 5,792 of 16,384, or 35%
Image rejection at 433.9 MHz about 41 dB
Flipper captures decoded by the two sub-GHz decoders 15 of 41
Longest continuous I/Q session 391 s, no reported FIFO loss

The gain figure matters because the stock answer is wrong. The receiver's level bar reads close to full for both a strong signal and a saturated front end, and the two need opposite corrections, so the firmware counts the share of I/Q components pinned at the extremes instead. At 49.6 dB, more than a third of them were clipped; the gain that actually works on that board is 26 dB. A signal-strength indicator that cannot distinguish too loud from too weak is worse than no indicator, and this is a case where the fix was arithmetic rather than hardware.

The 41 dB image rejection is the honest cost of a direct-conversion architecture. It is enough for narrowband work and not enough for a strong adjacent signal, which is why the project's notes put the chip's automatic gain control about 20 dB behind a fixed gain setting on strong signals.

The sub-GHz decode rate is the most useful honesty in the whole set. Two decoders, one for pulse-width keying and one for run-length keying, decode 15 of 41 captures taken from a third-party catalogue of real remotes. The 26 that fail are mostly rolling-code remotes and brute-force sweeps, which is the correct ceiling for those two families rather than a defect. A decoder tested only against fixtures written by its own author has not been tested.

What the design teaches

Four things generalise beyond this board.

Match the port to the service, and do the arithmetic before the schematic. A 12.5 kHz channel needs 48 kS/s; a 1 Mbit/s waveform needs 2 MS/s, which is 40 times more. If a design has one sample path, it can serve the narrowband services and it cannot serve the wideband ones, no matter what the decoder does.

A high-speed host port is a radio feature. The difference between Full-Speed and High-Speed USB is the difference between a dongle that works and a dongle that overruns, and it is decided when the part is chosen rather than when the firmware is written.

Undocumented commands are borrowed time. The entire raw I/Q capability rests on one ROM command in one ROM version, and the project restricts itself accordingly: the library refuses to run against other ROM versions, refuses to coexist with an active patch session, and takes exclusive ownership of the radio while capturing. Anything built on it, including a product, inherits that restriction, and the failure mode is not graceful, because a radio that silently reinterprets an unknown command returns something that looks like noise rather than an error.

Budget the display before the radio. The screen consumed 84 times the memory bandwidth of the sample stream, and the FIFO gave the sample stream 1.024 milliseconds of slack. The two numbers that decide whether a handheld works are both outside the radio.

This article was compiled from the project's published documentation, the board vendor's product page, the ESP32-P4 datasheet, and the project's own bench records. No hardware was tested for it; where a figure is an estimate rather than a measurement, the text says so.

← All news