2553 Commits

Author SHA1 Message Date
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
Straithe
21c99a36a6 Update HackRF docs links (#907)
* Update HackRF docs links

* Update new docs links

* Remove erroneous backticks

* update links
2021-07-06 22:45:19 -06:00
Straithe
a2d50ffb4c Initial docs commit (#903)
* Update of existing docs to Sphinx

* Update ToC
2021-07-02 11:52:22 -06: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
34b614f933 Merge pull request #879 from miek/actions
Add Github Actions CI build
2021-06-13 11:55:59 -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
Michael Ossmann
03fe87dbb4 Merge pull request #872 from dmaltsiniotis/stdoutnewlineconversionfix
Adding call to _setmode for Windows only to specify binary stdout output piping.
2021-04-23 17:32:48 -06:00
Mike Walters
67aa90e827 Build with Github Actions 2021-04-19 14:17:16 +01: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
Michael Ossmann
5f1536cc36 Merge pull request #856 from metayan/faster-sweep-end
Faster and cleaner exit from hackrf_sweep
2021-03-30 11:11:47 -06: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
Michael Ossmann
e6eb4ba29b Merge pull request #848 from mossmann/pre-release
Pre release
2021-03-18 14:36:50 -06:00
Michael Ossmann
15b2d3a6ac Merge pull request #853 from miek/sweep_loop_timings
hackrf_sweep: switch main loop timing back to 1Hz
2021-03-18 14:36:39 -06: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
a69bb0a5ac remove doc/hardware directory
Going forward, fabrication outputs will be included in release packages
but not in the git repository.
2021-03-17 22:03:07 -06:00
Michael Ossmann
becc016c35 update README files for CPLD SRAM loading 2021-03-17 21:57:35 -06:00
Michael Ossmann
2a8ed4ec59 increment .so/.pc version number to 0.6 2021-03-17 21:44:34 -06:00
Michael Ossmann
b112d18bd5 Merge pull request #847 from miek/sweepfix
Disable USB interrupts during sweep set_freq call
2021-03-17 16:20:32 -06:00
Mike Walters
1cb2abf747 Disable USB interrupts during sweep set_freq call
Previously, a USB vendor request could interrupt in the middle of
set_freq and make conflicting changes, leaving the HackRF in an
undefined state.

fixes #772
2021-03-17 13:03:06 +00:00
Michael Ossmann
f2021608a6 Merge pull request #820 from mossmann/tools
Clean up output file handling
2021-01-28 14:30:53 -07: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
ee44d2d62e Merge pull request #805 from erikarn/ahc_20201108_fix_libusb_cancel
Fix libusb usage for at least freebsd around the worker thread and transfer cancellation
2021-01-23 17:34:32 -07:00
adrian chadd
61a06b904d Handle hackrf_close() being called without TX or RX being started.
My previous commits didn't handle the specific case of hackrf_close()
being called without the transfers being active.

In this instance the transfers haven't been setup, so calling
cancel_transfers() returned an error.

Instead:

* refactor out the tx/rx stop command from canceling transfers
* send the tx/rx stop command without canceling transfers, since ..
* ... we can then destroy the transfer thread.

I may also need to put an explicit cancel_transfers() before the
call to send the tx/rx stop commands; I'll look at doing that
in a subsequent commit.
2020-12-10 15:57:54 -08:00
Adrian Chadd
b4ea51a36b add 10ms sleep after stop
This seems to stop consumers that are doing quick back to back stop/start
(eg gqrx changing decode mode / filter bandwidth) from hanging the
device.

I now don't have any weird hangs on hackrf with gqrx/freebsd/libusb!

When things hang it isn't erroring out in any way; it just doesn't
start receive.  It doesn't look like a libusb issue; I'd have to get
some USB bus sniffing to see what's going on behind the scenes.
2020-11-09 10:40:44 -08:00
Adrian Chadd
9a278d267a Fix streaming hangs in consumers
* Update device->streaming to reflect whether we're streaming data,
  rather than just whether the streaming thread is active.
  The streaming thread is now always active!
2020-11-09 09:42:34 -08:00
Adrian Chadd
0961a76f26 Fix libusb usage for at least freebsd around the worker thread and transfer cancellation
On at least freebsd-13 trying to cancel a transfer whilst the libusb thread
is not running results in the transfers not completing cancellation.
The next time they're attempted to be re-added the libusb code thinks
they're still active, and returns BUSY on the buffers.

This causes gqrx to error out when one makes DSP changes or stops/starts it.
You have to restart gqrx to fix it.

After digging into it a bit, the libusb code expects that you're actively
running the main loop in order to have some deferred actions run in the
context of said main loop thread.  This includes processing cancelled
transfers - the callbacks have to be run (if they exist) before the
buffers are properly cancelled and have their tracking metadata (a couple of
private pointers and state) removed from inside of libusb.

This patch does the following:

* separate out adding and cancelling transfers from the libusb worker thread
  create/destroy path
* create the libusb worker thread when opening the device
* destroy the libusb worker thread when closing the device
* only add and cancel transfers when starting and stopping tx/rx
* handle cancelled transfers gracefully in the USB callback

Whilst here, also make the libusb device memory zeroed by using
calloc instead of malloc.

This fixes all of the weird libusb related buffer management problems
on FreeBSD.
2020-11-08 21:38:39 -08:00
Michael Ossmann
52851eeb08 Merge branch 'h1r6' 2020-10-13 15:46:30 -06:00
Michael Ossmann
1f37b9dad9 HackRF One: update license to CERN-OHL-P v2 2020-10-13 22:22:02 +01:00
Michael Ossmann
874f820e97 HackRF One: add impedance requirement 2020-10-13 22:22:02 +01:00
Michael Ossmann
1fd94886b0 HackRF One: update plot parameters 2020-10-13 22:22:02 +01:00
Michael Ossmann
7c264b90cb HackRF One: update silkscreen 2020-10-13 22:22:02 +01:00
Michael Ossmann
678d4381bd HackRF One: add ADC pin straps for hardware version detection 2020-10-13 22:22:02 +01:00
Michael Ossmann
585e69a5d0 HackRF One: replace obsolete SKY13350-385LF RF switch with SKY13453-385LF 2020-10-13 22:22:02 +01:00
Michael Ossmann
e8f9f5964f HackRF One: update to KiCad 5.1 2020-10-13 22:21:31 +01:00
Michael Ossmann
6e5cbda294 Merge pull request #771 from mossmann/grf6011
GRF6011
2020-08-03 15:31:30 -06:00
Michael Ossmann
1f8cc9fac4 LNA915: update PCB information in README 2020-08-03 15:13:11 -06:00
Michael Ossmann
21dd8a99fd LNA915: move symbols and footprints to gsg-kicad-lib 2020-08-03 15:12:39 -06:00
Michael Ossmann
7986924b9a LNA915: change ground pad pin number from 0 to 7 on GRF6011 2020-08-03 13:26:43 -06:00
Michael Ossmann
8589e8615e LNA915: use gsg-kicad-lib instead of hackrf library 2020-08-03 13:09:21 -06:00
Michael Ossmann
dc46244873 LNA915: renumber reference designators 2020-08-03 11:20:32 -06:00
Michael Ossmann
bf2a1d8133 LNA915: add optional shunt capacitor 2020-08-03 11:13:56 -06:00
Michael Ossmann
33a1f366bf LNA915: make easier to assemble 2020-08-03 10:55:07 -06:00