Commit graph

32 commits

Author SHA1 Message Date
Brian Padalino
b1057815d3 cli: Add external sampling from ADC pins.
A new command for print/set for sampling being internal via the normal
RXVGA2 path or external via the differential pin header.
2013-07-30 23:16:24 -04:00
Jon Szymaniak
f1708ef940 CLI: Added interactive mode support for RX and TX, misc. refactoring.
See the README.md in the linux/apps directory for more details.

Note that -d <device> is now optional if only one device is connected.
2013-07-25 22:41:22 -04:00
Jon Szymaniak
cc305fe81b cli: Fixed bladerf_is_fpga_configured() calls to check for errors
Also removed an extranous check of state->curr_device and FPGA from
print_gpio, as this will be checked in cmd_print before print_gpio
is called.
2013-07-18 23:42:02 -04:00
Jon Szymaniak
bd5567a092 cli: Added 'print samplerate [rx|tx]' support 2013-07-18 09:13:32 -04:00
Brian Padalino
84cac257a6 cli: Added check for FPGA not loaded before performing action. 2013-07-17 20:58:16 -04:00
Jon Szymaniak
ed7938436d cli: Fixed definition of "open" command names.
What was supposed to be a NULL terminator had quotes around it,
yielding unruly behavior.
2013-07-16 19:08:47 -04:00
Brian Padalino
2aed383bc7 cli: Set frequency bounds checking.
lib: Add band selection when setting frequency.
2013-07-15 00:30:30 -04:00
Brian Padalino
1997babb18 cli: Changed print out of samplerate for RX and TX to be consistent. 2013-07-15 00:10:55 -04:00
Brian Padalino
3e863eb9c2 cli: Fixed frequency division SIGFPE.
The value of x was being returned as 0 when the FPGA was either not
loaded or when the LMS was still in reset.  Catch this condition and
return back an invalid parameter.
2013-07-06 14:14:16 -07:00
Jon Szymaniak
0c13b4d0dd cli: Cleanup and bugfixes for peek/poke/print commands & cli_err(). 2013-07-06 14:14:15 -07:00
Jon Szymaniak
a62a6bb7ba cli: First pass of CLI code cleanup
Another pass or two will definitely be required. So far, cleanup
includes:
  - Adding checks of libbladeRF return codes
  - Unifying the way errors are printed
  - Reorganizing command order (as they're searched linearly), by
    what's most time-sensitive.
  - Removed "specialized help" stubs. These can be re-added if/when
    this functionality is added
  - Removed some noisy warnings and replaced some with errors.
  - Script execution stops at first error encountered in script

Added:
  - "clear" command to clear terminal

Remaining issues:
  - We're still lacking a "run" command
  - Valgrind indicates we have some remaining issues in cli_err()
    that we should address.
2013-07-06 14:14:13 -07:00
Jon Szymaniak
b1c8236bd7 cli: Merged command name and aliases list 2013-07-06 14:14:12 -07:00
Jon Szymaniak
15253274dc cli: Preliminary script support
Added support to run scripts from the command line. A 'run' command
still needs to be added. This will required a script stack and
detection of recursive loops.
2013-07-06 14:14:10 -07:00
Jon Szymaniak
5592d11c0c cli: Fixed extraneous error messages when failing to opend device
A message regarding the use of -d was being printed under incorrect
conditions due to an error status not being checked.
2013-07-06 14:14:07 -07:00
Brian Padalino
1c9849538f apps: Adding an rx_test to see if the samplerate is being kept up.
cli: Adding trimdac writing.
nios: Removing the unions.
2013-07-06 14:14:03 -07:00
Brian Padalino
74102bbcda cli: Added gpio printing. 2013-07-06 14:03:59 -07:00
Brian Padalino
b20948c7c7 cli: Formatting of poke changed to match peek. 2013-07-06 14:03:58 -07:00
Jon Szymaniak
888b3f0596 cli: Exit cleanly on SIGTERM, SIGINT, and SIGQUIT 2013-07-06 14:03:56 -07:00
Brian Padalino
b6ffd3f9d4 cli: Added rxvga1 and rxvga2.
lib: Modified calls to rxvga2 since units are in 3dB increments.
2013-07-06 14:03:55 -07:00
Brian Padalino
001f65a7fc cli: Added lnagain. 2013-07-06 14:03:54 -07:00
Brian Padalino
2b0b8e3349 cli: Adding aliases to the commandline 2013-07-06 14:03:53 -07:00
Brian Padalino
8dcd48a561 cli: More print/set updated.
lib: Moved all implementation code to bladerf.c
2013-07-06 14:03:49 -07:00
Brian Padalino
b97eb3554d cli: Implemented txvga1 print/set and fixed library calls for txvga1. 2013-07-06 14:03:48 -07:00
Brian Padalino
a5b9c7a15d cli: Implemented bandwidth set/print 2013-07-06 14:03:47 -07:00
Brian Padalino
b7994f399d cli: peek/poke an print/set combined into single files.
Also added top level .gitignore file.
2013-07-06 04:50:38 -07:00
Brian Padalino
ef2a542136 cli: Adding extra functionality.
lib: Added device path to bladerf structure to know where fd is pointing.
2013-07-06 04:50:37 -07:00
Jon Szymaniak
ccfd96a040 cli: Fixed handling of empty line, and misc. cleanup
Interactive console's argc wasn't being checked, resulting in
a bogus "Unexpected command:" and often segfaults.

In other news, I failed to note in the previus changeset that at
least half the cli changes were authored by Brian Padalino...so
doing that here - ec54e4e409
2013-06-17 01:53:16 -04:00
Jon Szymaniak
ec54e4e409 cli: Added FX3/ FPGA loading support and filled in misc. cmd stubs.
The CLI now supports flashing the FX3 and loading the FPGA from the
command line and through the interactive console.

To flash the firmware from the command line:
  ./bin/bladerf -b -f ./path/to/img -d /dev/bladerf1

To load the firmware from the command line:
  ./bin/bladerf -b -l ./path/to/rbf -d /dev/bladerf1

To flash/load interactively either run with -d /dev/bladerf1, or
use the open command to attach to a device:
  bladeRF> open /dev/bladerf1

To flash the firmware interactively:
  bladeRF> load fx3 ./path/to/img

To load the FPGA interactively:
  bladeRF> load fpga ./path/to/rbf

Note that a power-on-reset is currently required in between
flashing firmware and loading the FPGA.

Various commands have been stubbed out for the time being. A TODO
list has been created to keep track of desired functionality.

The simple_load and upgrade_firmware programs have been removed,
as they are no longer needed.
2013-06-17 00:12:19 -04:00
Robert Ghilduta
b49d9fe7d2 cli: make the cli app be conditionally compiled to be interactive 2013-06-09 22:58:35 -07:00
jon
2f9dc744a2 cli: Initial skeleton of CLI program 2013-06-09 22:58:34 -07:00
jon
c2e3c54422 apps: Added hooks to build without 'make install'-ing libbladeRF 2013-06-09 22:58:33 -07:00
jon
7f22b26f7d libbladeRF/apps: Moving cli build to apps/
This is the first commit in a set of upcoming changes that will
move functionality from simple_load and upgrade_firmware into the
libbladeRF library and provide access to these routines through a
bladeRF cli.

Don't merge from jon-dev until I get this straightened out, or
you'll be left with something possibly unusable...
2013-06-09 22:58:32 -07:00