220 Commits

Author SHA1 Message Date
Marco Bartolucci
533f9ee332 Hardware (CPLD-based) synchronisation
=======================================

This commit allows to synchronise multiple HackRFs with a synchronisation error **below 1 sampling period**

> WARNING: Use this at your own risk. If you don't know what you are doing you may damage your HackRF.
> The author takes no responsability for potential damages

Usage example: synchronise two HackRFs
======================================
1. Chose the master HackRF which will send the synchronisation pulse (HackRF0). HackRF1 will represent the slave hackrf.
2. Retreive the serial number of both HackRFs using `hackrf_info`
3. Use a wire to connect `SYNC_CMD` of HackRF0 to `SYNC_IN` of HackRF0 and HackRF1
4. Run `hackrf_transfer` with the argument `-H 1` to enable hardware synchronisation:
    ```
    $ hackrf_tranfer ... -r rec1.bin -d HackRF1_serial -H 1 | hackrf_transfer ... -r rec0.bin -d HackRF0_serial -H 1
    ```
rec0.bin and rec1.bin will have a time offset below 1 sampling period.
The 1PPS output of GNSS receivers can be used to synchronise HackRFs even if they are far from each other.
>DON'T APPLY INCOMPATIBLE VOLTAGE LEVELS TO THE CPLD PINS

Signal | Header |Pin | Description
-------|--------|----|------------
`SYNC_IN` | P28 | 16 | Synchronisation pulse input
`SYNC_CMD` | P28 | 15 | Synchronisation pulse output

Note:
=====
I had to remove CPLD-based decimation to use a GPIO for enabling hardware.

More info:
==========
[M. Bartolucci, J. A. Del Peral-Rosado, R. Estatuet-Castillo, J. A. Garcia-Molina, M. Crisci and G. E. Corazza, "Synchronisation of low-cost open source SDRs for navigation applications," 2016 8th ESA Workshop on Satellite Navigation Technologies and European Workshop on GNSS Signals and Signal Processing (NAVITEC), Noordwijk, 2016, pp. 1-7.](http://ieeexplore.ieee.org/document/7849328/)

[Alternative link](http://spcomnav.uab.es/docs/conferences/Bartolucci_NAVITEC_2016.pdf)
2017-05-16 11:39:44 +02:00
Michael Ossmann
9bbbbbfbfb Merge pull request #355 from dominicgs/firmware_cleanup
Firmware cleanup
2017-02-28 16:03:15 -07:00
Dominic Spill
c2e775b1b9 hackrf_info: continue probing devices after errors 2017-02-23 14:34:41 -07:00
Dominic Spill
e7f890e0c2 Merge branch 'mossmann-master' into firmware_cleanup 2017-02-22 12:10:42 -07:00
Dominic Spill
f636658c54 Add clock control hackrf_debug 2017-02-21 17:41:05 -07:00
Michael Ossmann
c7956b49b1 hackrf_sweep: report sweep rate instead of data rate 2017-02-21 12:43:59 -07:00
Michael Ossmann
9baac39962 hackrf_sweep: suppress ifft output unless requested 2017-02-21 12:19:00 -07:00
Michael Ossmann
886ba6acfb hackrf_sweep: corrected output file descriptors in binary and ifft modes for compatibility with output file option 2017-02-20 21:43:12 -07:00
Michael Ossmann
f34cc960ff hackrf_sweep: Added experimental Inverse FFT binary output mode.
In this mode, FFT output bins from multiple hops are stitched together into a
single set of bins per sweep.  Each sweep is then processed with an inverse FFT
to simulate a time domain signal at a sample rate equal to the sweep bandwidth.
This wideband time domain signal is sent to the output as complex floats and
can be piped to or viewed with tools such as fosphor or inspectrum.  The output
signal is discontinuous, so the time axis (e.g. in inspectrum) will be
incorrect.
2017-02-20 21:07:00 -07:00
Michael Ossmann
13e4dea446 hackrf_sweep: avoid starting RX too early 2017-02-19 11:10:30 -07:00
Michael Ossmann
378b65a598 added cast to fix tv_usec formatting on various platforms 2017-02-17 00:28:32 -07:00
Michael Ossmann
fd579445df improved accuracy of hackrf_sweep timestamps 2017-02-16 23:22:07 -07:00
Michael Ossmann
bc49bdc344 update timestamp once per sweep 2017-02-16 17:34:38 -07:00
Michael Ossmann
d794ac0e20 output timestamps in microseconds 2017-02-16 14:47:53 -07:00
Michael Ossmann
79f95abdb3 correct discrepancy between number of samples and number of bytes in blocks of samples
related to #346
2017-02-16 12:46:17 -07:00
Michael Ossmann
6aacfa2cc9 corrected maximum permitted number of FFT bins
Fixes #346
2017-02-16 12:06:52 -07:00
Dominic Spill
a8c1fc92e9 Appveyor config for building hackrf_sweep (#344)
Appveyor builds for hackrf_sweep
2017-02-15 16:44:44 -07:00
Michael Ossmann
d7a799d6f2 report actual bin width with indicated precision instead of to the nearest Hz 2017-02-15 16:36:25 -07:00
Michael Ossmann
7cd8e5f7eb hackrf_sweep output file support 2017-02-15 16:20:35 -07:00
Michael Ossmann
ae367880bf _USE_MATH_DEFINES only on Windows 2017-02-15 15:03:54 -07:00
Michael Ossmann
1ba64c674c do not add hackrf_sweep to cmake list twice 2017-02-15 08:56:19 -07:00
mrbubble62
e4106f5aca Cleaned up 2017-02-15 01:01:09 -05:00
mrbubble62
63435f5616 hackrf_sweep on Windows
added precompiled fftw-3.3.5
2017-02-14 01:43:14 -05:00
Michael Ossmann
c57066ebf8 hackrf_sweep: removed bin width from binary output because a more precise result can be computed from the number of bins in a record 2017-02-10 16:37:52 -07:00
Michael Ossmann
55e3a2087d hackrf_sweep: fftwf_free 2017-02-09 23:52:07 -07:00
Michael Ossmann
06e24e876f added fields to hackrf_sweep binary output 2017-02-09 18:12:29 -07:00
Dominic Spill
a1d6e7b3fe Modify hw sync mode to require an argument
- allows it to be ignored for HackRFs with older firmware
2017-02-09 16:35:56 -07:00
Michael Ossmann
e7647f62f3 fixed bug in frequency reported to binary output of hackrf_sweep 2017-02-08 17:24:05 -07:00
Michael Ossmann
4ac132a4ea hackrf_transfer: switched some output messages from stdout to stderr 2017-02-08 17:03:05 -07:00
Michael Ossmann
53d0b8b73e set release string in libhackrf and hackrf-tools even if they are built separately 2017-02-08 15:44:21 -07:00
Michael Ossmann
9e4f14443a Don't build hackrf_operacake utility.
Operacake developers can reverse this change locally if needed.
The utility will have a new name or will be replaced by functions in other tools before we reinstate it.
2017-02-08 14:48:52 -07:00
Michael Ossmann
405a11fb96 added multisynth config to hackrf_debug example usage 2017-02-08 14:42:39 -07:00
Michael Ossmann
f2877d20af change si5351c usage example to be the most common register that folks are likely to want to read 2017-02-08 14:42:39 -07:00
Michael Ossmann
b6d2774a0b fixed long option usage examples 2017-02-08 14:42:39 -07:00
Michael Ossmann
77ace5a118 made part naming consistent in hackrf_debug 2017-02-08 14:42:39 -07:00
Dominic Spill
2e76e6624e Merge pull request #336 from mossmann/sweep-csv
Sweep csv
2017-02-08 14:21:23 -07:00
Michael Ossmann
da81302acf Merge pull request #335 from dominicgs/single_debug_tool
Single debug tool
2017-02-08 14:11:39 -07:00
Michael Ossmann
03d93c1369 added one shot mode to hackrf_sweep 2017-02-08 10:46:08 -07:00
Michael Ossmann
c9c70f7adb hackrf_sweep: don't skip more input than necessary when waiting for valid data 2017-02-08 00:42:13 -07:00
Michael Ossmann
5e6e70659b hackrf_sweep: suppress processing and output until the first expected frequency is seen 2017-02-08 00:37:42 -07:00
Michael Ossmann
5ab315a73a code cleanup 2017-02-07 21:11:50 -07:00
Michael Ossmann
c68aedef31 added output description to hackrf_sweep help 2017-02-07 20:25:21 -07:00
Michael Ossmann
05759ce1c8 fft bin selection in hackrf_sweep binary output, similar to text output 2017-02-07 18:02:52 -07:00
Michael Ossmann
813f540e94 fixed FFT bin reordering bug in hackrf_sweep 2017-02-07 17:48:24 -07:00
Michael Ossmann
0c45d65dc3 allow selection of FFT bin width in hackrf_sweep 2017-02-07 17:12:16 -07:00
Dominic Spill
50da1909f1 Remove old separate debug tools 2017-02-07 17:11:45 -07:00
Dominic Spill
1587c95a59 Support max2837, rffc5071, and si5351 2017-02-07 17:11:13 -07:00
Dominic Spill
ebaebf42f8 Initial commit of combined debug tool 2017-02-07 17:11:13 -07:00
Michael Ossmann
ad9ee61e64 fixed bug in bandwidth filter option error checking in hackrf_transfer 2017-02-07 16:19:05 -07:00
Michael Ossmann
a32dedf1a7 fixed bug in bandwidth filter option error checking in hackrf_transfer 2017-02-07 16:18:30 -07:00