Only seeing this warning with GCC - haven't observed this with
Clang or Coverity scans.
host/libraries/libbladeRF/src/device_identifier.c:121:22: error: ‘val’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
value[i] = tolower((unsigned char) c);
^
host/libraries/libbladeRF/src/device_identifier.c:175:34: note: ‘val’ was declared here
char *dev_id, *token, *arg, *val, *saveptr;
^
Addressing this by initializing ptrs to NULL and status variables to
BLADERF_ERR_UNEXPECTED. Added NULL pointer checks.
Per the libbladeRF API documentation, it is recommended to keep the RX
and TX frequencies >= 1 MHz apart. For consistency, the default
frequencies have been changed to follow this recommendation.
Additionally, the default frequencies have been moved within the 2.4 GHz
ISM band.
This provides a non-blocking variant of bladerf_submit_stream_buffer(),
which provides API users with more control over how they might want
to handle asynchronous buffer submission.
This API functionality has been exposed to allow users to implement
schemes similar to that used to address Issue #438.
This fixes issue #438, in which the bladerf_sync_tx() implementation
was limited by the number of transfers, and not taking advantage
of the available TX buffers (beyond N=<num_transfers>).
This is addressed by allowing the bladerf_sync_tx() context to defer
buffer submission to the sync TX callback handler when it is unable to
submit filled buffers.
Once assigned the responsibility of submitting deferred (filled)
buffers, the sync TX callback will continue to do so until
no filled buffers are available. At this point, the callback
relinquishes its submission duty back to the bladerf_sync_tx() context.
This is one step towards addressing issue #438; we must first
know that we are unable to submit a buffer so that we can defer
its submission to a later callback.
This will be returned by API functions when an operation would need
to block to complete, but the caller has requested non-blocking
operation. In this situation, the caller may need to wait and
resubmit the request at a later time.
Adding the ability to set the SMB frequency when in MIMO master mode.
Also fix a bug where attaching the xb200 and setting MIMO master
would turn off the other clock not allowing an xb200 enabled device
to ever be a master clock supplier.
Being able to set the master frequency is useful when you want to
lock test equipment to the bladeRF oscillator.
It appears that the voltage across the LEDs is always large
enough to keep them ON despite the output voltage.
A potential workaround for this rev of the XB100 is to use the
directionality of the LED IO pins to turn the LED on/off.
Both the host and NIOS II FPGA retuning modes now make use of
FPGA v0.4.0's atomic write of the LMS6002D NINT and NFRAC PLL registers.
This helps avoid changing the PLL multiple times when attempting to
configure it.
While we could read back the mux state via gpio to infer what filters were
previously set, we don't know if the user had selected them explicitly or
had been using the auto_1db or auto_3db filters. Since it's ambiguous, we
should instead apply a default so that users can expect consistent results.
Handling of the XB-200 hard and auto filters is separated into two
paths to avoid the confusion introduced in the fix for #404.
xb200_set_filterbank is the internal API entry point for the external
bladerf_xb200_set_filterbank. If the configured filter is a hard
filter, then internal state is updated and set_filterbank_mux is
invoked to realize the hardware changes.
If the configured filter is an automatic filter, then internal state
is updated and xb200_auto_filter_selection() is called with the
currently tuned frequency for specificed module.
xb200_auto_filter_selection() then invokes set_filterbank_mux to
realize the hardware changes.
Failures have been observed when using FPGA tuning to retune
between vastly different frequencies. It appears that in cases
where significant VCOCAP changes take place, much longer delay between
VCOCAP updates and VTUNE reads are needed than currently utilized in the
NIOS II implementation.
Until this is resolved, host tuning is being set as the default mode,
which does not exhibit this failure because register access overhead
incurs more than ample delay.
Per CID 1288660 and CID 1288661, these cases were the only times
these were accessed without holding the buffer management lock.
Although there shouldn't be a race here, this change is introduced to
maintain consistency with other accesses of the sync i/f state info.
This addresses an item picked up by Coverity. Defects in bands[] or
frequency checks could potentially cause an out-of-bounds memory access.
A bounds check has been added to avoid an invalid access, should one of
the aforementioned defect ever creep in.
See "Figure 9: TX data interface" in the LMS6002D data sheet for the
register stages that drive this requirement.
Due to a extra clock cycle delay in bladeRF FPGA <= v0.3.3, we were
"getting away" with a 2-sample 0-pad. However, FPGA v0.3.4 removes the
extraneous delay, which requires us to end the burst properly, with 3
zero samples.
When searching for FPGA bitstreams or other files, we should be
searching locations relative to the installation prefix.
In an effort to avoid breaking existing packaging scripts, the
previously used paths "/usr/share/Nuand/bladeRF" and
"/etc/Nuand/bladeRF" have been kept in the search list, but at a lower
priority than the items with the installation prefix.
The fix for issue #394 introduced another defect via:
/* Update state information regarding automatically selected filter.
* Invalidate the entry if we're not performing automatic selection. */
if (filter == BLADERF_XB200_AUTO_1DB || filter == BLADERF_XB200_AUTO_3DB) {
dev->auto_filter[module] = filter;
} else {
dev->auto_filter[module] = -1;
}
The problem is that xb200_auto_filter_selection() ends up calling this with
filter set to the desired filterbank. We should only apply this state update
when getting called from bladerf_xb200_set_filterbank(), and not when we're
updating the filter selection from xb200_auto_filter_selection().
Users no longer have to enter the entire serial number when using
bladerf_open() or bladerf_open_with_devinfo(). Instead, the
shortest unambiguous subset (starting at the first character) can
be used.
For example, for a bladeRF with serial f12ce1037830a1b27f3ceeba1f521413,
one could open it via the device string:
"*:serial=f12c"
If the requested serial number subset is ambiguous, then libbladeRF
will open whichever matching device it encounters first.