A specialized and optimized port of kalibrate, designed specifically for the HydraSDR RFOne high-performance Software Defined Radio.
It scans GSM base stations and uses their broadcast carrier as a highly stable frequency reference.
This allows precise measurement and permanent correction of the HydraSDR’s internal TCXO offset (PPM/PPB).
- Implements a Polyphase Rational Resampler to convert the HydraSDR native sampling rate (2.5 MSPS) to the GSM symbol rate (270.833 kSPS).
- Provides >60 dB aliasing rejection for clean decimation.
- Ensures high-precision timing required for GSM frequency analysis.
- Can read and write frequency correction values directly from/to the HydraSDR's SPI Flash.
- Automatically resets the device after writing calibration to apply changes immediately.
- ASCII Art FFT (
-A): Real-time spectrum visualization directly in the console. - DSP Benchmark (
-B): Measures DSP processing throughput on the host CPU.
- Adds a fast Power Scan (coarse scan) before fine-frequency detection.
- Improves band scanning performance by approximately 10× compared to earlier versions.
- Cross-platform build system powered by CMake with support for Windows, Linux, and macOS.
Follow these steps to permanently calibrate your HydraSDR RFOne TCXO.
Reset the calibration value to zero before measuring. This also validates device communication.
kal.exe -W 0(The device will reset. Wait a few seconds for it to re-enumerate.)
Scan to find a strong and stable reference signal.
Recommended bands:
EGSM(900 MHz)GSM850DCS(1800 MHz) — supported but near hardware limitPCS(1900 MHz) — disabled
kal.exe -s EGSM -g 16Example Output:
kal: Scanning for E-GSM-900 base stations.
E-GSM-900:
chan: 2 (935.4MHz -36Hz) power: -33.4 dBFS
chan: 4 (935.8MHz -134Hz) power: -52.1 dBFS
chan: 83 (951.6MHz -147Hz) power: -49.5 dBFS
chan: 84 (951.8MHz -315Hz) power: -50.6 dBFS
chan: 85 (952.0MHz -180Hz) power: -57.5 dBFS
chan: 87 (952.4MHz 29Hz) power: -50.9 dBFS
chan: 113 (957.6MHz -16Hz) power: -33.5 dBFS
chan: 114 (957.8MHz -140Hz) power: -42.9 dBFS
chan: 115 (958.0MHz 117Hz) power: -54.3 dBFS
chan: 116 (958.2MHz -83Hz) power: -54.9 dBFS
chan: 118 (958.6MHz -54Hz) power: -24.1 dBFS
...
Select the channel with the highest POWER (for example, 118).
Tune to the selected channel and measure the frequency offset.
kal.exe -c 118 -g 16Example Output:
kal: Calculating clock frequency offset.
Using GSM-900 channel 118 (958.6MHz)
Scanning for FCCH bursts ('.' = searching, '+' = found)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
--------------------------------------------------
Results (100 valid bursts out of 100 attempts)
--------------------------------------------------
average [min, max] (range, stddev)
-70Hz [-77, -67] (10, 2.267751)
overruns: 0
not found: 0
Average Error: -0.073 ppm (-73.379 ppb)
Record the PPB value (in this example: -73).
Store the PPB correction value permanently in the device.
kal.exe -W -73Output:
[-] Erasing flash sector 2 (Calibration area)...
[-] Writing Calibration: -73 ppb (Timestamp: XXXXXXX)...
[+] Calibration written successfully.
[!] Resetting HydraSDR to apply changes...
[+] Device reset command sent.
The device will reboot after writing.
Re-measure to confirm the correction is applied.
kal.exe -c 118 -g 16Expected Result:
- Remaining offset should be within ±0.5 ppm
- Typically around ±250 ppb with a strong signal
kal.exe -s <band> [options]kal.exe -f <freq> | -c <chan> [options]kal.exe -R # Read calibration from flash
kal.exe -W <ppb_value> # Write calibration and reset device| Option | Description |
|---|---|
-s |
Scan a band (EGSM, GSM900, DCS, GSM850, GSM-R). PCS is disabled. |
-f |
Absolute frequency of a GSM carrier. |
-c |
Channel number (ARFCN). |
-b |
Band indicator (required when using -c). |
-g |
Gain (0–21 for HydraSDR Linearity Gain). |
-R |
Read calibration from flash. |
-W |
Write calibration value (PPB) and reset the device. |
-A |
Display ASCII FFT spectrum. |
-B |
Run DSP benchmark and exit. |
-v |
Verbose output. |
-D |
Debug messages. |
-h |
Help text. |
Ensure the following runtime libraries are present in the same directory as kal.exe under Windows:
libhydrasdr.dllorhydrasdr.dlllibusb-1.0.dlllibwinpthread-1.dll(unless statically linked)libfftw3-3.dll(optional if statically linked)
- Supported:
GSM850,GSM900/EGSM,GSM-R - Warning:
DCS(1800 MHz) is near the device's hardware limit - Disabled:
PCS(1900 MHz)
This project is licensed under the BSD 2-Clause License.
Based on and heavily refactored from work by:
- Joshua Lackey (2010)
- Steve Markgraf (2012)
- Stan Pitucha
Additional modifications © 2025 Benjamin Vernoux <bvernoux@hydrasdr.com>