647 Commits

Author SHA1 Message Date
Michael Ossmann
24ac1edf5a Support detection of HackRF One r10 2024-02-21 23:48:54 -05:00
Gabriele Gristina
f6598e7b14 hackrf_sweep: normalized timestamp (#1350)
* Added a new option (-n) to enable timestamp normalization within a same sweep
2024-02-01 17:24:55 +00:00
Sam Burdick
423940f59d update readme 2024-01-15 18:38:51 -08:00
Sam Burdick
a1cb37a66a Add macOS build instructions 2024-01-15 18:38:03 -08:00
Gisle Vanem
e1f0a2cea1 Add '#include <io.h>'
Compiling with clang-cl, gives this error:
```c
hackrf-tools/src/hackrf_sweep.c(685,3): error: call to undeclared function '_setmode'; ISO C99 and later do not support implicit function
      declarations [-Wimplicit-function-declaration]
  685 |                 _setmode(_fileno(stdout), _O_BINARY);
      |                 ^
```

fixed by simply adding `#include <io.h>`.
2023-12-01 11:34:55 +01:00
Jonathan Suite
799d9ad158 Run fftw_execute() once on an empty buffer (Fix #1366), add option to save wisdom and specify plan (#863) (#1368)
* Call fftw_execute once prior to starting IQ streaming
* Add options to use/save to an FFTW wisdom file and specify plan
* Fix bug where using -P would also enable one-shot mode

Fixes #1366
Fixes #1260
Addresses #863
2023-11-02 11:25:13 -04:00
Michael Ossmann
1fd67f66ca Merge pull request #1346 from Sasszem/libhackrf_usb_api_versions
libhackrf: document required library versions
2023-09-13 11:23:31 -04:00
bsdmp
ed8a1a6f53 mask all signals in libhackrf transfer_threadproc (#1330)
* mask all signals in libhackrf transfer_threadproc

hackrf_transfer uses pause() and SIGALRM to print statistics and POSIX doesn't
specify which thread must recieve the signal, block all signals here, so we
don't interrupt their reception by hackrf_transfer or any other app which uses
the library (#1323)

* fix windows build and remove empty line
2023-09-13 11:20:14 -04:00
Jonathan Suite
dab548bf29 Firmware updates to allow fine-grained control of biast from command line (#1314)
* Initial commit of hackrf_biast

* Cleaned up hackrf_biast

* Cleaned up usage info

* Include getopt.h for non-GNU systems

* Add support for overriding HackRF's default antenna power behavior in firmware.  Add support for specifying antenna power behavior in libhackrf.

* Moved bias tee config routines into user_config.c, cleaned up operation of hackrf_biast

* hackrf_biast now calls usage() and exits when invoked with no arguments

* Fixed minor documentation error in usage()

* minor syntax cleanup

* Add some documentation to the host API call

* Add proper declaration magic in hackrf.h to hackrf_set_user_bias_t_opts() to appease Visual Studio

* Documentation changes suggested by @martinling

* Moved bias t setting above switch statement, removed line that explicit turned bias t off when entering OFF mode

* Change hackrf_set_user_bias_t_opts() to use a friendly struct() instead of a bitmask.  User friendliness fixes to hackrf_biast options.  More clang-format appeasement.

* Removed support for integer mode args from hackrf_biast

* clang-format error fixes

* Tweaked position of comment for clang-format v14

* Reformat files with clang-format v14 instead of 16

* Remove internal numeric modes for bias T settings

Co-authored-by: Martin Ling <martin-github@earth.li>

* Fix documentation error in hackrf_biast.c

---------

Co-authored-by: Martin Ling <martin-github@earth.li>
2023-09-13 11:15:30 -04:00
Sasszem
9910c88ac3 libhackrf: document required library versions 2023-07-06 01:37:08 +02:00
László Baráth
17269d3a7c Document libhackrf functions using Doxygen (#1244)
* Document & comment code

* document functions & add pages for groups

* Run clang-format

* Fix most review change requests

* Fix typos, add information on using multiple Opera Cake boards

* Update documentation

* Changes requested by @Straithe
- update project brief
- set paper type to letter
- move doxyfile

* Changes requested by @martinling
Excluding the USB API versioning

* Remove incomplete USB version info
The required versions were only noted at a few places. Will add complete info later, but for now, it's removed
2023-04-22 22:03:49 -04:00
Michael Ossmann
ae71cb5b7a Merge pull request #1277 from grvvy/debug_device_fix
change the device long option to required in hackrf_debug
2023-02-14 20:15:53 -05:00
grvvy
fe86f005f6 change the device long option to required in hackrf_debug 2023-02-08 12:18:27 -07:00
Michael Ossmann
00253b02e1 set version to 2023.01.1+ 2023-02-08 14:03:06 -05:00
Michael Ossmann
d9ebb089a5 set version to 2023.01.1 2023-02-01 00:22:29 -05:00
Michael Ossmann
6f26b74e90 Merge pull request #1253 from Sasszem/memory-waste
Fix memory waste in allocated_transfers
2023-01-05 15:34:27 -05:00
Mike Walters
c2b3052c78 hackrf_spiflash: implement compatibility checking using new firmware info struct 2023-01-05 15:18:52 +00:00
Mike Walters
f426ac2174 hackrf_spiflash: use defines for compatibility_check return value 2023-01-05 15:13:06 +00:00
Mike Walters
5084a84a3d libhackrf: add function to lookup platform ID from board ID 2023-01-05 15:13:06 +00:00
Sasszem
b52631b6f5 Fix memory waste in allocated_transfers
Did a search for allocations & all others were fine
2023-01-04 22:09:49 +01:00
Michael Ossmann
3d39660be1 Merge pull request #1237 from greatscottgadgets/tuning
restrict IF to 2170-2740 MHz
2022-12-23 11:56:38 -05:00
Michael Ossmann
3d687a20fd increase forceable IF range to 2000-3000 MHz 2022-12-23 06:06:22 -05:00
Michael Ossmann
173612ac77 add --led option to hackrf_debug
and corresponding changes to libhackrf and firmware
2022-12-18 07:22:17 -05:00
Michael Ossmann
86c1d8ce6e restrict IF to 2170-2740 MHz 2022-12-09 09:12:37 -05:00
Michael Ossmann
5acd0cb99e set version to 2022.09.1+ 2022-10-24 15:14:00 -04:00
Michael Ossmann
b6acd66cfe set version to 2022.09.1
Starting with this release we will no longer use "unknown" as the
default software version string used in cases where the version cannot
be determined from context. Instead we commit the release version string
to git so that any software built from the tagged commit will have the
appropriate release version string. After the release we will commit a
post-release version string as the new default.

We will continue to use the commit hash as version string when the
software is built inside a git repository.
2022-09-29 05:20:39 -04:00
Michael Ossmann
219abf7a4c Merge pull request #1180 from martinling/fix-transfer-locking
Improve transfer locking
2022-09-28 05:06:07 -04:00
Martin Ling
f7c219e30f Merge all_finished_lock with transfer_lock. 2022-09-26 14:01:16 +01:00
Martin Ling
367ce3d7b3 Hold transfer lock during initial submissions in prepare_transfers. 2022-09-26 14:01:15 +01:00
Martin Ling
559a45bd6b Extend scope of transfer_lock in callback. 2022-09-26 13:42:22 +01:00
Michael Ossmann
0e8b941897 hackrf_transfer: fix function name in debug output 2022-09-24 14:23:29 -04:00
Michael Ossmann
06b9d7bee0 Clean up source code copyright notices. 2022-09-23 14:46:52 -04:00
Michael Ossmann
3d378466fb hackrf_operacake: clean up text output 2022-09-23 14:45:34 -04:00
Martin Ling
2e73a4f2db If TX callback sets valid_length to 0, treat as end of data. 2022-09-23 12:46:49 +01:00
Michael Ossmann
45504ff397 Don't repeat file that can't advance its position.
This avoids a confusing condition when hackrf_transfer is reading from
stdin with -R in which it does not repeat previous data but repeatedly
restarts reading new data after the user types Ctrl-D to indicate EOF.

The -R option should repeat previous data or should do nothing if the
input file cannot be rewound.
2022-09-23 06:48:01 -04:00
Michael Ossmann
8fbaf1336c Improve handling of file read results. 2022-09-23 06:47:54 -04:00
Martin Ling
db33e1bdaf Revert rename of byte_count now that we only have one count. 2022-09-23 05:19:29 -04:00
Martin Ling
0becbc6b4a Indicate success or failure to flush callback. 2022-09-23 05:19:29 -04:00
Martin Ling
4810d1f992 Fold transfer_finished function into libusb transfer callback. 2022-09-23 05:19:29 -04:00
Martin Ling
1484b78c05 Expand lock scope in libusb transfer callback.
This is required since cancel_transfers will also cancel the flush.
2022-09-23 05:19:29 -04:00
Martin Ling
770416f122 Cancel flush transfer if shutting down. 2022-09-23 05:19:29 -04:00
Martin Ling
c089bb0b88 Fix handling of EOF and error conditions after fread. 2022-09-23 05:19:29 -04:00
Martin Ling
eae7049284 Fix empty report when TX ends soon after the last report. 2022-09-23 05:19:29 -04:00
Martin Ling
14093fe73b Provide a callback for completion of a TX transfer. 2022-09-23 05:19:29 -04:00
Martin Ling
2448796e35 Handle failures in fread from TX callback. 2022-09-23 05:19:29 -04:00
Martin Ling
cb8fc333aa Fix inaccurate error message when TX completes near a 1 second boundary. 2022-09-23 05:19:29 -04:00
Martin Ling
98faa5429f Fix inaccurate statistics in hackrf_transfer. 2022-09-23 05:19:29 -04:00
Martin Ling
b872647e97 Provide a callback for TX flush, rather than a wait function. 2022-09-23 05:19:29 -04:00
Michael Ossmann
1167f49b7f hackrf_transfer: refer to triggers as "triggers" 2022-09-21 10:37:40 -04:00
Michael Ossmann
8e83506da1 Merge pull request #1166 from martinling/tx-disconnect-hang
Fix hang in TX when a libusb error occurs.
2022-09-19 21:28:49 -04:00