415 Commits

Author SHA1 Message Date
Michael Ossmann
5fbd75ef94 Merge pull request #468 from dominicgs/appveyor
Appveyor
2018-03-28 09:15:11 -06:00
Dominic Spill
bde5ca9f58 DFU serial number - avoid reading serial from flash chip
Set a DFU mode specific serial number
2018-03-27 18:08:49 -06:00
Dominic Spill
cf4b3ae7f4 Cast all the things 2018-03-27 14:30:41 -06:00
Dominic Spill
e384a2d2b7 Explicitly cast variables to silence Windows build warnings 2018-03-27 14:11:51 -06:00
Dominic Spill
d4d74db27c Add helper functions for parsing frequency arguments 2018-03-27 11:57:52 -06:00
Dominic Spill
9f0a46d818 Calculate using doubles and cast to float at the last moment 2018-03-27 10:38:03 -06:00
Dominic Spill
bfa9f65f4e Try another work around for strdup() 2018-03-26 23:25:31 -06:00
Dominic Spill
936da52169 Third time lucky with definition to remove warning about strdup() 2018-03-26 21:31:56 -06:00
Dominic Spill
e0e02bcd7a Fix bad define (maybe) 2018-03-26 21:16:23 -06:00
Dominic Spill
c8e8d33a59 Silence warning about strdup() being deprecated 2018-03-26 20:59:55 -06:00
Dominic Spill
bb585e40a4 libhackrf: Fix Windows type warnings
MSVC compalins when we mix int and ssize_t
Declaration of hackrf_set_sample_rate_manual differed between .h and .c
2018-03-26 20:35:44 -06:00
Dominic Spill
3168bb55e3 Revert "hackrf_transfer: fix Windows uint32 conversion build warnings"
This reverts commit a9bc8b7ff7c1a2fd910f99d7accd9f75196c71f0.
2018-03-26 19:11:55 -06:00
Dominic Spill
a9bc8b7ff7 hackrf_transfer: fix Windows uint32 conversion build warnings 2018-03-26 19:07:42 -06:00
Dominic Spill
4c2a039a01 hackrf_operacake: cleanup Windows precision warnings 2018-03-26 18:39:56 -06:00
Dominic Spill
5f02620a49 ahckrf_debug: finx type conversion warning from Windows build 2018-03-26 18:06:13 -06:00
Dominic Spill
1fab6d9030 Fix type conversion warnings for Windows build 2018-03-26 18:04:45 -06:00
Dominic Spill
65c7b5aa24 Open device counting: increment when opening a device
Previously it incremented when the library was initialised, this worked
for GNU Radio flowgraphs, but broke elsewhere
2018-02-27 16:07:04 -07:00
Dominic Spill
d17f091736 libhackrf: stop_tx() put HackRF in to idle mode before killing transfer thread
This is what we do for RX and appears to prevent HackRF remaining in TX
mode. This mirrors commit 693c262
2018-02-17 16:20:08 -07:00
Georg von Zengen
73ca8c09dd libhackrf: counts the open devices, prevents exit if not all closed
fixes #435, osmosdr calls hackrf_exit for the last sink and the last
source. If both are in one flow graph the desctructor of the source
fails as the sink already closed the usb context.
This prevents hackrf_exit to close the context if not all devices are closed
2017-12-07 15:21:29 +01:00
Dominic Spill
5f560d6ad3 Merge branch 'mossmann-master' into flash-investigation 2017-12-05 16:18:19 -07:00
Dominic Spill
a1f9361f78 Wrong localtime argument type in hackrf_sweep causes crash on win 10
Thanks jaredd
2017-12-02 20:37:37 -07:00
Dominic Spill
3f569a8ad4 hackrf_clock: Allow CLKOUT to be enabled / disabled
hackrf_clock -o 1 / hackrf_clock -o 0
2017-11-07 11:23:48 -07:00
Dominic Spill
1f9c2c81b6 Initial commit of a dedicated clock tool 2017-11-07 11:23:48 -07:00
Dominic Spill
c416fa1294 SPI Flash: add function to clear SPI flash status register 2017-11-06 10:42:19 -07:00
Michael Ossmann
2174aa0ea4 Merge pull request #400 from dominicgs/firmware_compatibility_check
Firmware compatibility check
2017-09-28 23:58:34 -06:00
Dominic Spill
f20763419f Optional spi flash status read 2017-09-12 18:04:15 -06:00
Dominic Spill
8f544ee60d Add flash status read 2017-09-12 17:52:07 -06:00
Martin Müller
1df938c6ec Fix a few typos in README for host tools 2017-09-01 22:45:24 +02:00
Martin Müller
05da6a93f9 Fix some Markdown syntax issues
Headlines require a space between the hashes to be recognized correctly
on some systems.
Also a mismatched backtick was fixed.
2017-09-01 22:38:29 +02:00
Morten Shearman Kirkegaard
161d8f77f4 Fixed bug in rx_callback(), where time_stamp.tv_usec was sent through modulo before time_stamp.tv_sec was updated. 2017-08-22 17:17:45 +02:00
Dominic Spill
97d3e65866 Fix misleading typo in bandwidth filter comment 2017-08-17 17:20:27 -06:00
Dominic Spill
fb24c389a4 Fix issue with rad1o compatibility check string 2017-08-11 08:00:01 +01:00
Dominic Spill
75d3a0a5b1 Add check for correct firmware when flashing to a devices
It's using the product string for now, but there are other
things that we could check too. Use -i to ignore the check.
rad1o badge will always pass the check because it uses
"HackRF" as the product string, whichis a substring of both
other devices..
2017-08-09 11:29:24 +01:00
Joshua Hill
42924698c5 OperaCake: fixes travis build errors 2017-07-11 19:54:44 -04:00
Joshua Hill
3ad2dc9d2a fixed ports to allow users to pass port name on board 2017-07-11 19:07:38 -04:00
Dominic Spill
44333b7635 Include path for hackrf.h is sometimes ambiguous
add both to pkg-config file
 https://github.com/pothosware/homebrew-pothos/issues/12
2017-07-07 10:02:03 -06:00
hayati ayguen
e707e448d3 fix/add missing 'LIBUSB_CALL' at libusb callback 'hackrf_libusb_transfer_callback'
this allows to remove function cast at prepare_transfers()
missing 'LIBUSB_CALL' produced problems in debugger with Visual Studio 2017

Signed-off-by: hayati ayguen <h_ayguen@web.de>
2017-06-18 23:52:23 +02:00
Dominic Spill
72a03cffa8 Merge pull request #382 from dominicgs/operaglasses
Opera glasses: allow user specified ranges for operacake ports
2017-06-02 10:23:24 -06:00
Marco Bartolucci
e682fe812e Always call hackrf_set_hw_sync_mode in hackrf_transfer.
Avoids the need to manually disable the hw synchronisation by specifyinh the option -H 0.
Omitting -H 0 has the same effect.
2017-05-22 11:40:12 +02:00
Marco Bartolucci
8d0187770a Added "Waiting for sync" info in hackrf_transfer 2017-05-22 11:29:37 +02:00
Marco Bartolucci
e6a0161058 Avoid hackrf-transfer to abort if no samples are received within one second, when hardware sync mode is enabled. 2017-05-19 15:44:23 +02:00
Dominic Spill
8c7941b0ef Opera glasses: allow user specified ranges for operacake ports
- HackRF switches antenna when tuning
 - ports specified using hackrf_operacake cmdline tool
 hackrf_operacake -f 2350:2800:0 -f 0:400:1 -f 400:700:2 -f 700:6000:3
2017-05-16 17:18:54 -06:00
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