379 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
Marco Bartolucci
747d8e2278 Removed decimation in CPLD 2017-05-15 12:56:51 +02: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
schneider42
4117cd3903 Merge branch 'master' into rad1o 2017-02-11 18:02:51 +01:00
Michael Ossmann
5b881e1d54 fixed bug that caused tuning glitches in interleaved sweep mode 2017-02-08 10:44:16 -07:00
Michael Ossmann
00d5b1c575 don't send first buffer to host in sweep mode until it is full 2017-02-07 17:52:09 -07:00
Michael Ossmann
e9d1c71646 fixed firmware bug with sweep ranges that start at high frequencies 2017-02-07 16:00:20 -07:00
Michael Ossmann
4b6de820ef support multiple frequency ranges in hackrf_sweep 2017-02-07 15:37:26 -07:00
Michael Ossmann
e1b1dbd647 Moved sweep mode frequency computation into firmware.
Changed from long list of tuning frequencies to short list of ranges.
2017-02-07 13:57:49 -07:00
schneider
c0c0fab368 chore(rad1o): White space fixes and cleanup 2017-02-03 19:27:19 +01:00
schneider
c04b1cbc8d Merge remote-tracking branch 'mossmann/master' into opera-merge 2017-02-03 16:25:32 +01:00
Michael Ossmann
0eb85c529c Fixed firmware dwell time bug in sweep mode. Two buffers of sample data are now thrown away at the start of each step in order to allow time for tuning.
Fixes #317.
2017-02-01 16:21:04 -07:00
Dominic Spill
255b7b4705 Add USB API versioning 2017-01-30 18:30:17 -07:00
schneider
642feac51e Merge remote-tracking branch 'mossmann/master' into opera-merge
Conflicts:
	firmware/common/hackrf_core.c
	firmware/common/rf_path.c
	firmware/hackrf-common.cmake
	firmware/hackrf_usb/hackrf_usb.c
	firmware/hackrf_usb/usb_api_transceiver.c
	host/hackrf-tools/src/hackrf_transfer.c
2017-01-28 23:46:43 +01:00
Dominic Spill
b047dd0cb4 Add software controlled reset 2017-01-27 15:03:53 -07:00
schneider
70c41463b1 refact(mixer): Basic mixer abstraction 2017-01-26 00:31:43 +01:00
schneider
35ca538c18 Merge remote-tracking branch 'mossmann/master' into rad1o
Just a very rough merge to get off the ground. Major parts are not yet
implemented. The mixer intergration is in a messed up state. Part which
need work have been marked with XXX

Conflicts:
	firmware/common/hackrf_core.c
	firmware/common/hackrf_core.h
	firmware/common/max2837.c
	firmware/common/max2837.h
	firmware/common/rf_path.c
	firmware/common/rffc5071.c
	firmware/common/rffc5071.h
	firmware/common/sgpio.c
	firmware/common/si5351c.c
	firmware/common/tuning.c
	firmware/common/w25q80bv.c
	firmware/common/w25q80bv.h
	firmware/common/xapp058/ports.c
	firmware/hackrf-common.cmake
	firmware/hackrf_usb/hackrf_usb.c
	firmware/hackrf_usb/usb_api_register.c
	firmware/hackrf_usb/usb_api_transceiver.c
	host/hackrf-tools/src/hackrf_transfer.c
2017-01-26 00:21:58 +01:00
Michael Ossmann
3474ad50c0 Merge branch 'multi-device-hardware-sync' of https://github.com/dodgymike/hackrf into dodgymike-multi-device-hardware-sync 2017-01-24 16:18:33 -07:00
Mike Davis
533b5a4150 Remove dummy buffer 2017-01-24 22:09:03 +02:00
Dominic Spill
60f64928d3 Merge branch 'master' into operacake 2017-01-23 17:50:09 -07:00
Dominic Spill
8e4850d36e Add HackRF tool to change operacake ports 2017-01-23 15:52:38 -07:00
Mike Davis
ddb19a86fe Add vendor request for enabling/disabling gpio-based sync 2017-01-22 22:28:11 +02:00
Mike Davis
4b4cd181d8 Sync ready 2017-01-03 22:25:32 +02:00
Dominic Spill
6b831d31cc Stop dropping buffers in firmware and allow the host to make the decision. 2016-12-27 21:08:12 +00:00
Dominic Spill
a95d1ac027 Add dwell time argument to hackrf sweep
- untested because I'm not able to fire up my HackRF right now
2016-12-27 21:08:12 +00:00
Dominic Spill
6463479888 Extend frequency array to allow 6GHz sweeping 2016-12-27 21:08:12 +00:00
Mike Walters
f7cd712ff9 Fix up frequency list size 2016-12-27 21:08:12 +00:00
Dominic Spill
c127cdc0a4 Frequency list PoC 2016-12-27 21:08:12 +00:00
Mike Walters
2d88fe4de3 Reset enter_scan_mode to avoid going straight back into scan_mode 2016-12-27 21:08:12 +00:00
Mike Walters
b6a7972916 Add extra fs/4 hops to overlap band-edges and DC spikes 2016-12-27 21:08:12 +00:00
Mike Walters
8e21d5cba0 Skip first block after retune 2016-12-27 21:08:12 +00:00
Dominic Spill
57e0924e0d Rename scan to sweep 2016-12-27 21:08:12 +00:00
Mike Walters
8c08d99879 Wait for scan_params to actually arrive before starting scan mode 2016-12-27 21:08:12 +00:00
Mike Walters
a303097c31 Add magic & scan_freq to the start of each transfer 2016-12-27 21:08:12 +00:00
Mike Walters
ccc424e21f Cleanup scan_mode usb transfer logic 2016-12-27 21:08:12 +00:00
Mike Walters
805e8c02e9 Revert "Only transfer one block per re-tune"
This reverts commit 3614cd3050d4cbbde651dae57fc35d689b18934f.
2016-12-27 21:08:12 +00:00
Mike Walters
9b375a17ea Fix init_scan request length 2016-12-27 21:08:12 +00:00
Dominic Spill
8c96d9cf32 Change granularity of scan mode to MHz 2016-12-27 21:08:12 +00:00
Mike Walters
d19b4efa2e Only transfer one block per re-tune 2016-12-27 21:08:12 +00:00
Mike Walters
97c317e9a4 Add init_scan call to libhackrf 2016-12-27 21:08:12 +00:00
Dominic Spill
1b8e1d18c5 Add scan mode function separate to main loop 2016-12-27 21:08:12 +00:00
Dominic Spill
2e17b7e884 Use vendor request to start scan mode 2016-12-27 21:08:12 +00:00
Mike Walters
9f2d6cdbea WIP scanning 2016-12-27 21:08:12 +00:00
Dominic Spill
b528af46c1 Tidy unused operacake code and use addresses to refer to boards 2016-12-25 11:01:55 +00:00
Dominic Spill
c54e31f397 Add support for multiple operacake boards connected to one HackRF 2016-12-23 21:59:45 +00:00
Dominic Spill
1cec9ad4db Add Operacake USB API (firmware) 2016-12-19 21:50:29 -07:00
Mike Davis
25929965f5 Kind of working hw sync 2016-12-15 21:56:49 +02:00
Dominic Spill
0ef1666c2a Add initial operacake support 2016-12-13 19:07:11 -07:00
Mike Davis
976c99c1ad Kind of working hardware sync 2016-12-10 21:42:20 +02:00
Mike Davis
3672f38b27 Experiments with gpio pins, for hardware sync 2016-12-10 18:47:38 +02:00