This should help clarify the cause of file-related errors in
cases where folks are trying to rx into a location where they
do not have write permissions.
Updated 'print' to note that all parameters are now printed when
no arguments are provided.
Adjusted print and set widths to yield the same formatting in the
bladeRF-cli help output. (Closes#422)
Added help text entries for xb_* commands. (Closes#423)
Various items supported by 'print' have been made a bit more
consistent in terms of spacing.
Units have been separated from numbers, as typically recommended by
NIST.
Some options have been added to the printset_table to specify how
to group items when printing all of them (and to skip items).
The print command invoked without arguments in bladeRF-cli
is modified to invoke all the print/set parameter
handlers in order. Old behavior was to display usage note.
The leading and trailing cosmetic newlines were moved from the
individual printset handlers to cmd_print() to allow for a concise
table.
Original usage information is still available via help command.
When the file to TX does not have any sort of "padding" zero samples
at the end, there's a risk that we'll turn off the TX front-end
before the samples are actually transmitted.
As a "quick and dirty" solution, we just flush (num_buffers + 1)
buffers worth of 0+0j after completing the TX of the file.
Moved this logic to zeroize_next_delimeter() to improve readability.
This has also been changed to remove the use of an unnecessary
variable-length array, which would cause build failures with
some compilers (e.g., MSVC).
generate.bash uses pandoc to generate both documentation and code from a
markdown document. For code, pandoc is also used as an intermediate
step, but the pandoc format varies between versions 1.12.x and 1.13.x.
These changes handle this format change and introduce some additional
improvements to make the script more resilient to format changes.
This fixes the following error while building man pages on NixOS:
[100%] Generating bladeRF-cli.1
Constant subroutine main::LC_ALL redefined at /nix/store/482l1wbyrbqzy8pm0mh9psvk7f7x2qnf-perl-5.20.1/lib/perl5/5.20.1/Exporter.pm line 66.
at /nix/store/glg7vc73js5pmhg23c452105ngcqw56y-help2man-1.46.4/bin/.help2man-wrapped line 29.
Prototype mismatch: sub main::LC_ALL () vs none at /nix/store/482l1wbyrbqzy8pm0mh9psvk7f7x2qnf-perl-5.20.1/lib/perl5/5.20.1/Exporter.pm line 66.
at /nix/store/glg7vc73js5pmhg23c452105ngcqw56y-help2man-1.46.4/bin/.help2man-wrapped line 29.
help2man: can't get `--help' info from ./bladeRF-cli
Try `--no-discard-stderr' if option outputs to stderr
make[2]: *** [host/utilities/bladeRF-cli/bladeRF-cli.1] Error 127
make[1]: *** [host/utilities/bladeRF-cli/CMakeFiles/bladeRF-cli-manpage.dir/all] Error 2
make: *** [all] Error 2
Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
In more recent LMS docs, SPARE bits have become documented. These
changes are based upon the LMS6002 Programming and Calibration Guide
(rev 1.4 2013-06-11)
Before attempting to open any devices when going into interactive mode,
running a script, or executing "-e" arguments, bladeRF-cli now checks
for any FX3-based devices in bootloader mode, and alerts the user
to their presence, recommending that he or she see 'help recover'
for more information.
Previously, a libbladeRF log_info() message was used to alert users
to the presence of FX3-based devices enumerating in bootloader mode.
This was removed to alleviate noise and because it was buried in
backend-specific code.
Given that the bladeRF-cli is intended to be the "go to" program for
debugging the state of a bladeRF device, this alert is more
appropriately located in this program.
This was previously dependent on libusb-specific code. The functionality
added to libbladeRF is now used in order to support recovery when
using the Cypress driver backend (as well as any future back
implementations.)
Moved function to get string description to conversions.c.
There's a similar function within libbladeRF's backend.c, but that
is intended to be used in the device information string; this is
intended to be a bit more humand-readable.
An optional `strict` parameter has been added to the interactive
mode `probe` command. Specifying this parameter instructs the command
to treat the case where no devices are found as an error.
Without specifying this `strict` parameter, the command will operate
as it has previously, treating this case as normal operation.
The handling of the --probe command-line option now uses `probe strict`,
as this provides shell scripts an easy way to determine if devices were
or were not found.
Visual Studio 2013 now includes these headers, so they have
been moved as not to conflict (even though they are intended to
be equivalent.)
Our stdbool.h was providing an incorrect typedef; sizeof(bool)
should have been 1, not sizeof(int).
Per http://msdn.microsoft.com/en-us/library/tf4dy80a.aspx:
"In Visual C++4.2, the Standard C++ header files contained a typedef
that equated bool with int. In Visual C++ 5.0 and later, bool is
implemented as a built-in type with a size of 1 byte. That means
that for Visual C++ 4.2, a call of sizeof(bool) yields 4, while in
Visual C++ 5.0 and later, the same call yields 1. This can cause
memory corruption problems if you have defined structure members of
type bool in Visual C++ 4.2 and are mixing object files (OBJ) and/or
DLLs built with the 4.2 and 5.0 or later compilers."
Failures for the algorithm to converge (i.e., find a turning point in
magnitude) can be avoided if the tested values span the range of valid
calibration values.
It was found that the 'calibrate' command could (incorrectly) be
executed while actively transmitting or receiving, which causes issues.
Since a number of commands already check if the device is currently
streaming, this check has been moved to the main command loop. Command
definitions now denote if they can be executed safely while the device
is streaming via an 'allow_while_streaming' flag.
The flash-related, open, and load commands have had their checks
removed, as they are now covered by the above flag.
The status here is forced to a non-zero value (CLI_RET_MEM) instead
of assuming *every* malloc implementation will set errno to ensure
we don't enter the loop and attempt to use tx_buffer when NULL.
Asking the user if the FX3 is programmed isn't terribly helpful, and
actually causes more confusion. Showing the bladerf_strerror() output
instead is more useful when troubleshooting.