265 Commits

Author SHA1 Message Date
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
Michael Ossmann
31c82a879a cleaned up signal source mode 2014-08-11 22:58:11 -06:00
dovecho
7bdc499301 Minor changes to tx_callback
Finalize the error procedure that was accidentally deleted.
2014-07-06 00:34:40 +08:00
dovecho
8e5de3b4a8 Add signal source mode to hackrf_transfer
Now hackrf_transfer can act as an analog signal source to generate a
pure SINE wave at the given frequency.
2014-07-06 00:10:07 +08:00
Michael Ossmann
815d1f640d readability suggestion from the likely less sleep deprived 2014-03-16 10:57:15 -06:00
Michael Ossmann
f61e9d2bd7 write unsigned chars to .wav file instead of signed chars 2014-03-16 10:31:17 -06:00
bvernoux
88becad449 hackrf_transfer:
* Fixed printf() with u64 problems/warnings.
* Fixed Wav header option -w and also tested with file >4GB (on Win8.1).
2014-03-16 14:48:41 +01:00
Michael Ossmann
0fab3157c3 improved hackrf_transfer help for gain options and changed the letter for a couple switches 2014-03-14 10:45:53 -06:00
Michael Ossmann
d4a5c2290b replaced set_freq_if() with set_freq_explicit() and implemented explicit tuning option in hackrf_transfer 2014-03-13 16:06:51 -06:00
Michael Ossmann
7c3f6340ed HackRF One antenna port power control in firmware, libhackrf, and hackrf_transfer 2014-03-12 17:21:49 -06:00
Michael Ossmann
d051c42e3a increased maximum tuning frequency from 6800 MHz to 7250 MHz 2014-03-03 14:07:48 -07:00
Michael Ossmann
fbe4c481f2 reduced minimum tuning frequency from 5 MHz to 0 Hz 2014-03-03 12:21:28 -07:00
Ben Gamari
b3f6134fc1 hackrf_cpldjtag: Update for new hackrf_cpld_write interface 2013-09-14 18:24:26 -04:00
Michael Ossmann
ed805dc370 hackrf_transfer usage() update to warn people about -w 2013-06-26 12:48:10 -06:00
Michael Ossmann
474c40b8c2 trying to fix "0.000 MHz" output bug that only affects certain people 2013-06-26 12:43:59 -06:00
Ian Bobbitt
91307c31bd Fixing typo in usage text 2013-06-20 21:37:45 +00:00
Hoernchen
56830da123 tools: x64 fixes for msvc 2013-06-11 13:27:34 +02:00
Hoernchen
05008fbe48 tools: fix more warnings 2013-06-11 12:59:02 +02:00
Michael Ossmann
d55a591175 fix printf format warnings 2013-06-10 08:03:14 -06:00
Hoernchen
8ab20d5d35 tools: operator precedence, precision 2013-06-09 01:04:32 +02:00
Hoernchen
fe7558fcf3 lib/fw: rename the sample rate function 2013-06-09 00:09:46 +02:00
Michael Ossmann
f522e8a326 Merge pull request #75 from Hoernchen/siclock
see commits
2013-06-07 20:34:28 -07:00