This "Queue full" event may occur when using the scheduled
retunes. Since this is an event that the user can respond to
and act upon, an appropriate status/error code has been added.
As of FPGA v0.2.0, the frequency tuning algorithm is run in the FPGA to
eliminate time wasted by communicating LMS6002D registers over USB. This
is now the default if the FPGA version is >= v0.2.0.
This default can be overridden via a BLADERF_DEFAULT_TUNE_MODE
environment variable, with options being "host" or "fpga".
The main landing page in the Doxygen is now filled out with
some general information.
Existing examples have been simplified and moved to
dedicated pages that are linked to from the main page and
relevant sections of the documentation elsewhere.
Explicitly noted user buffer size required by bladerf_get_serial().
Made note of extraneous byte used by bladerf_image structure to
avoid confusion. This extra byte will be kept to avoid breaking
compatibility.
This changeset is directly based upon a patch and suggestions kindly
provided by Marian and Diana from Null Team (www.null.ro) and YateBTS
(www.yatebts.com). The original patch may be found on the issue tracker
for issue #95.
Per issue #95, it has been found that on many Linux-based
USB 3.0 setups, it is not possible to re-connect to a bladeRF after
a previous application using the bladeRF failed to close its device
handle. (For example, as the result of an application crashing or being
killed.)
To recover from this situation, we now perform a USB port reset when
opening the device, prior to attempting to actually access it.
Should this behavior cause any new issues, it can be disabled...
... at compile-time by providing
-DENABLE_LIBUSB_DEV_RESET_ON_OPEN=False to CMake
... at run-time via the bladerf_set_usb_reset_on_open(false),
when the aforementioned compile-time flag is True.
A huge "thank you" goes out Marian, Diana, and everyone at Null Team and
YateBTS!
API functionality to probe for FX3 bootloader devices and download
firmware to detected devices has been introduced.
This is based upon the boot image format/procedure documented in
Cypress's AN76405: "EZ-USB (R) FX3 (TM) Boot Options"
http://www.cypress.com/?docID=49862
The existing bladerf_sync_rx() snippet in the libbladeRF API docs has
been replaced by a more complete snippet in libbladeRF/doc/examples.
From now on, major snippets and examples to be included in
Doxygen-generated documentation shall now be placed in the
libbladeRF/doc/examples directory, and must be buildable and testable.
The Doxygen "snippet" command to shall be used to include the relevant
code from the example program.
libbladeRF: [WIP] Use a simple delay to wait for TX samples in example
API support for timestamp metadata has been introduced. This is made
available when using the newly introduced BLADERF_FORMAT_SC16_Q11_META
format value.
When using the synchronous interface, metadata is exchanged between the
caller and the API via the updated bladerf_metadata structure. Users of
the asynchronous interface must currently manually manage the metadata
headers as desired, as documented in libbladeRF.h.
When using the BLADERF_FORMAT_SC16_Q11_META format in conjunction with
the synchronous interface, it is possible to retrieve the timestamp for
received samples and an indication of overrun. An RX operation may also
be scheduled for at a specific timestamp value the future. Similarly,
bursts of samples can be scheduled to be transmitted at a specific
timestamp value, or at the first available timestamp ("now").
A USB backend based atop of the Cypress CyAPI (which is based atop the
Cypress CyUSB3 driver) has been introduced. This is intended to provide
Windows users with an additional driver to use if they encounter issues
with their USB host controller and libusb.
To build and use this backend, the Cypress FX3 SDK must be installed and
the following CMake flags should be provided:
-DENABLE_BACKEND_CYAPI=Yes -DFX3_SDK_PATH=<path to SDK>
A modified cyusb3.inf is provided in host/drivers/windows/cyusb3. Upon
performing a build this inf file and the associated driver files from
the FX3 SDK will be copied into the "output" directory along with the
bladeRF.dll and bladeRF-cli.exe. To install the driver, point the
Windows driver update to this location and accept the warning about the
driver being unsigned; this occurs because the Cypress driver wasn't
signed with bladeRF VID/PID values.
The libbladeRF device string for this backend is: "cypress"
Many thanks go out to LazyDodo for all his efforts in spearheading the
development of this backend -- much of this code is either his doing or
is directly based upon his efforts.
This addresses issue #309. The XB-100 isn't currently supported via
libbladeRF. This support will come in the future, after the necessary
functionality is presented in the FPGA/firmware to expose this to the
host.
xb_attach() in xb.c was written in a way that would result in a
successful error code being reported when provided with an invalid or
unsupported expansion board type. This has been addressed, with some
cleanup to this function.
In making this change, it was noted that setting BLADERF_XB_NONE was
not disabling an attached expansion board. A FIXME was added here to
draw attention to this; I've registered an issue for this and will
assign it to the author of the XB code.
Top-level API functions now acquire a per-device "control lock" before
performing control, programming, and low-level access operations.
(Specifically, these are the functions that manipulate the device handle
and utilize the FX3 <-> FPGA UART.)
Synchronous data transfer functions now hold a per-device, per-module
"sync lock" to ensure these operations are carried out atomically. The
control lock is also held during sync configuration, as upcoming changes
to introduce metadata support will require flipping some config bits on
the FPGA during this operation.
Only these top-level functions shall acquire these locks; the core logic
code should be able to assume that locks are already acquired.
To alleviate confusion, functions that are *not* part of the API, and
therefore are safe to call within the core logic, are stripped of the
bladerf_ prefix.
Now that pthreads is a required dependency, use of the sync API is
is no longer marked optional in the libbladeRF build.
ENABLE_LIBBLADERF_SYNC and related items have been removed from the
CMake build.
Added the ability to read back the state of FW loopback from devices
running FW v1.7.1. While it is possible to enable FW loopback mode in
v1.7.0 firmware, libbladeRF will now enforce the v1.7.1 requirement so
it can correctly read back and report the FW mode.
bladerf_set_loopback() has also been updated to ensure that the
FW loopback is disabled when switching to an LMS loopback mode.
Corrected a samplerate equation calculation which helps determine how
many transfers should be outstanding over any timeout period at a
specific samplerate. The samplerate should always be greater than the
calculated number, not less than.
This commit introduces 1dB and 3dB rolloff point based filterbank selection.
bladerf_set_frequency() will set the appropriate filter based on frequency.
This is a vestige of earlier code. bladerf_expansion_attach() is the
function that performs the desired functionality.
As such bladerf_xb200_attach() has been made static and renamed in xb.c.
This was limited due to 3.72GHz being the maximum value show in the
LMS6002D programming guide's FREQSEL table. According to a response
on the limemicro-opensource Google group, we should be able to use
the same FREQSEL value from 3.72GHz - 3.8GHz.
Operations that open files (e.g., firmware flash, FPGA load) now
return BLADERF_ERR_NO_FILE instead of BLADERF_ERR_IO when a file not
found. This is intended to help differentiate between user-error in the
aforementioned operations and a device-failure.