.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. .TH BLADERF-CLI "1" "April 2018" "bladeRF-cli 1.5.1-0.2017.12~rc1-2" "User Commands" .SH NAME bladeRF-cli - command line interface and test utility .SH SYNOPSIS .B bladeRF-cli \fI\,\/\fR .SH DESCRIPTION The \fBbladeRF-cli\fP utility is used to flash firmware files, load FPGA bitstreams, and perform other tasks on the nuand bladeRF software-defined radio system\&. For more information on obtaining or building firmware files and FPGA bitstreams, please visit http://nuand.com/\&. .PP bladeRF command line interface and test utility (1.5.1\-0.2017.12~rc1\-2) .SH OPTIONS .TP \fB\-d\fR, \fB\-\-device\fR Use the specified bladeRF device. .TP \fB\-f\fR, \fB\-\-flash\-firmware\fR Write the provided FX3 firmware file to flash. .TP \fB\-l\fR, \fB\-\-load\-fpga\fR Load the provided FPGA bitstream. .TP \fB\-L\fR, \fB\-\-flash\-fpga\fR Write the provided FPGA image to flash for autoloading. Use \fB\-L\fR X or \fB\-\-flash\-fpga\fR X to disable FPGA autoloading. .TP \fB\-p\fR, \fB\-\-probe\fR Probe for devices, print results, then exit. A non\-zero return status will be returned if no devices are available. .TP \fB\-e\fR, \fB\-\-exec\fR Execute the specified interactive mode command. Multiple \fB\-e\fR flags may be specified. The commands will be executed in the provided order. .TP \fB\-s\fR, \fB\-\-script\fR Run provided script. .TP \fB\-i\fR, \fB\-\-interactive\fR Enter interactive mode. .TP \fB\-\-lib\-version\fR Print libbladeRF version and exit. .TP \fB\-v\fR, \fB\-\-verbosity\fR Set the libbladeRF verbosity level. Levels, listed in increasing verbosity, are: .TP critical, error, warning, info, debug, verbose .TP \fB\-\-version\fR Print CLI version and exit. .TP \fB\-h\fR, \fB\-\-help\fR Show this help text. .TP \fB\-\-help\-interactive\fR Print help information for all interactive commands. .SS "Notes:" .IP The \fB\-d\fR option takes a device specifier string. See the bladerf_open() documentation for more information about the format of this string. .IP If the \fB\-d\fR parameter is not provided, the first available device will be used for the provided command, or will be opened prior to entering interactive mode. .IP Commands are executed in the following order: .IP Command line options, \fB\-e\fR , script commands, interactive mode commands. .IP When running 'rx/tx start' from a script or via \fB\-e\fR, ensure these commands are later followed by 'rx/tx wait [timeout]' to ensure the program will not attempt to exit before reception/transmission is complete. .SH "INTERACTIVE COMMANDS" bladeRF-cli supports a scriptable interactive mode. Run \fBbladeRF-cli --interactive\fP to enter this mode. Type "\fBhelp\fP" for a listing of all commands, or "\fBhelp \fP" for more information about . .SS calibrate .PP Usage: \f[C]calibrate\ \ [options]\f[] .PP Perform the specified transceiver calibration operation. .PP Available operations: .IP \[bu] 2 LMS internal DC offset auto\-calibrations .RS 2 .IP \[bu] 2 \f[C]calibrate\ lms\ [show]\f[] .IP \[bu] 2 \f[C]calibrate\ lms\ tuning\ [value]\f[] .IP \[bu] 2 \f[C]calibrate\ lms\ txlpf\ [\ ]\f[] .IP \[bu] 2 \f[C]calibrate\ lms\ rxlpf\ [\ ]\f[] .IP \[bu] 2 \f[C]calibrate\ lms\ rxvga2\ [\ \ \ \ ]\f[] .PP Perform the specified auto\-calibration, or all of them if none are provided. When values are provided, these are used instead of the results of the auto\-calibration procedure. Use \f[C]lms\ show\f[] to read and print the current LMS calibration values. .PP For \f[C]rxvga2\f[], \f[C]I1\f[] and \f[C]Q1\f[] are the Stage 1 I and Q components respectively, and \f[C]I2\f[] and \f[C]Q2\f[] are the Stage 2 I and Q components. .RE .IP \[bu] 2 RX and TX I/Q DC offset correction parameter calibration .RS 2 .IP \[bu] 2 \f[C]calibrate\ dc\ \ [\ ]\f[] .IP \[bu] 2 \f[C]calibrate\ dc\ \f[] .PP Calibrate the DC offset correction parameters for the current frequency and gain settings. If a I/Q values are provided, they are applied directly. \f[C]cal\ rxtx\f[] is shorthand for \f[C]cal\ rx\f[] followed by \f[C]cal\ tx\f[]. .RE .IP \[bu] 2 RX and TX I/Q balance correction parameter calibration .RS 2 .IP \[bu] 2 \f[C]calibrate\ iq\ \ \ \f[] .PP Set the specified IQ gain or phase balance parameters. .RE .IP \[bu] 2 Generate RX or TX I/Q DC correction parameter tables .RS 2 .IP \[bu] 2 \f[C]calibrate\ table\ dc\ \ [\ \ [f_inc]]\f[] .PP Generate and write an I/Q correction parameter table to the current working directory, in a file named \f[C]_dc_.tbl\f[]. \f[C]f_min\f[] and \f[C]f_max\f[] are min and max frequencies to include in the table. \f[C]f_inc\f[] is the frequency increment. .PP By default, tables are generated over the entire frequency range, in 10 MHz steps. .RE .IP \[bu] 2 Generate RX or TX I/Q DC correction parameter tables for AGC Look Up Table .RS 2 .IP \[bu] 2 \f[C]calibrate\ table\ agc\ \ [\ \ [f_inc]]\f[] .PP Similar usage as \f[C]calibrate\ table\ dc\f[] except the call will set gains to the AGC\[aq]s base gain value before running \f[C]calibrate\ table\ dc\f[]. .RE .SS clear .PP Usage: \f[C]clear\f[] .PP Clears the screen. .SS echo .PP Usage: \f[C]echo\ [arg\ 1]\ [arg\ 2]\ ...\ [arg\ n]\f[] .PP Echo each argument on a new line. .SS erase .PP Usage: \f[C]erase\ \ \f[] .PP Erase specified erase blocks SPI flash. .IP \[bu] 2 \f[C]\f[] \- Erase block offset .IP \[bu] 2 \f[C]\f[] \- Number of erase blocks to erase .SS flash_backup .PP Usage: \f[C]flash_backup\ \ (\ |\
\ )\f[] .PP Back up flash data to the specified file. This command takes either two or four arguments. The two\-argument invocation is generally recommended for non\-development use. .PP Parameters: .IP \[bu] 2 \f[C]\f[] \- Type of backup. .RS 2 .PP This selects the appropriate address and length values based upon the selected type. .PP Valid options are: .PP .TS tab(@); rw(11.7n) lw(52.5n). T{ Option T}@T{ Description T} _ T{ \f[C]cal\f[] T}@T{ Calibration data T} T{ \f[C]fw\f[] T}@T{ Firmware T} T{ \f[C]fpga40\f[] T}@T{ Metadata and bitstream for 40 kLE FPGA T} T{ \f[C]fpga115\f[] T}@T{ Metadata and bitstream for 115 kLE FPGA T} .TE .RE .IP \[bu] 2 \f[C]
\f[] \- Address of data to back up. Must be erase block\-aligned. .IP \[bu] 2 \f[C]\f[] \- Length of region to back up. Must be erase block\-aligned. .PP Note: When an address and length are provided, the image type will default to \f[C]raw\f[]. .PP Examples: .IP \[bu] 2 \f[C]flash_backup\ cal.bin\ cal\f[] .RS 2 .PP Backs up the calibration data region. .RE .IP \[bu] 2 \f[C]flash_backup\ cal_raw.bin\ 0x30000\ 0x10000\f[] .RS 2 .PP Backs up the calibration region as a raw data image. .RE .SS flash_image .PP Usage: \f[C]flash_image\ \ [output\ options]\f[] .PP Print a flash image\[aq]s metadata or create a new flash image. When provided with the name of a flash image file as the only argument, this command will print the metadata contents of the image. .PP The following options may be used to create a new flash image. .IP \[bu] 2 \f[C]data=\f[] .RS 2 .PP File to containing data to store in the image. .RE .IP \[bu] 2 \f[C]address=\f[] .RS 2 .PP Flash address. The default depends upon \f[C]type\f[] parameter. .RE .IP \[bu] 2 \f[C]type=\f[] .RS 2 .PP Type of flash image. Defaults to \f[C]raw\f[]. .PP Valid options are: .PP .TS tab(@); rw(11.7n) lw(52.5n). T{ Option T}@T{ Description T} _ T{ \f[C]cal\f[] T}@T{ Calibration data T} T{ \f[C]fw\f[] T}@T{ Firmware T} T{ \f[C]fpga40\f[] T}@T{ Metadata and bitstream for 40 kLE FPGA T} T{ \f[C]fpga115\f[] T}@T{ Metadata and bitstream for 115 kLE FPGA T} T{ \f[C]raw\f[] T}@T{ Raw data. The address and length parameters must be provided if this type is selected. T} .TE .RE .IP \[bu] 2 \f[C]serial=\f[] .RS 2 .PP Serial # to store in image. Defaults to zeros. .RE .SS flash_init_cal .PP Usage: \f[C]flash_init_cal\ \ \ []\f[] .PP Create and write a new calibration data region to the currently opened device, or to a file. Be sure to back up calibration data prior to running this command. (See the \f[C]flash_backup\f[] command.) .IP \[bu] 2 \f[C]\f[] .RS 2 .PP Either 40 or 115, depending on the device model. .RE .IP \[bu] 2 \f[C]\f[] .RS 2 .PP VCTCXO/DAC trim value (\f[C]0x0\f[]\-\f[C]0xffff\f[]) .RE .IP \[bu] 2 \f[C]\f[] .RS 2 .PP File to write calibration data to. When this argument is provided, no data will be written to the device\[aq]s flash. .RE .SS flash_restore .PP Usage: \f[C]flash_restore\ \ [
\ ]\f[] .PP Restore flash data from a file, optionally overriding values in the image metadata. .IP \[bu] 2 \f[C]
\f[] .RS 2 .PP Defaults to the address specified in the provided flash image file. .RE .IP \[bu] 2 \f[C]\f[] .RS 2 .PP Defaults to length of the data in the provided image file. .RE .SS fw_log .PP Usage: \f[C]fw_log\f[] [filename] .PP Read the contents of the device\[aq]s firmware log and write it to the specified file. If no filename is specified, the log content is written to stdout. .SS help .PP Usage: \f[C]help\ []\f[] .PP Provides extended help, like this, on any command. .SS info .PP Usage: \f[C]info\f[] .PP Prints the following information about an opened device: .IP \[bu] 2 Serial number .IP \[bu] 2 VCTCXO DAC calibration value .IP \[bu] 2 FPGA size .IP \[bu] 2 Whether or not the FPGA is loaded .IP \[bu] 2 USB bus, address, and speed .IP \[bu] 2 Backend (Denotes which device interface code is being used.) .IP \[bu] 2 Instance number .SS jump_to_boot .PP Usage: \f[C]jump_to_boot\f[] .PP Clear out a FW signature word in flash and jump to FX3 bootloader. .PP The device will continue to boot into the FX3 bootloader across power cycles until new firmware is written to the device. .SS load .PP Usage: \f[C]load\ \ \f[] .PP Load an FPGA bitstream or program the FX3\[aq]s SPI flash. .SS xb .PP Usage: \f[C]xb\ \ \ [parameters]\f[] .PP Enable or configure an expansion board. .PP Valid values for \f[C]board_model\f[]: .IP \[bu] 2 \f[C]100\f[] .RS 2 .PP XB\-100 GPIO expansion board .RE .IP \[bu] 2 \f[C]200\f[] .RS 2 .PP XB\-200 LF/MF/HF/VHF transverter expansion board .RE .IP \[bu] 2 \f[C]300\f[] .RS 2 .PP XB\-300 amplifier board .RE .PP Common subcommands: .IP \[bu] 2 \f[C]enable\f[] .RS 2 .PP Enable the XB\-100, XB\-200, or XB\-300 expansion board. .RE .PP XB\-200 subcommands: .IP \[bu] 2 \f[C]filter\ [rx|tx]\ [50|144|222|custom|auto_1db|auto_3db]\f[] .RS 2 .PP Selects the specified RX or TX filter on the XB\-200 board. Below are descriptions of each of the filter options. .IP \[bu] 2 50 .RS 2 .IP .nf \f[C] Select\ the\ 50\-54\ MHz\ (6\ meter\ band)\ filter. \f[] .fi .RE .IP \[bu] 2 144 .RS 2 .IP .nf \f[C] Select\ the\ 144\-148\ MHz\ (2\ meter\ band)\ filter. \f[] .fi .RE .IP \[bu] 2 222 .RS 2 .IP .nf \f[C] Select\ the\ 222\-225\ MHz\ (1.25\ meter\ band)\ filter.\ Realistically, this\ filter\ option\ is\ actually\ slightly\ wider,\ covering 206\ MHz\ \-\ 235\ MHz. \f[] .fi .RE .IP \[bu] 2 custom .RS 2 .IP .nf \f[C] Selects\ the\ custom\ filter\ path.\ The\ user\ should\ connect\ a\ filter along\ the\ corresponding\ FILT\ and\ FILT\-ANT\ connections\ when\ using this\ option.\ \ Alternatively\ one\ may\ jumper\ the\ FILT\ and\ FILT\-ANT connections\ to\ achieve\ "no\ filter"\ for\ reception.\ (However,\ this\ is _highly_\ discouraged\ for\ transmissions.) \f[] .fi .RE .IP \[bu] 2 auto_1db .RS 2 .IP .nf \f[C] Automatically\ selects\ one\ of\ the\ above\ choices\ based\ upon\ frequency and\ the\ filters\[aq]\ 1dB\ points.\ The\ custom\ path\ is\ used\ for\ cases that\ are\ not\ associated\ with\ the\ on\-board\ filters. \f[] .fi .RE .IP \[bu] 2 auto_3db .RS 2 .IP .nf \f[C] Automatically\ selects\ one\ of\ the\ above\ choices\ based\ upon\ frequency and\ the\ filters\[aq]\ 3dB\ points.\ The\ custom\ path\ is\ used\ for\ cases that\ are\ not\ associated\ with\ the\ on\-board\ filters. \f[] .fi .RE .RE .PP XB\-300 subcommands: .IP \[bu] 2 \f[C]\ [on|off]\f[] .RS 2 .PP Enable or disable the power amplifier (PA), low\-noise amplifier (lna) or auxiliary LNA (aux). The current state if the specified device is printed if [on|off] is not specified. .PP Note: The auxiliary path on the XB\-300 is not populated with components by default; the \f[C]aux\f[] control will have no effect upon the RX signal. This option is available for users to modify their board with custom hardware. .RE .IP \[bu] 2 \f[C]\f[] .RS 2 .PP Read the current Power Detect (PDET) voltage and compute the output power. .RE .IP \[bu] 2 \f[C]trx\ \f[] .RS 2 .PP The default XB\-300 hardware configuration includes separate RX and TX paths. However, users wishing to use only a single antenna for TRX can do so via a modification to resistor population options on the XB\-300 and use this command to switch between RX an TX operation. (See R8, R10, and R23 on the schematic.) .RE .PP Examples: .IP \[bu] 2 \f[C]xb\ 200\ enable\f[] .RS 2 .PP Enables and configures the XB\-200 transverter expansion board. .RE .IP \[bu] 2 \f[C]xb\ 200\ filter\ rx\ 144\f[] .RS 2 .PP Selects the 144\-148 MHz receive filter on the XB\-200 transverter expansion board. .RE .IP \[bu] 2 \f[C]xb\ 300\ enable\f[] .RS 2 .PP Enables and configures the use of GPIOs to interact with the XB\-300. The PA and LNA will disabled by default. .RE .IP \[bu] 2 \f[C]xb\ 300\ lna\ on\f[] .RS 2 .PP Enables the RX LNA on the XB\-300. LED D1 (green) is illuminated when the LNA is enabled, and off when it is disabled. .RE .IP \[bu] 2 \f[C]xb\ 300\ pa\ off\f[] .RS 2 .PP Disables the TX PA on the XB\-300. LED D2 (blue) is illuminated when the PA is enabled, and off when it is disabled. .RE .SS mimo .PP Usage: \f[C]mimo\ [master\ |\ slave]\f[] .PP Modify device MIMO operation. .PP IMPORTANT: This command is deprecated and has been superseded by \f[C]"print/set\ smb_mode"\f[]. For usage text, run: "\f[C]set\ smb_mode\f[]" .SS open .PP Usage: \f[C]open\ [device\ identifiers]\f[] .PP Open the specified device for use with successive commands. Any previously opened device will be closed. .PP The general form of the device identifier string is: .PP \f[C]:[device=:]\ [instance=]\ [serial=]\f[] .PP See the \f[C]bladerf_open()\f[] documentation in libbladeRF for the complete device specifier format. .SS peek .PP Usage: \f[C]peek\ \
\ [num_addresses]\f[] .PP The peek command can read any of the devices hanging off the FPGA which includes the LMS6002D transceiver, VCTCXO trim DAC or the Si5338 clock generator chip. .PP If \f[C]num_addresses\f[] is supplied, the address is incremented by 1 and another peek is performed for that many addresses. .PP Valid Address Ranges: .PP .TS tab(@); r l. T{ Device T}@T{ Address Range T} _ T{ \f[C]dac\f[] T}@T{ 0 to 255 T} T{ \f[C]lms\f[] T}@T{ 0 to 127 T} T{ \f[C]si\f[] T}@T{ 0 to 255 T} .TE .PP Example: .IP \[bu] 2 \f[C]peek\ si\ ...\f[] .SS poke .PP Usage: \f[C]poke\ \
\ \f[] .PP The poke command can write any of the devices hanging off the FPGA which includes the LMS6002D transceiver, VCTCXO trim DAC or the Si5338 clock generator chip. .PP Valid Address Ranges: .PP .TS tab(@); r l. T{ Device T}@T{ Address Range T} _ T{ \f[C]dac\f[] T}@T{ 0 to 255 T} T{ \f[C]lms\f[] T}@T{ 0 to 127 T} T{ \f[C]si\f[] T}@T{ 0 to 255 T} .TE .PP Example: .IP \[bu] 2 \f[C]poke\ lms\ ...\f[] .SS print .PP Usage: \f[C]print\ [parameter]\f[] .PP The print command takes a parameter to print. Available parameters are listed below. If no parameter is specified, all parameters are printed. .PP .TS tab(@); rw(13.6n) lw(54.4n). T{ Parameter T}@T{ Description T} _ T{ \f[C]bandwidth\f[] T}@T{ Bandwidth settings T} T{ \f[C]frequency\f[] T}@T{ Frequency settings T} T{ \f[C]gpio\f[] T}@T{ FX3 <\-> FPGA GPIO state T} T{ \f[C]loopback\f[] T}@T{ Loopback settings T} T{ \f[C]lnagain\f[] T}@T{ Gain setting of the RX LNA, in dB T} T{ \f[C]rx_mux\f[] T}@T{ FPGA RX FIFO input mux setting T} T{ \f[C]rxvga1\f[] T}@T{ Gain setting of RXVGA1, in dB T} T{ \f[C]rxvga2\f[] T}@T{ Gain setting of RXVGA2, in dB T} T{ \f[C]txvga1\f[] T}@T{ Gain setting of TXVGA1, in dB T} T{ \f[C]txvga2\f[] T}@T{ Gain setting of TXVGA2, in dB T} T{ \f[C]sampling\f[] T}@T{ External or internal sampling mode T} T{ \f[C]samplerate\f[] T}@T{ Samplerate settings T} T{ \f[C]smb_mode\f[] T}@T{ SMB clock port mode of operation T} T{ \f[C]trimdac\f[] T}@T{ VCTCXO Trim DAC settings T} T{ \f[C]vctcxo_tamer\f[] T}@T{ Current VCTCXO tamer mode. T} T{ \f[C]xb_gpio\f[] T}@T{ Expansion board GPIO values T} T{ \f[C]xb_gpio_dir\f[] T}@T{ Expansion board GPIO direction (1=output, 0=input) T} .TE .SS probe .PP Usage: \f[C]probe\ [strict]\f[] .PP Search for attached bladeRF device and print a list of results. .PP Without specifying \f[C]strict\f[], the lack of any available devices is not considered an error. .PP When provided the optional \f[C]strict\f[] argument, this command will treat the situation where no devices are found as an error, causing scripts or lists of commands provided via the \f[C]\-e\f[] command line argument to terminate immediately. .SS quit .PP Usage: \f[C]quit\f[] .PP Exit the CLI. .SS recover .PP Usage: \f[C]recover\ [\
\ ]\f[] .PP Load firmware onto a device running in bootloader mode, or list all devices currently in bootloader mode. .PP With no arguments, this command lists the USB bus and address for FX3\-based devices running in bootloader mode. .PP When provided a bus, address, and path to a firmware file, the specified device will be loaded with and begin executing the provided firmware. .PP In most cases, after successfully loading firmware into the device\[aq]s RAM, users should open the device with the "\f[C]open\f[]" command, and write the firmware to flash via "\f[C]load\ fx3\ \f[]" .SS run .PP Usage: \f[C]run\