291 Commits

Author SHA1 Message Date
Heikki Hannikainen
9b9466f02a libhackrf: The usb firmware reports board type as USB product id. Provide hackrf_usb_board_id_name() to decode that. 2015-02-24 12:15:05 +02: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
893fef3fcf Bug fix, open the correct device in hackrf_device_list_open 2015-02-24 01:28:13 +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
b14d77a173 Adjust debug printf's a bit 2015-02-24 01:13:24 +02:00
Heikki Hannikainen
8e21b9882f Permit serial number without leading zeros so you don't have to type as much. In fact, permit any suffix of the serial number. 2015-02-24 01:13:18 +02:00
Heikki Hannikainen
c9f8bb2a05 libhackrf: refactor serial number searching to hackrf_open_usb() 2015-02-24 01:13:13 +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
6935ad625f Merge pull request #140 from cottsay/lib-suffix-fix
fix lib suffixes in pkgconfig
2014-11-04 23:37:38 -07:00
Scott K Logan
ea47fd4fbf add CMake value to change udev rule destination 2014-09-21 12:26:08 -05:00
Scott K Logan
c7116b4081 fixed lib suffixes in pkgconfig 2014-09-21 12:22:57 -05:00
Michael Ossmann
21ecd70099 incremented udev rule file number to avoid conflicts 2014-08-28 09:29:03 -06:00
Michael Ossmann
a3dbde7a81 moved udev rules from hackrf-tools to libhackrf 2014-08-21 22:01:26 -06:00
Postmodern
2ee29a9e71 Fixed setting of partid in hackrf_board_partid_serialno_read
partid[1] was never being set, so partid[0] would incorrectly be set to partid[1].
2014-08-20 15:29:16 -07: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
716d140dfb libhackrf support for HackRF One USB ID and board ID 2014-03-12 16:29:07 -06:00
Michael Ossmann
9afa1fe984 bumped .so and .pc version numbers to 0.3 2014-02-20 15:24:04 -07:00
Ben Gamari
d21d616576 libhackrf: Rework hackrf_cpld_write to use new firmware interface
We now use a separate USB configuration for CPLD updates. To avoid
misuse of the interface, hackrf_cpld_write is now a one-shot call,
expecting the entire CPLD buffer. The library will then take care that
the device is placed in the CPLD update configuration and the entire
buffer uploaded. Unfortunately, this means that users of the interface
will have substantially fewer opportunities to provide status updates to
the user.
2013-09-14 18:24:26 -04:00
Ben Gamari
693c262134 libhackrf: Stop streaming before killing transfer thread 2013-09-14 18:24:25 -04:00
Michael Ossmann
b056efcaf8 .so and .pc version update 2013-07-26 18:30:46 -06:00
Hoernchen
b33f534da0 firmware, lib: update comments, doc 2013-06-17 12:32:12 +02:00
Hoernchen
3c7bc948f1 lib: if freq 2013-06-16 20:24:07 +02:00
Hoernchen
ecdaf40fb7 lib: un-break msvc 2013-06-11 12:55:10 +02:00
Michael Ossmann
fcae60b77a fix type-punning warning with -fstrict-aliasing 2013-06-10 08:01:03 -06:00
Hoernchen
fe7558fcf3 lib/fw: rename the sample rate function 2013-06-09 00:09:46 +02:00
Sylvain Munaut
791476b422 libhackrf: Update the library with new fractional sample rate API
And send the new USB command

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-06-09 00:08:18 +02:00
Hoernchen
cf8f7644c9 fix indent, fix unused vars 2013-06-07 23:46:45 +02:00
Hoernchen
675c9493e3 lib: rename the define, gcc already defines BIG_ENDIAN 2013-06-07 20:36:50 +02:00
Hoernchen
d3d9038697 lib: actually handle the value returned by the fw when setting the gains 2013-06-07 18:17:55 +02:00
Hoernchen
222d518bb7 lib: make BE people happy 2013-06-07 15:30:49 +02:00
Hoernchen
cd7da974d5 lib: fractional sample rates 2013-06-07 14:29:14 +02:00
Sylvain Munaut
fce132d266 libhackrf: Fix early exit of transfer thread in case of syscal interruption
libusb can return LIBUSB_ERROR_INTERRUPTED and it's not really an error,
just a sign some syscall got interrupted by something. Don't abort on
that.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-06-06 22:55:06 +02:00
Sylvain Munaut
02509f2f44 libhackrf: Add a pkgconfig .pc file to allow auto-discovery of prefix
Shamelessly copied from librtlsdr.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-06-06 22:53:57 +02:00
Hoernchen
b7687c718f lib: fix mingw 2013-05-29 21:08:31 +02:00
Michael Ossmann
14257a0032 fix #define false 1 2013-05-28 22:50:54 -06:00
Hoernchen
233c56c79d libhackrf/firmware: merge txvga gain into one gain range of 0-47 2013-05-29 00:53:41 +02:00
Hoernchen
c2f09c082d lib/msvc: do not swallow the static lib 2013-05-28 22:58:07 +02:00
Hoernchen
e16cafd9a1 host: modify the cmake build system, there is a new top dir cmake file that builds everything 2013-05-28 22:48:40 +02:00
Hoernchen
a9c301cfd4 windows, pt3 2013-05-27 14:02:15 +02:00
Hoernchen
d18159cf62 libhackrf: gain control 2013-05-27 14:01:21 +02:00
Hoernchen
2200e4c109 windows, pt2 2013-05-27 14:01:20 +02:00
Hoernchen
dea06b2732 windows 2013-05-27 14:01:20 +02:00
TitanMKD
b4af69ac38 hackrf-tools fixed make install and added make uninstall feature.
libhackrf added make uninstall feature.
Thanks to horizon for the hint for cmake uninstall script.
2013-05-23 20:53:23 +02:00
TitanMKD
221337793c Moved host/libhackrf/examples to host/hackrf-tools 2013-05-17 01:14:34 +02:00
TitanMKD
bf964e769d New license for libhackrf based on http://opensource.org/licenses/BSD-3-Clause 2013-05-17 00:00:46 +02:00
Jared Boone
d0e609429d Merge branch 'master' of https://github.com/mossmann/hackrf 2013-05-11 16:59:00 -07:00
Jared Boone
8dec5cb31a Tweak C/CXX_FLAGS to separate language standard used for C and C++ files. 2013-05-10 18:12:09 -07:00
TitanMKD
418680aed2 Fixed libhackrf, hackrf_cpldjtag (host) & usb_performance (firmware) to update CPLD through USB.
Use latest CPLD bitstream with following command line:
hackrf_cpldjtag.exe -x hackrf\hardware\jellybean\sgpio_if\default.xsvf
2013-05-09 00:29:42 +02:00
TitanMKD
5225477164 * Modified API hackrf_is_streaming() now it returns an int HACKRF_TRUE when streaming is running.
* Added new hackrf_error especially for streaming to return more details.
* Adding management of usb transfer cancelled for hackrf_stop_rx()/hackrf_stop_tx().
* Added robustness on hackrf_close() to correctly close libusb related stuff even if USB device is removed or other problems.
* Fixed threading problems (start, stop() then start() ...).
* Cleanup the whole code.
2013-05-08 15:03:30 +02:00