Just in case somebody else want to give it a try starting from the github sources, I built lxi-tools like this (on a Debian 8.9 jessie):
cd ~
mkdir lxi-tools
cd lxi-tools/
git clone https://github.com/lxi/liblxi
cd liblxi/
su
apt-get update
apt-get install automake
apt-get install autogen autoconf libtool
./autogen.sh
./configure
make
make install
cd ..
git clone https://github.com/lxi/lxi-tools
cd lxi-tools/
./autogen.sh
apt-get install libreadline-dev
./configure
make
make install
exit
cd ..
# not required any more ???
# export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib"
lxi
Test setupDebian 8 running inside VMware 12 Player running inside Windows 10
Three LXI instruments are connected to LAN:
- 192.168.1.3 is a Rigol DS1054Z oscilloscope
- 192.168.1.4 is a Rigol DP832 power supply
- 192.168.1.5 is a Rigol DG4102 arbitrary waveform generator
Tested commands1.
[email protected]:~/lxi-tools$ lxi
Usage: lxi [--version] [--help] <command> [<args>]
-v, --version Display version
-h, --help Display help
Commands:
discover [<options>] Search for LXI devices
scpi [<options>] <scpi-command> Send SCPI command
screenshot [<options>] [<filename>] Capture screenshot
Discover options:
-t, --timeout <seconds> Timeout (default: 3)
Scpi options:
-a, --address <ip> Device IP address
-t, --timeout <seconds> Timeout (default: 3)
-x, --dump-hex Print response in hexadecimal
-f, --dump-file <filename> Save response to file
-i, --interactive Enter interactive mode
-s, --script <filename> Run script file
-r, --raw Use raw/TCP
-p, --raw-port <port> Use raw/TCP port (default: 5555)
Screenshot options:
-a, --address <ip> Device IP address
-t, --timeout <seconds> Timeout (default: 15)
-m, --model <name> Name of model
-l, --list List supported models
[email protected]:~/lxi-tools$
Passed2.
[email protected]:~/lxi-tools$ lxi --version
lxi v1.6
[email protected]:~/lxi-tools$ lxi -v
lxi v1.6
[email protected]:~/lxi-tools$ lxi -h
Usage: lxi [--version] [--help] <command> [<args>]
-v, --version Display version
-h, --help Display help
Commands:
discover [<options>] Search for LXI devices
scpi [<options>] <scpi-command> Send SCPI command
screenshot [<options>] [<filename>] Capture screenshot
Discover options:
-t, --timeout <seconds> Timeout (default: 3000)
Scpi options:
-a, --address <ip> Device IP address
-t, --timeout <seconds> Timeout (default: 3000)
-x, --dump-hex Print response in hexadecimal
-f, --dump-file <filename> Save response to file
-i, --interactive Enter interactive mode
-s, --script <filename> Run script file
-r, --raw Use raw/TCP
-p, --raw-port <port> Use raw/TCP port (default: 5555)
Screenshot options:
-a, --address <ip> Device IP address
-t, --timeout <seconds> Timeout (default: 15000)
-m, --model <name> Name of model
-l, --list List supported models
[email protected]:~/lxi-tools$ lxi --help
Usage: lxi [--version] [--help] <command> [<args>]
-v, --version Display version
-h, --help Display help
Commands:
discover [<options>] Search for LXI devices
scpi [<options>] <scpi-command> Send SCPI command
screenshot [<options>] [<filename>] Capture screenshot
Discover options:
-t, --timeout <seconds> Timeout (default: 3000)
Scpi options:
-a, --address <ip> Device IP address
-t, --timeout <seconds> Timeout (default: 3000)
-x, --dump-hex Print response in hexadecimal
-f, --dump-file <filename> Save response to file
-i, --interactive Enter interactive mode
-s, --script <filename> Run script file
-r, --raw Use raw/TCP
-p, --raw-port <port> Use raw/TCP port (default: 5555)
Screenshot options:
-a, --address <ip> Device IP address
-t, --timeout <seconds> Timeout (default: 15000)
-m, --model <name> Name of model
-l, --list List supported models
[email protected]:~/lxi-tools$
Failed - CosmeticHelp syntax "Usage: lxi [--version] [--help] <command> [<args>]" suggests <command> is mandatory and the rest optional, but <command> is not mandatory i.e for help and version. Maybe consider "help" and "version" as commands instead of options, or change the help to something like "Usage: lxi --version | --help | <command> [<args>]"
3.
[email protected]:~/lxi-tools$ lxi discover
Searching for LXI devices - please wait...
Broadcasting on interface lo
Broadcasting on interface eth0
Found "RIGOL TECHNOLOGIES,DS1104Z,DS1ZA16*,00.04.04.SP3" on address 192.168.1.3
Found "Rigol Technologies,DG4102,DG4E17*,00.01.12
4.SP3" on address 192.168.1.5
Found "RIGOL TECHNOLOGIES,DP832,DP8C16*,00.01.11
4.SP3" on address 192.168.1.4
Found 3 devices
[email protected]:~/lxi-tools$
Failed - Major inconvenienceLeftovers from the previous instrument description text to the next instrument description. This must be investigated, just to be sure there is no out of range memory addressing at runtime.
The *IDN? answer for the last 2 instruments is:
[email protected]:~/lxi-tools$ lxi scpi -a 192.168.1.5 *IDN?
Rigol Technologies,DG4102,DG4E17*,00.01.12
[email protected]:~/lxi-tools$ lxi scpi -a 192.168.1.4 *IDN?
RIGOL TECHNOLOGIES,DP832,DP8C16*,00.01.11
[email protected]:~/lxi-tools$