Author Topic: Open source lxi-tools and liblxi v1.0 released for GNU/Linux  (Read 9115 times)

0 Members and 1 Guest are viewing this topic.

Offline lundmar

  • Frequent Contributor
  • **
  • Posts: 255
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #100 on: December 01, 2017, 04:50:59 AM »
FYI - I've updated the original post that started this thread to include install instructions/hints for getting lxi-tools working with Windows.

Perhaps some would like to share their experience with VMs and lxi-tools.
« Last Edit: December 01, 2017, 04:54:40 AM by lundmar »
https://lxi-tools.github.io - Open source LXI tools
https://tio.github.io - A simple TTY terminal I/O application
http://dc-power-supply.github.io - OSHW DC power supply project
 

Offline dpenev

  • Regular Contributor
  • *
  • Posts: 89
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #101 on: December 01, 2017, 08:16:29 AM »
Hi Lundmar,

I don't find SCDP command in the SSA3000X programming manual.
 

Offline lundmar

  • Frequent Contributor
  • **
  • Posts: 255
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #102 on: December 01, 2017, 08:39:40 AM »
Hi Lundmar,

I don't find SCDP command in the SSA3000X programming manual.

Hi,

True - I'm told it is an undocumented command that should work with SSA3000X. However, I suspect that maybe it is only available in firmware that has not been released yet. I'll check with Siglent to make sure and get back to you. It would be nice if we could get the screenshot plugin working seamlessly with this nice instrument.
https://lxi-tools.github.io - Open source LXI tools
https://tio.github.io - A simple TTY terminal I/O application
http://dc-power-supply.github.io - OSHW DC power supply project
 

Offline lundmar

  • Frequent Contributor
  • **
  • Posts: 255
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #103 on: December 01, 2017, 12:15:16 PM »
I don't find SCDP command in the SSA3000X programming manual.

I've updated the siglent-ssa3000x plugin - I've added some termination characters to the capture command which might make a difference for this particular instrument.

Let me know if that gets it going.

FYI - snap revision 110 or later:

Code: [Select]
$ 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 -
https://lxi-tools.github.io - Open source LXI tools
https://tio.github.io - A simple TTY terminal I/O application
http://dc-power-supply.github.io - OSHW DC power supply project
 

Offline lundmar

  • Frequent Contributor
  • **
  • Posts: 255
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #104 on: December 02, 2017, 01:38:07 AM »
Following the usual rapid release cycle I have made a new release of lxi-tools available.

For an overview of the changes please see https://github.com/lxi-tools/lxi-tools/releases/tag/v1.13

This release adds a new simple benchmark feature. Also, some important fixes has gone into the screenshot feature.

Thanks to BloodyCactus for helping out ironing out the remaining issues with the Rohde & Schwarz HMO 1000 screenshot plugin :-+

This release is available for install via the snap stable channel:

Code: [Select]
$ snap install lxi-tools
« Last Edit: December 02, 2017, 02:05:12 AM by lundmar »
https://lxi-tools.github.io - Open source LXI tools
https://tio.github.io - A simple TTY terminal I/O application
http://dc-power-supply.github.io - OSHW DC power supply project
 

Offline HoracioDos

  • Regular Contributor
  • *
  • Posts: 197
  • Country: ar
  • Just an IT monkey with a DSO
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #105 on: December 02, 2017, 06:11:05 AM »
Please stop improving this thing. I'm getting tired of compiling it almost every week  :-DD
 

Offline lundmar

  • Frequent Contributor
  • **
  • Posts: 255
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #106 on: December 02, 2017, 06:19:12 AM »
Please stop improving this thing. I'm getting tired of compiling it almost every week  :-DD

Ha ha HoracioDos :D

I can highly recommend you install via snap instead - it updates automatically. No need to manually compile stuff anymore ;)
https://lxi-tools.github.io - Open source LXI tools
https://tio.github.io - A simple TTY terminal I/O application
http://dc-power-supply.github.io - OSHW DC power supply project
 

Offline HoracioDos

  • Regular Contributor
  • *
  • Posts: 197
  • Country: ar
  • Just an IT monkey with a DSO
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #107 on: December 02, 2017, 06:28:44 AM »
I can highly recommend you install via snap instead - it updates automatically. No need to manually compile stuff anymore ;)
I prefer flatpak or old school compile
 

Offline lundmar

  • Frequent Contributor
  • **
  • Posts: 255
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #108 on: December 02, 2017, 06:34:26 AM »
I can highly recommend you install via snap instead - it updates automatically. No need to manually compile stuff anymore ;)
I prefer flatpak or old school compile

Well, it looks like snap is winning over flatpak in the popularity race... just saying ;)

Either way, they are not that much different. They solve some of the same issues but snap provides a more straightforward and polished interface for end users.
« Last Edit: December 02, 2017, 01:40:01 PM by lundmar »
https://lxi-tools.github.io - Open source LXI tools
https://tio.github.io - A simple TTY terminal I/O application
http://dc-power-supply.github.io - OSHW DC power supply project
 

Offline lundmar

  • Frequent Contributor
  • **
  • Posts: 255
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #109 on: December 02, 2017, 07:29:37 AM »
hmmm

Code: [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, by the way. I don't know why I didn't think of this before but you can try install the snap with disabled confinement like so:

Code: [Select]
snap install lxi-tools --classic

Then of course rerun the snap alias command if you want to have it recognize the 'lxi' command.

Try it out - maybe that will solve your permission denied on NFS filesystems.
https://lxi-tools.github.io - Open source LXI tools
https://tio.github.io - A simple TTY terminal I/O application
http://dc-power-supply.github.io - OSHW DC power supply project
 

Offline crispus

  • Regular Contributor
  • *
  • Posts: 95
  • Country: ro
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #110 on: December 11, 2017, 03:25:16 AM »
Hi,

I have a couple of suggestions:
1. a parameter for discover - either the network adress, interface name, etc (when you have many interfaces it takes some time)
2. I'm not able to take a screenshot on DM3058:
Code: [Select]
[email protected]: /s/l/out $ bin/lxi discover                   
Searching for LXI devices - please wait...

Broadcasting on interface lo
Broadcasting on interface eth0
  Found "Rigol Technologies,DM3058,DM3XXXX,01.01.00.02.02.00" on address 192.168.1.144

[email protected]: /s/l/out $ bin/lxi screenshot -a 192.168.1.144 screenshot
Loaded rigol-dm3000 screenshot plugin
<I can hear a beep on the multimeter>
<some time after>
Error: Read error (timeout)
Error: Failed to receive message
[email protected]: /s/l/out $
I do have the latest version built from github.
I know I'm numskull, but I look around me and I feel better.
 

Offline lundmar

  • Frequent Contributor
  • **
  • Posts: 255
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #111 on: December 11, 2017, 03:38:45 AM »
Hi,

I have a couple of suggestions:
1. a parameter for discover - either the network adress, interface name, etc (when you have many interfaces it takes some time)

Perhaps I'll add an option for which interface to broadcast on. Something like:
Code: [Select]
$ lxi discover --interface wlan0
For now, to speed things up a bit, you can decrease the timeout. Usually '--timeout 1' is sufficient.

2. I'm not able to take a screenshot on DM3058:
Code: [Select]
[email protected]: /s/l/out $ bin/lxi discover                   
Searching for LXI devices - please wait...

Broadcasting on interface lo
Broadcasting on interface eth0
  Found "Rigol Technologies,DM3058,DM3XXXX,01.01.00.02.02.00" on address 192.168.1.144

[email protected]: /s/l/out $ bin/lxi screenshot -a 192.168.1.144 screenshot
Loaded rigol-dm3000 screenshot plugin
<I can hear a beep on the multimeter>
<some time after>
Error: Read error (timeout)
Error: Failed to receive message
[email protected]: /s/l/out $
I do have the latest version built from github.

Do you have the latest firmware from Rigol installed?

I believe that the screenshot plugin has been tested with a DM3068 by PeDre. Perhaps there is a subtle difference in how it retrieves the screenshot for the two models.
https://lxi-tools.github.io - Open source LXI tools
https://tio.github.io - A simple TTY terminal I/O application
http://dc-power-supply.github.io - OSHW DC power supply project
 

Offline crispus

  • Regular Contributor
  • *
  • Posts: 95
  • Country: ro
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #112 on: December 11, 2017, 03:51:09 AM »
I didn't (yet) upgrade the multimeter; it is as I received it (version 01.01.00.02.02.00)
I'll try to upgrade it and post the result.

The timeout workaround is good, now it takes 3 seconds instead of 10.
I know I'm numskull, but I look around me and I feel better.
 

Offline PeDre

  • Contributor
  • Posts: 12
  • Country: at
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #113 on: December 11, 2017, 04:38:50 AM »
Hello Martin (lundmar),

just for your information.
The Rigol DM3068 only works without a waitlock flag. The flag may be set automatically when the VXI connection is established. The waitlock flag is used by many VXI functions as a parameter, e. g. device_read, see parameter Device_Flags.
The DM3058 may not work because of this. I have not received any feedback from anyone about this device and my program.
My VXI-simulator ignores this flag. The Rigol DS6000 and DG4000 with old firmware are also affected.

Peter

Edit:
What I wrote can't be the mistake. The IDN is received by the Rigol DM3058,
so the waitlock flag isn't the problem.
« Last Edit: December 11, 2017, 06:13:03 AM by PeDre »
 

Offline crispus

  • Regular Contributor
  • *
  • Posts: 95
  • Country: ro
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #114 on: December 11, 2017, 04:57:03 AM »
If helps, I updated the firmware to the latest version and same error (timeout).
On MSO1104Z-S, DG4062 and DSA815 screenshot works with no problem.
I know I'm numskull, but I look around me and I feel better.
 

Offline lundmar

  • Frequent Contributor
  • **
  • Posts: 255
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #115 on: December 11, 2017, 06:41:19 AM »
Hello Martin (lundmar),

just for your information.
The Rigol DM3068 only works without a waitlock flag. The flag may be set automatically when the VXI connection is established. The waitlock flag is used by many VXI functions as a parameter, e. g. device_read, see parameter Device_Flags.
The DM3058 may not work because of this. I have not received any feedback from anyone about this device and my program.
My VXI-simulator ignores this flag. The Rigol DS6000 and DG4000 with old firmware are also affected.

Peter

Edit:
What I wrote can't be the mistake. The IDN is received by the Rigol DM3058,
so the waitlock flag isn't the problem.

Ahh right, yes - the DM was the one you simulated. Either way, I've disabled any locking requests during establishment of the VXI-11 connection. It might fix the issue.
https://lxi-tools.github.io - Open source LXI tools
https://tio.github.io - A simple TTY terminal I/O application
http://dc-power-supply.github.io - OSHW DC power supply project
 

Offline lundmar

  • Frequent Contributor
  • **
  • Posts: 255
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #116 on: December 11, 2017, 06:47:29 AM »
If helps, I updated the firmware to the latest version and same error (timeout).
On MSO1104Z-S, DG4062 and DSA815 screenshot works with no problem.

Ok. I've updated liblxi so that the lxi_connect() function does not try to set up any locking during establishment of the VXI-11 connection. Please update and try it out.

In case you don't want to bother with manual compilation the snap version should already be available on the edge channel.

Snap build status can be monitored here: https://build.snapcraft.io/user/lxi-tools/lxi-tools.snapcraft
https://lxi-tools.github.io - Open source LXI tools
https://tio.github.io - A simple TTY terminal I/O application
http://dc-power-supply.github.io - OSHW DC power supply project
 

Offline lundmar

  • Frequent Contributor
  • **
  • Posts: 255
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #117 on: December 11, 2017, 07:15:08 AM »
Doh!

I've just studied the documentation for DM3058 and DM3068.

It seems that the SCPI command that we use to request screenshot data ":display:data?" is actually not supported on these instruments.

It might be an undocumented feature but it does not seem to be the case.

Looks like we will have to remove the rigol-dm3000 plugin.

@PeDre , you agree?
« Last Edit: December 11, 2017, 07:21:47 AM by lundmar »
https://lxi-tools.github.io - Open source LXI tools
https://tio.github.io - A simple TTY terminal I/O application
http://dc-power-supply.github.io - OSHW DC power supply project
 

Offline lundmar

  • Frequent Contributor
  • **
  • Posts: 255
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #118 on: December 11, 2017, 10:18:36 AM »
lxi screenshot -a 192.168.1.59 -m rigol-2000 #Works fine now

1. Can there be a option for png instead of bmp? png are smaller.

The image format depends on which formats the instrument supports. PNG is certainly the preferred format but not all instruments support it. The Rigol 2000 series supports PNG for internal storage of screenshots but it is not documented whether it is possible to retrieve PNG remotely. Please try out the '"rigol_2000_png" branch and let me know if it creates a proper PNG for you. If not I'm afraid it is not possible unless the lxi tool itself starts doing BMP->PNG conversion but I think that is a bad idea. I would rather provide the raw material straight from the instrument and then the user can do as they please.

Update: The screenshot command now supports redirecting the screenshot image data to stdout. To do so simply use '-' as the output filename. This means it is now possible to pass on the captured image to external tools for image processing, such as converting it to a different image format. For example, to convert to .jpg using imagemagicks convert tool:

Code: [Select]
$ lxi screenshot --address 10.0.0.42 - | convert - screenshot.jpg

This feature will be included in the upcoming release. It is already available in the snap edge channel.
« Last Edit: December 11, 2017, 10:23:40 AM by lundmar »
https://lxi-tools.github.io - Open source LXI tools
https://tio.github.io - A simple TTY terminal I/O application
http://dc-power-supply.github.io - OSHW DC power supply project
 

Offline PeDre

  • Contributor
  • Posts: 12
  • Country: at
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #119 on: December 11, 2017, 05:41:09 PM »
Looks like we will have to remove the rigol-dm3000 plugin.

@PeDre , you agree?

I have received feedback from two users that the Rigol DM3068 (Firmware 01.01.00.01.08.00.01 and 01.01.00.01.09.00) with the SCPI command ":DISP:DATA?" and my program works. This applies to the LAN and USB connection.

Peter
« Last Edit: December 11, 2017, 06:08:23 PM by PeDre »
 

Offline PeDre

  • Contributor
  • Posts: 12
  • Country: at
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #120 on: December 11, 2017, 07:49:36 PM »
I found Wireshark protocols in my records.
The error was the timeout when creating the connection (CREATE_LINK). The timeout could then be used for write or read commands.

Peter
 

Offline lundmar

  • Frequent Contributor
  • **
  • Posts: 255
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #121 on: December 12, 2017, 01:44:39 AM »
Looks like we will have to remove the rigol-dm3000 plugin.

@PeDre , you agree?

I have received feedback from two users that the Rigol DM3068 (Firmware 01.01.00.01.08.00.01 and 01.01.00.01.09.00) with the SCPI command ":DISP:DATA?" and my program works. This applies to the LAN and USB connection.

Peter

Ok good - so it is just an undocumented feature.

I found Wireshark protocols in my records.
The error was the timeout when creating the connection (CREATE_LINK). The timeout could then be used for write or read commands.

Peter

Ok, then my latest changes should hopefully solve the issue.

Thanks for the helpful input Peter :-+

@crispus, Please test latest git or snap and let us know if works or fails. Also, thank you for testing  :-+

Man, I wish I had more instruments so I could create a small lab with various instruments for regression and feature testing.
« Last Edit: December 12, 2017, 01:49:44 AM by lundmar »
https://lxi-tools.github.io - Open source LXI tools
https://tio.github.io - A simple TTY terminal I/O application
http://dc-power-supply.github.io - OSHW DC power supply project
 

Offline crispus

  • Regular Contributor
  • *
  • Posts: 95
  • Country: ro
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #122 on: December 12, 2017, 02:04:33 AM »
@crispus, Please test latest git or snap and let us know if works or fails. Also, thank you for testing  :-+
If you refer to https://github.com/lxi-tools/liblxi/commit/12017460e30654e6b10ac99e982bb0d534b9df5e , I tested yesterday and it doesn't seem to work.
I will check again this evening and post the results.

Man, I wish I had more instruments so I could create a small lab with various instruments for regression and feature testing.
I mentioned that I have also MSO1104Z-S, DG4062 and DSA815-TG. And periodically I could run some regression tests.
I know I'm numskull, but I look around me and I feel better.
 

Offline lundmar

  • Frequent Contributor
  • **
  • Posts: 255
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #123 on: December 12, 2017, 02:25:17 AM »
@crispus, Please test latest git or snap and let us know if works or fails. Also, thank you for testing  :-+
If you refer to https://github.com/lxi-tools/liblxi/commit/12017460e30654e6b10ac99e982bb0d534b9df5e , I tested yesterday and it doesn't seem to work.
I will check again this evening and post the results.

I appreciate the double check. Even I sometimes forget to install the library after updating it he he. Otherwise, the snap is readily available (revision #214 or newer).

Man, I wish I had more instruments so I could create a small lab with various instruments for regression and feature testing.
I mentioned that I have also MSO1104Z-S, DG4062 and DSA815-TG. And periodically I could run some regression tests.

If you can confirm/test that your DG4062 and MSO1104Z-S works with discover+scpi+screenshot then I would like to add them to the list of tested instruments. The DSA-815 is already in the list. Thanks.

Regarding regression testing, I might reach out to you if I feel that some testing is needed before a release that includes significant changes.
https://lxi-tools.github.io - Open source LXI tools
https://tio.github.io - A simple TTY terminal I/O application
http://dc-power-supply.github.io - OSHW DC power supply project
 

Offline crispus

  • Regular Contributor
  • *
  • Posts: 95
  • Country: ro
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #124 on: December 12, 2017, 07:47:13 AM »
Still doesn't work (neither with snap --edge, nor from source files)
Same error (the following output is from snap):
Code: [Select]
$ lxi
Usage: /snap/lxi-tools/220/bin/lxi [--version] [--help] <command> [<args>]

$ lxi screenshot -a 192.168.1.144 -
Loaded rigol-dm3000 screenshot plugin
Error: Read error (timeout)
Error: Failed to receive message

Discover && screnshots works from other instruments:
Code: [Select]
$ lxi discover --timeout 1
Searching for LXI devices - please wait...

Broadcasting on interface lo
Broadcasting on interface eth0
  Found "Rigol Technologies,DG4062,DG4xxx,00.01.12" on address 192.168.1.67
  Found "RIGOL TECHNOLOGIES,MSO1104Z,DS1xxxx,00.04.04.SP3" on address 192.168.1.149
  Found "Rigol Technologies,DM3058,DM3xxx,01.01.00.02.02.00" on address 192.168.1.144

$ lxi screenshot -a 192.168.1.67 - | convert - fg.png
$ lxi screenshot -a 192.168.1.149 - | convert - osc.png
$ ll *.png
-rw-rw-r-- 1 user user 141799 dec 11 22:34 fg.png
-rw-rw-r-- 1 user user  20750 dec 11 22:34 osc.png

Maybe it is useful to include in version name the git commits id (tools & lib) in order to be sure on what commit is the binary.
SCPI commands seems to work as well.
I know I'm numskull, but I look around me and I feel better.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf