2332 Commits

Author SHA1 Message Date
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
Michael Ossmann
6e4f738c6c LNA915: modify SMA-KIT-1.5MF footprint to ease soldering 2020-08-03 10:54:03 -06:00
Michael Ossmann
3bcb11fc12 LNA915: add courtyard to GRF6011 footprint 2020-08-03 10:53:00 -06:00
Michael Ossmann
eb37228166 LNA915: add copy of F5Q footprint to local library and update 2020-08-03 10:49:22 -06:00
Michael Ossmann
89f4d79e96 LNA915: add copy of TSLP-7-1 footprint to local library and update 2020-08-03 10:48:54 -06:00
Michael Ossmann
e93d70eddc Merge pull request #756 from mossmann/spi-names
adopt OSHWA convention for SPI signal names
2020-07-26 07:53:43 -06:00
Michael Ossmann
eccd5a64f2 travis: use newer OSX image to fix bundle error 2020-07-26 07:41:53 -06: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
Michael Ossmann
e20fd29502 travis: use newer OSX image to fix bundle error 2020-07-26 07:35:52 -06:00
Michael Ossmann
8bd99bd175 Merge pull request #707 from miek/transceiver
Clean up transceiver modes & fix invalid data on start of TX/RX
2020-07-26 07:31:00 -06:00
Michael Ossmann
40d7a07ac3 Merge pull request #766 from mossmann/travis-osx
travis: use newer OSX image to fix bundle error
2020-07-26 07:12:16 -06:00
Michael Ossmann
53197decb2 travis: use newer OSX image to fix bundle error 2020-07-26 07:01:21 -06:00
Michael Ossmann
5e6a2b5d95 adopt OSHWA convention for SPI signal names
https://www.oshwa.org/a-resolution-to-redefine-spi-signal-names
2020-07-03 16:37:15 -06:00
Michael Ossmann
8e310bdf63 LNA915: redesign around GRF6011 failsafe switch
fits in SMA-KIT-1.5MF inline SMA enclosure
2020-06-22 22:35:52 -06:00
Michael Ossmann
124b85b7df LNA915: correct minor layout errors 2020-06-21 09:59:29 -06:00
Michael Ossmann
62c36d8405 LNA915: update to KiCad 5.1 2020-06-21 09:41:14 -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
Mike Walters
1c091a10bf libhackrf: Zero-out initial transfer buffers 2020-02-12 18:53:59 +00:00
Mike Walters
54bdb86a89 Fix CPLD update 2020-02-12 18:53:59 +00:00
Michael Ossmann
7d900268de fix compiler warnings 2020-02-11 16:59:59 +00:00
Michael Ossmann
c0aed2edb7 firmware: clean up transceiver modes 2020-02-11 16:59:59 +00:00