Run lxi discover
to search for LXI compatible machines accessible
from this PC.
lxi discover
Searching for LXI devices - please wait... Broadcasting on interface lo Broadcasting on interface eno1 Found "RIGOL TECHNOLOGIES,DS1104Z,DS1ZB192000144,00.04.04.SP3" on address 192.168.120.56 Broadcasting on interface docker0 Found 1 device
One liner to extract IP-address from lxi
tool output:
lxi discover | grep 'DS1104Z' | grep -oE '192\.[0-9]+\.[0-9]+\.[0-9]+'
192.168.120.56
Take screenshot from oscilloscope in IP addres SKOOPPI
:
# SKOOPPI=$(lxi discover | grep 'DS1104Z' | grep -oE '192\.[0-9]+\.[0-9]+\.[0-9]+')
echo Screenshot for SKOOPPI=$SKOOPPI
lxi screenshot -a $SKOOPPI pics/lxi-output.png
Set environment variable SKOOPPI
to the IP-address of the
oscilloscope.
export SKOOPPI=192.168.120.56
Ping IP-address SKOOPPI
ping -c 2 $SKOOPPI
Take a screenshot using netcat
using the idea presented in
https://www.theimpossiblecode.com/blog/rigol-ds1054z-screen-capture-linux/.
Options passed to netcat
:
-N
: ‘shutdown(2) the network socket after EOF on the input.’.-w
: idle timeout
IMG=pics/netcat-example.bmp
echo ':display:data?' | netcat -w 20 -N $SKOOPPI 5555 | tail -c +12 > $IMG
echo -n $IMG
echo 'ACQ:TYPE?' | netcat -w 20 -N $SKOOPPI 5555
HRES
echo '*IDN?' | netcat -q 10 $SKOOPPI 5555
RIGOL TECHNOLOGIES,DS1104Z,DS1ZB192000144,00.04.04.SP3
We set some file local variables for emacs users.
#