386 Commits

Author SHA1 Message Date
Mike Walters
cf64ccc058 Fix up datatypes 2016-12-27 21:08:12 +00:00
Mike Walters
1bd4c9a846 Rearrange fftw output 2016-12-27 21:08:12 +00:00
Mike Walters
27b8f674da Fix input copy loop 2016-12-27 21:08:12 +00:00
Mike Walters
a15bff3acf Scale input samples 2016-12-27 21:08:12 +00:00
Mike Walters
cb53e60a0d Don't increment power 2016-12-27 21:08:12 +00:00
Mike Walters
c73a1d56a7 Calculate log power 2016-12-27 21:08:12 +00:00
Dominic Spill
6db1849b74 Add some fftw magic to proceedings 2016-12-27 21:08:12 +00:00
Dominic Spill
dc0b5a5798 Fix missed scan -> sweep changes 2016-12-27 21:08:12 +00:00
Dominic Spill
86bde9f4c2 Remove unused helper functions from hackrf_sweep 2016-12-27 21:08:12 +00:00
Dominic Spill
57e0924e0d Rename scan to sweep 2016-12-27 21:08:12 +00:00
Mike Walters
c96156476f Switch all output from stdout to stderr to allow for piping samples 2016-12-27 21:08:12 +00:00
Dominic Spill
0245204ad9 Add initial hackrf_scan skeleton 2016-12-27 21:08:12 +00:00
Dominic Spill
264e825a4d Simplify cmake config for adding tools 2016-12-25 11:03:25 +00:00
Dominic Spill
c54e31f397 Add support for multiple operacake boards connected to one HackRF 2016-12-23 21:59:45 +00:00
Dominic Spill
11ef7f74f6 Tidy clang build warnings
- Remove transceiver enums from hackrf.h
 - convert uint64_ts to int64_ts for frequency maths
2016-09-15 13:50:50 -06:00
Stefan `Sec` Zehl
ad6f9df89a First receive streaming implementation 2016-08-13 21:54:12 +02:00
Radoslav Gerganov
8ba15ad0b1 Make the 'do_exit' flag static
Both libhackrf and hackrf_transfer are using boolean flag named
"do_exit" which is not static. This is problematic because the flag is
used for different things. This patch fixes the problem by making the
flag static in both places.
2016-08-05 16:53:36 +03:00
Josh Blum
cccde1b431 hackrf_transfer - cast with uint32_t
The compiler (MSVC 2013) didnt have the uint typedef,
switched to using uint32_t which is the type of sample_rate_hz.
2016-07-20 17:37:35 -07:00
Michael Ossmann
ab58c3c29c Merge pull request #261 from rgerganov/std-in-out
Add support for transmitting/receiving from stdin/stdout
2016-07-20 15:20:15 -06:00
Dominic Spill
1c34b19fb3 Merge uhwsin PPM correction changes 2016-07-20 22:00:49 +01:00
Mike Davis
c1d1a483aa Added flags + code to open device by index or serial number 2016-06-21 14:15:16 +02:00
Dominic Spill
0e0119394d Fix sign comparison warnings 2016-05-30 18:55:04 -06:00
Radoslav Gerganov
51419b7efc Add support for transmitting/receiving from stdin/stdout
When '-' is used for filename, write samples to stdout when receiving or
read samples from stdin when transmitting. This allows using
hackrf_transfer in shell pipes with tools like csdr.
User info messages are written to stderr.
2016-05-29 13:41:34 +03:00
Dominic Spill
3f4d1a44e7 Apply C89 patch from guruofquality to support older compilers 2016-01-26 08:16:25 +00:00
Dominic Spill
7f41ab4d20 Merge pull request #218 from dominicgs/spiflash_length_default
Default SPI flash read length to size of SPI flash
2016-01-14 18:22:10 +00:00
Dominic Spill
57ee59ceea Add error handling to hackrf_trasfer argument parsing 2016-01-14 17:33:00 +00:00
Dominic Spill
327e08a16c Merge pull request #191 from ckuethe/friendlier_rates
allow user to specify frequencies in scientific notation
2016-01-13 23:01:04 +00:00
Peter
d41704a48e Update hackrf_transfer.c 2016-01-13 22:24:18 +08:00
Peter
fed60c571c Update hackrf_transfer.c
Intro:
Some of the Hackrf board use a bad performance crystal, it will cause some program can't work---such as GNSS(GPS) simulation.  Most GPS receiver can capture the satellite
when the doppler within 10KHz, but 10ppm bias of the crystal will cause  15Khz doppler.  And my hackrf board uses a 16ppm crystal :(  normal
Of course, I can replace the crystal or use a external clock. But for most people, add a ppm correct function to hackrf_transfer is useful.
How to use:
1, measure your crystal's error
You can use a precision  counter to measure it.
Connect the hackrf's "clock out" to the counter, get the frequency Fh, then ,
ppm = (Fh - 10000000)/10 
 
You can use a standard clock source such as OCXO, TCXO, or Atom Clock, and a counter
to measure the crystal error too.

2, add an argument "-C ppm " when you use hackrf_transfer.

Eg. , your  crystal error is -8ppm ( In other words , your clock is slower than the standard clock), then you should add "-C -8" follow the hackrf_transfer command.

Hope you can understand my poor English:)

--------------------------
Thanks to Michael Ossmann;
Thanks to Jared Boone ;
Thanks to Benjamin Vernoux ;
Thanks to GPL.
2016-01-13 22:12:42 +08:00
Dominic Spill
a062596819 Default SPI flash read length to size of SPI flash
Fixes #214
2015-09-09 12:08:28 +01:00
Michael Ossmann
a1cbec96c6 credit for lines of code belongs in commit log 2015-07-16 08:35:38 -06:00
Chris Kuethe
2f422bc33a allow user to specify frequencies in MHz and scientific notation 2015-07-10 11:59:28 -07:00
Jared Boone
8cfa81f40c Add hackrf_spiflash verbose option, make default not-verbose. 2015-07-10 10:32:55 -07:00
Michael Ossmann
078bd869eb Merge pull request #188 from scateu/master
Add file repeat TX mode [-R].
2015-07-08 16:12:24 -06:00
Michael Ossmann
7d7992d5d6 Merge pull request #177 from ckuethe/master
Explain which gain setting was unacceptable
2015-07-08 16:11:51 -06:00
Peter Shipley
05416031c2 ChunkSize should be size entire file in bytes minus 8 bytes
Ref : https://ccrma.stanford.edu/courses/422/projects/WaveFormat/
2015-07-08 15:36:41 -06:00
Chris Kuethe
c0c8d619ab Merge branch 'master' of https://github.com/mossmann/hackrf 2015-07-08 11:44:33 -07:00
scateu
2ca87b942a Add file repeat TX mode [-R]. 2015-07-08 18:44:22 +08:00
Dominic Spill
ce9ad343e0 Fix issue #113 - CPLD update fails on Windows
Using the patch from @supersat
2015-07-06 21:25:01 +01:00
Chris Kuethe
94b37453b7 these don't need to be errors any more 2015-05-29 00:32:20 -07:00
Chris Kuethe
2570f35260 vga gain must be a multiple of 2, not 8
allow both args to be checked before bailing out
2015-05-25 17:38:24 -07:00
Chris Kuethe
ea46e4435b explain which gain setting was wrong
because sometimes you don't see your typos at 3am.
2015-05-25 17:31:53 -07:00
Heikki Hannikainen
c0b3638cce Do not break hackrf_open() API, provide a hackrf_open_by_serial() instead for the new functionality. 2015-02-24 07:43:45 +02:00
Heikki Hannikainen
d10dd1945c hackrf_info: Adjust output to print USB device identification string and device index number, before trying to open. 2015-02-24 01:13:48 +02:00
Heikki Hannikainen
856d9a6354 libhackrf: hackrf_device_list() API for device enumeration and opening of any device (with or without serial numbers).
hackrf_info uses hackrf_device_list to list devices, with or without serial number API support.
2015-02-24 01:13:42 +02:00
Heikki Hannikainen
33e20bda0c hackrf_cpldjtag: added -d for device serial number 2015-02-24 01:13:36 +02:00
Heikki Hannikainen
6aa5f00186 hackrf_spiflash: added -d for device serial number 2015-02-24 01:13:31 +02:00
Jared Boone
9dbe967bf2 Serial number firmware and host-side changes. Very hacky at this point.
Among the TODOs:
* Refactor obtaining LPC serial number and chip ID into separate API and header/source files. Remove from main().
* Create a usb_set_serial_number_descriptor() or similar function to be called before USB stack is started.
* Ensure USB serial number descriptor is valid even if code forgets to initialize the serial number before the USB stack is started. May be as simple as providing default initializer for usb_descriptor_string_serial_number[].
* Create a #define/constant for the usb_descriptor_string_serial_number length.
* Identify what's causing intermittent crashes in hackrf_transfer when no serial number is specified. I'm probably misusing getopt.
* Permit serial number without leading zeros so you don't have to type as much.
* Add support for serial number argument in other hackrf_* tools.
* Provide libhackrf support for enumerating multiple HackRFs, so that hackrf_info can list all devices. May require an additional libhackrf function, outside of hackrf_open().

...and anything else that makes this less of a hack.
2015-02-23 19:23:31 +02:00
Michael Ossmann
109d11558e fixed compiler warning 2014-08-21 22:05:20 -06:00
Michael Ossmann
741941f838 s/Jawbreaker/HackRF/ 2014-08-15 12:31:25 -06:00