Products > Test Equipment
Open source lxi-tools and liblxi v1.0 released for GNU/Linux
BloodyCactus:
hmmm
--- Code: ---> /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
--- End code ---
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: ---> 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
--- End code ---
you can see the
--- Code: ---'G' 0D 0A 1A 0A 00 00 00 0D
--- End code ---
but we are missing
--- Code: ---89 50 4E
--- End code ---
the start of the PNG magic...
putting in the missing header shows a valid PNG from the scope
--- Code: ---> file qq.png
qq.png: PNG image data, 640 x 520, 8-bit colormap, non-interlaced
--- End code ---
lundmar:
--- Quote from: BloodyCactus on November 29, 2017, 01:13:24 am ---hmmm
--- Code: ---> /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
--- End code ---
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.
--- End quote ---
Yeah, sorry about that.
It has to do with the way that snaps work. All snaps are running in a security enabled Linux container which means that the snap is only allowed access to certain subsystems. For example, in case of lxi-tools, it can only access your network and home directory (if it was not NFS network mounted). The main upside of having such level of security is that I am allowed to distribute updates quickly and directly to end users without having to go through the slow package update procedures of the various Linux distributions which can take weeks or even months sometimes. And the downsides... well, you just found one he he. That being said, I will investigate if it possible to reconfigure the snap to gain access to network mounted file systems.
--- Quote from: BloodyCactus on November 29, 2017, 01:13:24 am ---oh and screenshot fails on hmo-rs1000 (I have hmo1202)
--- Code: ---> 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
--- End code ---
you can see the
--- Code: ---'G' 0D 0A 1A 0A 00 00 00 0D
--- End code ---
but we are missing
--- Code: ---89 50 4E
--- End code ---
the start of the PNG magic...
--- End quote ---
Fixed! Thanks for the detailed debug info. It was very helpful :-+
It's fixed in this commit: https://github.com/lxi-tools/lxi-tools/commit/04a7cbf9a61af9ead886d4a4a29ddc11b61cbe34
The git commit automatically triggers an update of the lxi-tools snap in the edge channel so you should be able to update to it immediately:
--- Code: ---snap refresh lxi-tools --edge
--- End code ---
By the way, can you please try fire this command?
--- Code: --- $ lxi screenshot -a scope
--- End code ---
Which should automatically load the correct screenshot plugin. If it fails please provide me the IDN string of your instrument.
Thanks
BloodyCactus:
--- Code: ---[ sgeorge @ workstation ] - [ /tmp ]
[$]> lxi screenshot -a scope
Error: Read error (timeout)
Error: Failed to receive message
Error: Unable to retrieve instrument ID
--- End code ---
needs a -p, so here is my IDN
--- Code: ---Found "Rohde&Schwarz,HMO1202,nnnnnnnnn,05.886"
--- End code ---
The "05.886" is firmware version.
The "nnnnnnnnn" is numeric serial number (I blanked mine out).
The "HMO1202" can change, depending on bandwidth ID code installed.
Doing
--- Code: ---lxi screensscreenshot -p rs-hmo1000 -a scope
Saved screenshot image to screenshot_scope_2017-11-28_21:43:12.png
--- End code ---
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 in
--- Code: ---/tmp/snap.1000_lxi-tools_ql0gGm/tmp/
--- End code ---
which is
--- Code: ---drwx------ 3 root sgeorge 4.0K Nov 28 19:50 snap.1000_lxi-tools_ql0gGm
--- End code ---
how very strange.
PNG do load correctly tho.
lundmar:
--- Quote from: BloodyCactus on November 29, 2017, 02:49:38 am ---
--- Code: ---[ sgeorge @ workstation ] - [ /tmp ]
[$]> lxi screenshot -a scope
Error: Read error (timeout)
Error: Failed to receive message
Error: Unable to retrieve instrument ID
--- End code ---
--- End quote ---
Hmm, strange. I didn't expect it to fail retrieving the ID. Can your please verify that the following command works for you?
--- Code: ---$ lxi scpi -a scope "*IDN?"
--- End code ---
If that also fails please try with IP address instead of 'scope'.
--- Quote from: BloodyCactus on November 29, 2017, 02:49:38 am ---Doing
--- Code: ---lxi screensscreenshot -p rs-hmo1000 -a scope
Saved screenshot image to screenshot_scope_2017-11-28_21:43:12.png
--- End code ---
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 in
--- Code: ---/tmp/snap.1000_lxi-tools_ql0gGm/tmp/
--- End code ---
which is
--- Code: ---drwx------ 3 root sgeorge 4.0K Nov 28 19:50 snap.1000_lxi-tools_ql0gGm
--- End code ---
how very strange.
--- End quote ---
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...
The good news is that the NFS home issue is apparently something which has been resolved and a fix should soon be available with newly released snap subsystems. Unfortunately, only recent Ubuntu and Fedora systems are deploying latest versions of snap/snapd. In other words, if you are running a recent Ubuntu version (e.g. 17.10) chances are it will soon be available.
--- Quote from: BloodyCactus on November 29, 2017, 02:49:38 am ---PNG do load correctly tho.
--- End quote ---
Good :-+
BloodyCactus:
--- Quote from: lundmar on November 29, 2017, 03:30:18 am ---Hmm, strange. I didn't expect it to fail retrieving the ID. Can your please verify that the following command works for you?
--- Code: ---$ lxi scpi -a scope "*IDN?"
--- End code ---
--- End quote ---
--- Code: ---lxi scpi -a scope "*IDN?"
Rohde&Schwarz,HMO1202,nnnnnnnnn,05.886
--- End code ---
lxi screenshot -a 192.168.0.107 also fails, without -p
--- Quote ---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...
--- End quote ---
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.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version