[Hackrf-dev] HackRF support for Kalibrate.

王康 scateu at gmail.com
Sun Apr 27 15:58:36 EDT 2014


Hi guys,

I just added hackrf support for kalibrate.

You can find it on :

https://github.com/scateu/kalibrate-hackrf

Kalibrate is a Linux program that uses GSM mobile cell phone base
stations to determine the PPM offset, by using the GSM signals own
frequency correction bursts(FCCH).

I think the code is working now, and any report or fix will be very welcomed.

$ ./kal -s GSM900
hackrf_set_freq: 939400000
chan: 22 (939.4MHz + 325Hz) power: 474916.50
hackrf_set_freq: 939600000
hackrf_set_freq: 939800000
hackrf_set_freq: 940000000
hackrf_set_freq: 940200000
hackrf_set_freq: 940400000
chan: 27 (940.4MHz + 325Hz) power: 503685.38
hackrf_set_freq: 940600000
hackrf_set_freq: 940800000
hackrf_set_freq: 941000000
hackrf_set_freq: 941200000
hackrf_set_freq: 941400000
chan: 32 (941.4MHz + 378Hz) power: 450694.89
hackrf_set_freq: 941600000
chan: 33 (941.6MHz + 363Hz) power: 450264.92
hackrf_set_freq: 941800000
hackrf_set_freq: 942000000

$ ./kal -c 32 -D
debug: fcch_detector finished -----------------------------
debug: error limit: 0.5
debug: 146 272.215363 68025.585938
[.......]
debug: fcch_detector finished -----------------------------
debug: error limit: 0.5
debug: 144 290.700104 68040.851562
debug: fcch_detector finished -----------------------------
average [min, max] (range, stddev)
+ 326Hz [291, 363] (72, 19.584045)
overruns: 0
not found: 3
average absolute error: -0.347 ppm


For now ,the code is quite dirty, I will make it clean later.

BTW:
I think we need some API function like:

hackrf_read_sync(device, buf, sizeof(buf), &n_read)

Now I have to use hackrf_start_rx() with a callback function.



------------------------
Cheers,
scateu.
http://hackrf.net : A Chinese HackRF Community.


More information about the HackRF-dev mailing list