Commit graph

376 commits

Author SHA1 Message Date
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
Jon Szymaniak
5a0e973c0b bladeRF-cli: Address CID1320428 (unchecked return value)
This is intentional.
2015-12-14 14:24:47 -05:00
Jon Szymaniak
7416fb5ae1 bladeRF-cli: Added print/set rx_mux
This addition allows users to inspect and control the
state of the FPGA RX FIFO input mux.
2015-12-09 23:35:23 -05:00
Jon Szymaniak
b83f5276cc bladeRF-cli: Re-added missing 'set xb_gpio[_dir] reg[ister]' support
This regression was introduced around 2015-09-01 when I added support
for accessing individual pins. Support for setting the XB GPIO via
the full register word was intended to be retained, but was not.

This commit re-adds this functionality.
2015-11-06 17:38:25 -05:00
Jon Szymaniak
9b67b91d2b bladeRF-cli: Fixed typo in 'set xb_gpio_dir' usage message 2015-11-06 16:50:19 -05:00
Jon Szymaniak
8ec3f65757 bladeRF-cli: Added more explicit output for BLADERF_ERR_NODEV conditions 2015-10-08 15:49:26 -04:00
Jon Szymaniak
26aaf257f7 bladeRF-cli: Consider fractional samplerate portion for Hi-Speed warning 2015-10-08 12:48:55 -04:00
Jon Szymaniak
6ad132b9d8 bladeRF-cli: Cleaned up error messages in 'set samplerate' 2015-10-08 12:48:55 -04:00
Jon Szymaniak
7a6b983f5f bladeRF-cli: Allow samplerate integer to be zero
This allows rates to be specified via the numerator and denominator
only. For example, to specify Fs = (4.5*684*1e6) / 286

set samplerate rx 0 3078000000 286
2015-10-08 12:48:55 -04:00
Jon Szymaniak
77e913161f bladeRF-cli: Use uint64 conversions when setting sample rate 2015-10-08 12:48:55 -04:00
Brian Padalino
01940e6ebd libbladeRF: Adding ability to set SMB frequency.
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.
2015-09-09 18:34:51 -04:00
Adam Greig
f7f26d5bb7 Add support for setting SMB clock output to arbitrary frequency 2015-09-09 17:58:41 -04:00