Howdy,
I keep running into issues with LXI-TOOLS...
so far support from Lundar has been great. Jet spamming GitHub with issues that might only be my system isn't too great.
I have been following install instructions on this forum jet I got stuck here:
after installing LIB, and TOOLS trying to start the program on the command line.Code: [Select]$ lxi --help
lxi: error while loading shared libraries: liblxi.so.1: cannot open shared object file: No such file or directory
i am runningCode: [Select]Linux LAB 4.4.0-53-generic #74-Ubuntu SMP Fri Dec 2 15:59:10 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
OrCode: [Select]Linux Mint 18.1 Cinnamon 64-bit
if that floats your goat.
As solving this issue has many solutions hence I wanted to ask first before fumbling around.
$ LD_LIBRARY_PATH=$HOME/opt/lxi/lib ./lxi --version
v1.12
$ export LD_LIBRARY_PATH=$HOME/opt/lxi/lib
$ lxi --version
lxi v1.12
$ snap install lxi-tools
I realize that many people are not comfortable building and installing stuff from source. Unfortunately it takes quite some effort and time to find package maintainers for the various distributions and even then there is usually a large turnaround time to update packages
I realize that many people are not comfortable building and installing stuff from source. Unfortunately it takes quite some effort and time to find package maintainers for the various distributions and even then there is usually a large turnaround time to update packagesThe easy way around that is to pack everything (including libraries) into a distribution independant package like firefox does. A statically linked binary should work well too.
$ snap install lxi-tools --edge
snap refresh lxi-tools
snap install lxi-tools
$ snap alias lxi-tools.lxi lxi
Hi lundmar,
Just to confirm that lxi snap and aliasing seem to be working fine on my Ubuntu 14.04 box.
Oh it is not that old actually but yes I had to install snap demon and it doesn't come pre-installed out of the box
$ snap install lxi-tools --edge
$ snap refresh lxi-tools --edge
> /snap/bin/lxi --version
cannot change current working directory to the original directory: Permission denied
> sudo /snap/bin/lxi --version
cannot change current working directory to the original directory: Permission denied
> cd /tmp
> lxi --version
lxi v1.13
> lxi screenshot -p rs-hmo1000 -a scope
Saved screenshot image to screenshot_scope_2017-11-28_19:55:38.png
> file screenshot_scope_2017-11-28_19\:55\:38.png
screenshot_scope_2017-11-28_19:55:38.png: data
'G' 0D 0A 1A 0A 00 00 00 0D
89 50 4E
the start of the PNG magic...> file qq.png
qq.png: PNG image data, 640 x 520, 8-bit colormap, non-interlaced
hmmmCode: [Select]> /snap/bin/lxi --version
cannot change current working directory to the original directory: Permission denied
> sudo /snap/bin/lxi --version
cannot change current working directory to the original directory: Permission denied
> cd /tmp
> lxi --version
lxi v1.13
oh, solved my own problem, posting here for posterity. You get the above error if you run it when your in an NFS mounted directory/path.
oh and screenshot fails on hmo-rs1000 (I have hmo1202)Code: [Select]> lxi screenshot -p rs-hmo1000 -a scope
Saved screenshot image to screenshot_scope_2017-11-28_19:55:38.png
> file screenshot_scope_2017-11-28_19\:55\:38.png
screenshot_scope_2017-11-28_19:55:38.png: data
you can see theCode: [Select]'G' 0D 0A 1A 0A 00 00 00 0D
but we are missingCode: [Select]89 50 4E
the start of the PNG magic...
snap refresh lxi-tools --edge
$ lxi screenshot -a scope
[ sgeorge @ workstation ] - [ /tmp ]
[$]> lxi screenshot -a scope
Error: Read error (timeout)
Error: Failed to receive message
Error: Unable to retrieve instrument ID
Found "Rohde&Schwarz,HMO1202,nnnnnnnnn,05.886"
lxi screensscreenshot -p rs-hmo1000 -a scope
Saved screenshot image to screenshot_scope_2017-11-28_21:43:12.png
/tmp/snap.1000_lxi-tools_ql0gGm/tmp/
drwx------ 3 root sgeorge 4.0K Nov 28 19:50 snap.1000_lxi-tools_ql0gGm
Code: [Select][ sgeorge @ workstation ] - [ /tmp ]
[$]> lxi screenshot -a scope
Error: Read error (timeout)
Error: Failed to receive message
Error: Unable to retrieve instrument ID
$ lxi scpi -a scope "*IDN?"
DoingCode: [Select]lxi screensscreenshot -p rs-hmo1000 -a scope
Saved screenshot image to screenshot_scope_2017-11-28_21:43:12.png
does not actually put "screenshot_scope_2017-11-28_21:43:12.png" on disk. not in my home directory, or anywhere...
ok. found them inCode: [Select]/tmp/snap.1000_lxi-tools_ql0gGm/tmp/
which isCode: [Select]drwx------ 3 root sgeorge 4.0K Nov 28 19:50 snap.1000_lxi-tools_ql0gGm
how very strange.
PNG do load correctly tho.
Hmm, strange. I didn't expect it to fail retrieving the ID. Can your please verify that the following command works for you?Code: [Select]$ lxi scpi -a scope "*IDN?"
lxi scpi -a scope "*IDN?"
Rohde&Schwarz,HMO1202,nnnnnnnnn,05.886
Yes, since your home directory is NFS network mounted, the lxi-tools snap can't access your home directory. And when you are in /tmp the security container redirects the files to the tmp of the snap. magic...
Code: [Select]lxi scpi -a scope "*IDN?"
Rohde&Schwarz,HMO1202,nnnnnnnnn,05.886
my home dir isnt nfs mounted. (everything off my ~ is nfs mounted, but ~/ is physical). it works in my home dir. I was actually in /tmp (which is also phsycal), but I guess snap cant run from /tmp for security.
Code: [Select]lxi scpi -a scope "*IDN?"
Rohde&Schwarz,HMO1202,nnnnnnnnn,05.886
Ok good. Then something is different when the ID is retrieved using the screenshot command. I will have to review the code to see if I can spot the bug - I'll get back to you on this tomorrow.
Ok, I've found and fixed the bug. It was a very silly and simple bug
The bug basically truncated the timeout to 1 ms when using the screenshot command which made retrieval of the instrument ID fail in your case.
The fix should be available via the edge channel now. Let me know if it works for you. Thanks.
lxi screenshot -a scope -p rs-hmo1000
works.> lxi screenshot -a scope
Loaded rs-hmo1000 screenshot plugin
hangs.#0 0x00007ffff76b76f0 in __poll_nocancel () at ../sysdeps/unix/syscall-template.S:84
#1 0x00007ffff76f14e3 in readtcp (ctptr=0x60a6b0 "\004",
buf=0x60e3d0 "d, Robert Gauthier, Floyd Wilder, Mark Drissel, Kenny Lyons,\n# Paul Dunne, Tirath Pannu, Mike L", len=4000) at clnt_tcp.c:480
#2 0x00007ffff76ea946 in fill_input_buf (rstrm=0x60a770) at xdr_rec.c:567
#3 get_input_bytes (len=4, addr=0x7fffffbecbac "", rstrm=<optimized out>) at xdr_rec.c:586
#4 set_input_fragment (rstrm=<optimized out>) at xdr_rec.c:605
#5 xdrrec_getbytes (xdrs=<optimized out>, addr=addr@entry=0x7fffffbecbfc "\377\177", len=len@entry=4)
at xdr_rec.c:262
#6 0x00007ffff76eab83 in xdrrec_getlong (xdrs=<optimized out>, lp=0x7fffffbecc18) at xdr_rec.c:218
#7 0x00007ffff76f6aab in __GI_xdr_u_long (xdrs=xdrs@entry=0x60a718, ulp=ulp@entry=0x7fffffbecca0) at xdr.c:214
#8 0x00007ffff76e9791 in __GI_xdr_replymsg (xdrs=xdrs@entry=0x60a718, rmsg=rmsg@entry=0x7fffffbecca0)
at rpc_prot.c:135
#9 0x00007ffff76f12ae in clnttcp_call (h=0x60a690, proc=10, xdr_args=0x7ffff7bd07f1 <xdr_Create_LinkParms>,
args_ptr=0x7fffffbecdb0 "\220\246`", xdr_results=0x7ffff7bd0ad1 <xdr_Create_LinkResp>,
results_ptr=0x60a0e8 "\210\v\230\367\377\177", timeout=...) at clnt_tcp.c:287
#10 0x00007ffff7bd01e8 in create_link_1 () from liblxi.so.1
#11 0x00007ffff7bcedb2 in vxi11_connect () from liblxi.so.1
#12 0x00007ffff7bcea0e in lxi_connect () from liblxi.so.1
#13 0x0000000000404339 in rs_hmo1000_screenshot ()
#14 0x0000000000403525 in screenshot ()
#15 0x0000000000402384 in main ()
Code: [Select]> lxi screenshot -a scope
hangs.
Loaded rs-hmo1000 screenshot plugin
lxi benchmark -a <ip>
$ lxi benchmark -a 192.168.1.210
Benchmarking by sending 100 ID requests. Please wait...
Result: 19.5 requests/second
Hello,
I got this:
dpenev@yni:~$ sudo snap refresh lxi-tools --edge
snap "lxi-tools" has no updates available
dpenev@yni:~$ lxi -v
lxi v1.13
dpenev@yni:~$ lxi screenshot -a 192.168.1.61
Loaded siglent-ssa3000x screenshot plugin
Error: Failed to receive message
dpenev@yni:~$
Hi Lundmar,
I don't find SCDP command in the SSA3000X programming manual.
I don't find SCDP command in the SSA3000X programming manual.
$ snap info lxi-tools
name: lxi-tools
summary: Open source LXI tools
publisher: lundmar
description: |
Lxi-tools is a collection of open source software tools that enables control
of LXI compatible instruments such as modern oscilloscopes, power supplies,
spectrum analyzers etc.
snap-id: yha3V4dqfwJwpjSWgMFEMViAlQ2iMdL7
commands:
- lxi-tools.lxi
tracking: edge
installed: 1.13 (110) 14MB -
refreshed: 2017-12-01 02:08:58 +0100 CET
channels:
stable: 1.12 (42) 14MB -
candidate: ?
beta: ?
edge: 1.13 (110) 14MB -