Using the Command-line Interface
Even when no scripting is needed, the XRA-31 Command-line Interface has its merits. The three commands are shown here in typical day-to-day scenarios.
Storing and loading configurations
Channel configuration
While tools are at hand to ease the configuration of channels within the web interface, it can be a repetitive task when switching between setups. To ease this process, the xra31-configure command can be used to quickly store and load XRA-31 channel configurations.
Having configured an XRA-31 once for a given setup, be it from the web interface or a Python script, issuing the command
$ xra31-configure xra31_hostname --store configuration.json
will create a JSON file containing downstream channel parameters, the reference channel of choice and upstream UCIDs.
Whenever needed,
$ xra31-configure xra31_hostname --load configuration.json
will load this configuration back to the XRA-31.
Capture configuration
In the same way, the xra31-capture command can be used to store and load XRA-31 capture configurations, including
the channel selection,
the filtering options (packet types, OFDM streams and OFDM profiles), and
the output settings (stop criteria, rolling file options and paths).
$ xra31-capture xra31_hostname --store capture.json
$ xra31-capture xra31_hostname --load capture.json
Starting and stopping a capture
Starting an unlimited rolling file capture, keeping only the last 3 files with 60 seconds each, can be achieved as follows
$ xra31-capture xra31_hostname --path test_1/capture.pcap --size 0 --duration 0 --number-of-files 3 --file-size 0 --file-duration 60 --start
This capture can then be stopped from the web interface, Python, or with the command
$ xra31-capture xra31_hostname --stop
Downloading capture files
Finally, the capture files can be downloaded using the xra31-analyse command.
In the most common case, the latest capture file will be needed, and is available through the following command, optionally renaming it:
$ xra31-analyse xra31_hostname --download --output renamed.pcap
For most captures, gzip-compression can reduce file sizes significantly,
and is available through the option --compress
.
Specific files can be downloaded as well, using for example
$ xra31-analyse xra31_hostname --download --path test_1/capture_03.pcap --compress
Rolling file captures can be downloaded in one go, and will be concatenated to
a single capture file.
The following will download test_1/capture_*.pcap
to
capture.pcap.gz
, and deletes the files from the XRA-31:
$ xra31-analyse xra31_hostname --download test_1/capture.pcap --rolling --compress --delete