304 Commits

Author SHA1 Message Date
Michael Ossmann
b1b11e6269 update Opera Cake documentation (#1017) 2021-12-12 17:06:53 -05:00
Michael Ossmann
aa0485d4df Revert "Cleanup of host software CMake build system (#664)"
This reverts commit d60fb83320cea49fd20305f22838f948557f1b81.
2021-12-08 16:59:05 -07:00
Jamie Smith
d60fb83320 Cleanup of host software CMake build system (#664)
* Clean up the CMake build system and improve the FindFFTW3 module.

* Fixes for Linux build

* Include winsock.h to get struct timeval

* Couple more fixes for MSVC, also add new FindMath module

* Update host build README for new CMake changes (esp. Windows)

* Try to fix Travis OS X build error

* Add docs about pthread-win32

* Whoops, AppVeyor caught a bug in FindFFTW where the includes not being found weren't generating a fatal error.

* Travis rebuild bump

* One more fix: replace hardcoded include paths with a PATH_SUFFIX to standard include paths

* Invert Windows preprocessor flag so it's only needed when using a static build.  This preserves compatibility with the previous system.

* Fix copy-paste error

* Update cmake modules from amber-cmake upstream, incorporate TryLinkLibrary into FindUSB1

* Fix missing include
2021-12-03 14:11:04 -05:00
Michael Ossmann
c8695e0a44 hackrf_sweep: correct -w (bin_width) minimum 2021-11-14 12:21:29 -07:00
Michael Ossmann
8a3547e71e hackrf_sweep: improve -w (bin_width) guidance 2021-11-14 12:05:29 -07:00
Michael Ossmann
9856452215 hackrf_sweep: eliminate -n option (num_samples)
The firmware has the capability to dwell on each frequency for a
configurable duration in sweep mode, but the hackrf_sweep host tool did
not behave correctly when asked to use a non-default dwell time. The
option has never worked properly, and it is not a feature anyone seems
to want.
2021-11-14 11:41:56 -07:00
Michael Ossmann
2775279fd0 hackrf_sweep: eliminate time stamp adjustment
We previously attempted to adjust the output time stamp according to the
sample rate and placement of the samples within the USB transfer data,
but the end result was a fixed time offset with respect to the time of
USB transfer completion. We are using only those samples closest to the
end of the transfer, so it makes sense to simply use the time the USB
transfer ends and not try to correct that fixed offset.

It may be possible in the future to have a more accurate time stamp
generated in firmware, but I don't think it is worth complicating the
host code with minor time adjustments until and unless firmware-based
time stamps become available.
2021-11-14 11:20:31 -07:00
Mike Walters
f5a7132805 hackrf_operacake: make main options mutually exclusive
ref #930
2021-10-15 14:45:38 +01:00
Mike Walters
4ecbd5d2c9 hackrf_operacake: add option for default dwell time
This allows for usage like this:

  $ hackrf_operacake -m time -w 1e6 -t A1 -t A2 -t A3
  $ hackrf_transfer -r /dev/null -s 1e6

ref #930
2021-10-15 14:45:38 +01:00
Mike Walters
38ed075437 operacake: replace hackrf_set_operacake_ranges with hackrf_set_operacake_freq_ranges 2021-10-15 14:45:38 +01:00
Mike Walters
0e68be7771 hackrf_operacake: simplify frequency range parsing 2021-10-15 14:45:38 +01:00
Mike Walters
07a9dd73d8 hackrf_operacake: swap argument order for frequency-switching
ref #930
2021-10-15 14:45:38 +01:00
Mike Walters
f9b923fce2 hackrf_operacake: default to address 0
ref #930
2021-10-15 14:45:38 +01:00
Mike Walters
e41314f130 operacake: add API function to set port dwell times 2021-10-14 14:41:52 +01:00
Mike Walters
c50ebb1a36 operacake: add time switching mode 2021-10-14 14:41:52 +01:00
Mike Walters
790b5d35cf operacake: add get/set switching mode functions 2021-10-14 14:36:18 +01:00
Mike Walters
6aa64a80d5 hackrf_operacake: clarify output of list command
Now that addresses are in the range 0-7, this would previously output
"Operacakes found: 0" for the default board address. This is confusing
as it looks like it found no Opera Cakes.
2021-07-14 18:35:31 +01:00
Mike Walters
5e2e06b620 hackrf_info: display Opera Cake addresses in decimal
Fixes #899
2021-07-14 18:35:31 +01:00
Mike Walters
0293cf23db Opera Cake: use 0-7 instead of I2C addresses & bump USB API version 2021-07-14 18:35:31 +01:00
Clifford Heath
a9945ffaa3 Report amplitude once per second during receive (#890)
* Report amplitude once per second during receive

* Added missing M_LN10 for Windoze, fixed short frame detection for RSSI

* Tweaks to math expressions

* Tweaks to math expressions
2021-06-13 11:59:26 -06:00
Michael Ossmann
10b7d67ea5 Merge pull request #874 from metayan/sweeprate
hackrf_sweep: Calculate and show sweep rate for subsecond sweeps
2021-04-23 17:35:31 -06:00
Yan
7c14f876a0 hackrf_sweep: initialise sweep_rate
Thanks to dmaltsiniotis for spotting this.
2021-04-10 13:47:33 +02:00
Yan
90acbcff07 hackrf_sweep: Calculate and show sweep rate for subsecond sweeps 2021-04-08 22:46:42 +02:00
Demetri Maltsiniotis
e664321cc6 Adding call to _setmode for Windows only to specify binary stdout output piping. 2021-04-07 15:11:44 -05:00
Yan
ab4498f8ac hackrf_sweep: exit early from rx_callback if do_exit set
Sometimes, if a small frequency interval is scanned, the callback is
triggered even though we already have the number of sweeps we want, and
sweep_count gets increased, showing the wrong "Total sweeps".
2021-03-20 10:07:51 +01:00
Yan
4c46fc74b3 hackrf_sweep: speed up ending by removing unnecessary code
hackrf_stop_rx() is handled in hackrf_close(), so there seems to be no need
to call it separately.  Furthermore, if hackrf_stop() is called separately,
it causes hackrf_close() to take more than half a second longer.
2021-03-19 16:31:37 +01:00
Yan
2ef7995763 hackrf_sweep: flush output earlier
Gives listener access to complete data faster.
Otherwise the data might be delayed until the whole closing procedure is done.
2021-03-19 16:29:21 +01:00
Mike Walters
5361b3a7f4 hackrf_sweep: switch main loop timing back to 1Hz
fixes #850
fixes #851
2021-03-18 19:48:53 +00:00
Michael Ossmann
2ca991e1df Flush output streams. Do not fclose stdout/stdin. 2021-01-27 12:12:45 -07:00
Michael Ossmann
a6fa7876cb Give descriptive names to streams.
They were previously given the confusing name of fd even though they are
not file descriptors.
2021-01-27 11:59:29 -07:00
Michael Ossmann
8fead43cf2 Merge pull request #748 from ggatis/patch-1
Update hackrf_sweep.c
2021-01-27 11:38:45 -07:00
Michael Ossmann
451873d616 Merge pull request #716 from Jakub6/master
fix _FILE_OFFSET_BITS 64 position in hackrf_transfer.c
2020-07-26 07:39:17 -06:00
ggatis
38f6d4c828 Update hackrf_sweep.c
change if ( fd != NULL ) to if ( ( fd != NULL ) && ( fd != stdout ) )
before fclose( fd );
2020-06-16 13:55:50 +03:00
jaj
a9f6cbc367 fix _FILE_OFFSET_BITS 64 position in hackrf_transfer.c (must be included before <sys/stat.h>) 2020-03-16 13:16:15 +01:00
Michael Ossmann
c0aed2edb7 firmware: clean up transceiver modes 2020-02-11 16:59:59 +00:00
Mike Walters
4aac303480 Add option to disable HackRF UI
Fixes #608
2020-01-22 21:23:30 +00:00
Michael Ossmann
ecd82e81c1 remove specific sample rate recommendations
HackRF One supports arbitrary sample rates from 2 Msps to 20 Msps.  In
early development we had ideas about preferred sample rates that we no
longer consider valid.
2020-01-22 06:39:08 -07:00
Michael Ossmann
8ff56c615f Merge pull request #661 from mgesteiro/hackrf_transfer-fix
FIXED: remove garbage at the end when capturing to stdout ('-r -')
2020-01-06 16:43:14 -07:00
Michael Ossmann
208fae7538 Merge pull request #645 from jboone/master
Sync up PortaPack UI changes.
2020-01-06 16:31:28 -07:00
Michael Ossmann
1569737109 Merge pull request #607 from dominicgs/portapack_ui_opera_cake_coexistence
Allow portapack and opera cake to coexist and still enable the PP UI
2020-01-06 16:28:58 -07:00
Mike Walters
dcb98f7f51 Get FFTW library dir 2019-12-10 18:46:51 +00:00
Mike Walters
d9897e03b1 Fix FFTW include dir 2019-12-10 18:46:51 +00:00
mgesteiro
c2d2492d41 FIXED: remove garbage at the end when capturing to stdout ('-r -') 2019-11-12 09:03:51 +01:00
Jared Boone
ef5b907295 CPLD: Remove checksum function from libhackrf and hackrf_info.
The checksum calculation process was causing the CPLD configuration to reload from flash. With the new SRAM loading mechanism, flash contents may not be up to date, so the CPLD bitstream may regress to the point of not working or not working correctly. This commit is a short-term fix for mossmann/hackrf issue #609.
2019-03-27 12:16:39 -07:00
Dominic Spill
b701579906 Allow portapack and opera cake to coexist and still enable the PP UI
The side effect of this is to disable GPIO mode for OC, but I2C still
works
Using both addons together is super unlikely
2019-02-01 12:04:40 -07:00
Jared Boone
fa2a9acd1a USB: initial CPLD checksum API support. 2019-01-31 21:19:21 +00:00
Dominic Spill
56b3bd0bed Merge pull request #546 from dominicgs/operacake_gpio
HackRF Opera Cake - GPIO test mode
2018-11-30 05:07:31 +11:00
w0xel
20b351916e Fix compile with fftw3f not in system dir 2018-11-19 16:04:27 +01:00
Dominic Spill
82656b8f14 HackRF Opera Cake - GPIO test mode 2018-11-09 22:10:16 -07:00
Dominic Spill
b02a8f2e8d Merge pull request #545 from GravesJake/sweep_n
Add limited sweep mode
2018-11-07 11:48:51 -07:00