Commit graph

387 commits

Author SHA1 Message Date
Ryan Tucker
1211fd3f48 host: bladeRF-cli: skip init if loading FPGA
If the -l option is specified to bladeRF-cli, assume there is no
FPGA image loaded and skip the initialization part of bladerf_open.

This literally cuts bladeRF-cli -l time in half (4.8 s to 2.4 s)
because of the lengthy AD9361 init.  Additionally, it provides an
escape from situations where the FPGA needs to be reloaded to get
out of a bad state.
2017-12-21 12:55:04 -05:00
Vanya A. Sergeev
0b644a4582 bladeRF-cli: fix end of table fields in printset parameter table 2017-12-21 12:55:03 -05:00
Vanya A. Sergeev
93b2645228 bladeRF-cli: annotate print/set help with bladeRF1 specific parameters 2017-12-21 12:55:01 -05:00
Vanya A. Sergeev
fd4638c0ee bladeRF-cli: rename rx mux setting from BASEBAND_LMS to BASEBAND
for cross-compatibility across bladerf1 & bladerf2.
2017-12-21 12:55:01 -05:00
Vanya A. Sergeev
0b3605805a bladeRF-cli: update canned man page with peek/poke changes 2017-12-21 12:55:01 -05:00
Vanya A. Sergeev
291d231c08 bladeRF-cli: add board specific qualifier to printset parameters 2017-12-21 12:55:01 -05:00
Vanya A. Sergeev
1fda0c3ef3 bladeRF-cli: add board name to report by info cmd 2017-12-21 12:55:01 -05:00
Vanya A. Sergeev
3eebf4dd15 bladeRF-cli: check fpga loaded before disarming triggers in rxtx shutdown 2017-12-21 12:55:01 -05:00
Ryan Tucker
150222a51e bladeRF-cli: add 'adi' option to peek and poke commands
followup to 82736df6
2017-12-21 12:55:00 -05:00
Robert Ghilduta
8c125e9ec5 Add 'adi' option to peek and poke commands in bladeRF-cli 2017-12-21 12:55:00 -05:00
Vanya A. Sergeev
bccd7e19f7 libbladeRF: migrate api to 64-bit frequency 2017-12-21 12:54:58 -05:00
Robert Ghilduta
339258d56e bladeRF-cli: changelog and bump version to v1.5.1 2017-12-07 21:11:51 -08:00
Robert Ghilduta
68bf8e231a Add string parsing functions
The line to argumenet parser uses a two pass approach. The first pass
finds beginning and end of arguments, and counts the number of quotes.
The second pass copies the characters into the argument buffers.
2017-12-07 20:34:33 -08:00
Robert Ghilduta
dccc4edc2f Filenames are starting to become ambiguous without full pathnames 2017-12-07 17:10:28 -08:00
Robert Ghilduta
dcc7647fef bladeRF-cli: changelog and version bump ( v1.5.0 ) 2017-07-06 08:27:47 -07:00
Robert Ghilduta
fe718e8f70 bladeRF-cli: add AGC print and set commands
The AGC can be enabled by running set agc on, and it can be disabled by running
set agc off.
2017-07-06 08:27:47 -07:00
Robert Ghilduta
e7fb00c683 bladeRF-cli: add cal table agc rx functionality 2017-07-05 08:59:08 -07:00
Robert Ghilduta
7aff155a97 libbladeRF: add gain specific mean errors to DC calibration table
The DC calibration table will now include mean residual errors for 3 different
gains (that will be used by the AGC amont other things) including:
    Max : LNA=6dB, RXVGA1=30dB, RXVGA2=15dB
    Mid : LNA=6dB, RXVGA1=30dB, RXVGA2= 0dB
    Low : LNA=3dB, RXVGA1=12dB, RXVGA2= 0dB

The DC cal table version has been bumped to 2. This commit will allow backward
compatibility with existing DC cal tables.
2017-07-05 08:59:08 -07:00
Jon Szymaniak
3734f5c46a bladeRF-cli: Corrected incorrect frequency increment in help text
As of 1154ef7b, the calibration table generation uses a default of
10 MHz increments. This was changed due to the tradeoff between
improved results and a longer calibration run-time.

Fixes #480
2016-07-12 18:45:19 -04:00
Jon Szymaniak
0b6c76f848 bladeRF-cli: Updated to v1.4.0 2016-05-22 19:40:00 -04:00
Jon Szymaniak
3b96363cd6 bladeRF-cli: Disarm triggers when shutting down streams
If streams are blocked on triggers, attempts to close the CLI or
stop a stream will "stall" for the duration of the stream timeout.

Generally, timeouts will be set to long values when working with
triggers, yielding a particularly nasty user experience. Therefore,
attempts to disarm triggers are when asked shut down a stream.
2016-05-22 19:20:27 -04:00
Jon Szymaniak
8b1e84b0b6 bladeRF-cli: Labeled smb_mode output more explicitly 2016-05-22 19:20:27 -04:00
Jon Szymaniak
85833dbb10 bladeRF-cli: Touched up trigger output 2016-05-22 19:20:27 -04:00
Jon Szymaniak
4365e75d8e bladeRF-cli: Added deprecation notice to mimo command
Use `set smb_mode` and `print smb_mode`.
2016-05-17 00:20:02 -04:00
Jon Szymaniak
cfb8362223 bladeRF-cli: Fixed additional invalid argv access in mimo 2016-05-17 00:20:02 -04:00
Jon Szymaniak
b783694f84 bladeRF-cli: Fixed mimo segfault
Print usage if an insufficient number of args are provided.
Previously, this would perform an invalid argv access.
2016-05-17 00:20:02 -04:00
Jon Szymaniak
a658a010d7 bladeRF-cli: Added print/set command for smb_mode
This print/set option supersedes the `mimo <mode>` command and
utilizes the new libbladeRF API calls for SMB clock port control.
2016-05-17 00:20:01 -04:00
Jon Szymaniak
3b99bbe5e0 bladeRF-cli: Use high-level trigger API, trigger param & output reformatting
- Use high-level trigger API functions instead of low-level trigger
    control register accesses to allow for future growth of functionality.

- Change parameter order to [<signal> <tx | rx> ...]
    This is intended to better match command output and be more intuitive.
    (The signal is first, as it is the main item being configured).

- Modified and and reformatted `trigger` command output to be more
    consistent with other commands.
2016-05-17 00:20:01 -04:00
Jan Dohl
8cc5ff27fe bladeRF-cli: Added trigger control support 2016-05-17 00:20:01 -04:00
Jon Szymaniak
5367663638 bladeRF-cli: Use str2bool() for xb 300 pa/lna control 2016-04-25 19:39:29 -04:00
Robert Ghilduta
2535edb9fe bladeRF-cli: Added XB300 Amplifier support commands 2016-04-25 19:03:34 -04:00
Jon Szymaniak
7d84606bdf bladeRF-cli: Fixed uninitialized return status
The incorrect variable was set in 538e2d7987.
2016-04-14 17:58:43 -04:00
Jon Szymaniak
538e2d7987 bladeRF-cli: Fixed bladeRF-cli exit on FW/FPGA version mismatch
A status check needed an override for the situation where a user
was loading and incompatible FW or FPGA version.

Fixes #466.
2016-04-14 12:44:51 -04:00
Ryan Tucker
c63143391b generate.bash: gracefully handle pandoc failures 2016-02-14 14:11:56 -05:00
Jon Szymaniak
e472cde71d bladeRF-cli: Added newline in firmware loading text 2016-01-16 15:23:58 -05:00
Jon Szymaniak
74bc5e9657 bladeRF-cli: Addressed build issues cause by endianess macros
Use CONST variants of macros when assigning constants.

For values that are not constants, the declaration and assignments
have been separated just to avoid any potential future C89
shenanigans.
2016-01-11 23:38:02 -05:00
Jon Szymaniak
b2268b5b4d bladeRF-cli: Updated to v1.3.1 2016-01-07 16:49:57 -05:00
Jon Szymaniak
5d4e16725f bladeRF-cli: Addressed warning from GCC -Os in rxtx.c
host/utilities/bladeRF-cli/src/cmd/rxtx.c:753:8: error: ‘status’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
     if (status == ETIMEDOUT) {
        ^

Initialize state of `status` to CLI_RET_UNKNOWN.
2016-01-04 09:58:28 -05:00
Jon Szymaniak
6822782cde bladeRF-cli: Addressed warnings from GCC -Os in printset.c
host/utilities/bladeRF-cli/src/cmd/printset.c:601:12: error: ‘lut_len’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
     size_t lut_len;
            ^
host/utilities/bladeRF-cli/src/cmd/printset.c:600:31: error: ‘lut’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
     const struct xb_gpio_lut *lut;
                               ^
host/utilities/bladeRF-cli/src/cmd/printset.c:642:12: error: ‘lut_len’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
     size_t lut_len, i;
            ^

Default lut_len to 0 and perform a sanity checks on lut & lut_len.
2016-01-04 09:58:28 -05:00
Jon Szymaniak
cb74dca267 bladeRF-cli: Addressed warning from GCC -Os in poke.c
bladeRF/host/utilities/bladeRF-cli/src/cmd/poke.c:97:20: error: ‘f’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
             status = f( state->dev, (uint8_t)address, (uint8_t)value );
                    ^

Initialize f to NULL to calm GCC. In the cases where f is not assigned,
we should be erroring out at line 91. NULL check is performed on line
96.
2016-01-04 09:58:10 -05:00
Jon Szymaniak
420d2f32bc bladeRF-cli: Updated to v1.3.0 2015-12-30 23:04:09 -05:00
Jon Szymaniak
8c250d6440 bladeRF-cli: Added important details to jump_to_boot help text 2015-12-28 23:21:19 -05:00
Jon Szymaniak
2d166cb2c2 bladeRF-cli: Note 'set frequency <value>' deprecation
Lead users away from using this shorthand in favor of setting
modules individually. This is intended to help avoid cases where
users see PLL artifacts, despite not actually needing modules
tuned to the same frequency.
2015-12-28 23:00:14 -05:00
Jon Szymaniak
aa581fb301 bladeRF-cli: Fixed typo in cal help text 2015-12-28 22:46:49 -05:00
Jon Szymaniak
1154ef7bd9 bladeRF-cli: Use DC calibration routines from host/common
Calibration and DC table generation now utilize the routines found
in host/common.

Although these do take noticably longer to execute, they generally yield
better results than the prior implementation.
2015-12-28 22:29:04 -05:00
Jon Szymaniak
9ea16c4e3e bladeRF-cli: Added fw_log command
This command allows the FX3 firmware's log buffer to be read
to a file.
2015-12-28 16:10:39 -05:00
Jon Szymaniak
35ff2e5d25 bladeRF-cli: Corrected formatting of VCTCXO tamer mode state 2015-12-14 15:29:59 -05:00
Jon Szymaniak
4b2845ca16 bladeRF-cli: Print readback of VCTCXO tamer mode after setting it 2015-12-14 15:29:59 -05:00
Jon Szymaniak
347613e858 bladeRF-cli: Typo fix for 'set vctcxo_tamer disabled' 2015-12-14 15:29:59 -05:00
Jon Szymaniak
44af654b12 bladeRF-cli: Added print/set support for VCTCXO tamer 2015-12-14 15:29:59 -05:00