Poll

What OS platform would you like to see lxi-tools ported to next?

Windows
macOS
Other
Don't port it - Linux is the future for all!

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

lundmar and 2 Guests are viewing this topic.

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« on: October 08, 2017, 04:51:10 am »
Hi,

I have released lxi-tools for GNU/Linux - see https://lxi-tools.github.io

The lxi-tools open source project provides the following:
  • "lxi" - a command line tool that features a simple interface for discovering LXI compatible instruments, sending SCPI messages, capturing screenshots, benchmarking, and scripted automation
  • "lxi-gui" - a GUI application that features some of the same features as the command line tool and additional features such as a screenshot viewer and a data recorder
  • "liblxi" - a C library which provides a high level API for LXI instrument discovery (using VXI-11 or mDNS/DNS-SD) and basic SCPI communication (using RAW/TCP or VXI-11/TCP)







It's fully open source and available for download.

For details on how to use the commandline interface please see https://github.com/lxi-tools/lxi-tools

Installation:
Latest lxi-tools:  lxi-tools-1.19.tar.xz  (Changes, GitHub)
Latest liblxi:  liblxi-1.12.tar.xz  (Changes, GitHub)

Install latest stable version using snap:  $ snap install lxi-tools
Install latest development version using snap:  $ snap install lxi-tools --edge
Supported snap architectures: amd64, i386, armhf

Visit https://snapcraft.io to see how to install snap for your distribution.

If you are a Windows user you can install e.g. Virtualbox (see https://www.virtualbox.org) and install Linux (e.g. Ubuntu 17.10) in a VM under which you install and run lxi-tools.
Note: Remember to reconfigure the VMs network interface to use a bridged network adapter (not NAT).

Motivation:
This open source project is for people who don't care for the proprietary, costly, and often times inferior tools available for controlling LXI compatible instruments. The very reason I authored lxi-tools/liblxi is because I wanted better and simpler tools for controlling my instruments. Stuff like NI VISA drivers/tools etc. are just too bloated for my taste and not really open source friendly. I think we can do better. After all, LXI is an open standard so why not make some proper open source tools to support it :)

Tested instruments:
The lxi commandline tool included in lxi-tools is tested to work successfully with the following instruments:

InstrumentWorking features
Keysight Technologies AWG 33612A(discover+scpi+screenshot)
Keysight Technologies DMM 34461A(discover+scpi+screenshot)
Keysight Technologies MSO-X 3024T(discover+scpi+screenshot)
Rigol Technologies DS1104Z(discover+scpi+screenshot)
Rigol Technologies DS2302(discover+scpi+screenshot)
Rigol Technologies DG4062(discover+scpi+screenshot)
Rigol Technologies DG4102(discover+scpi+screenshot)
Rigol Technologies DG4162(discover+scpi+screenshot)
Rigol Technologies DP831(discover+scpi+screenshot)
Rigol Technologies DP832(discover+scpi+screenshot)
Rigol Technologies DM3068(discover+scpi+screenshot)
Rigol Technologies DSA815(discover+scpi+screenshot)
Rigol Technologies MSO2302A(discover+scpi+screenshot)
Rigol Technologies DP832(discover+scpi+screenshot)
Rohde & Schwarz HMC 8012(discover+scpi+screenshot)
Rohde & Schwarz HMC 8043(discover+scpi+screenshot)
Rohde & Schwarz HMO 1202(discover+scpi+screenshot)
Rohde & Schwarz HMO 3054(scpi+screenshot)
Rohde & Schwarz RTB 2004(discover+scpi+screenshot)
Siglent Technologies SDG1032X(discover+scpi+screenshot)
Siglent Technologies SDG2122X(discover+scpi+screenshot)
Siglent Technologies SDG6052(discover+scpi+screenshot)
Siglent Technologies SDS1202X-E(discover+scpi+screenshot)
Siglent Technologies SDS1204X-E(discover+scpi+screenshot)
Siglent Technologies SDS2304X(discover+scpi+screenshot)
Siglent Technologies SDM3045X(discover+scpi+screenshot)
Siglent Technologies SDM3055(discover+scpi+screenshot)
Siglent Technologies SDM3065X(discover+scpi+screenshot)
Siglent Technologies SPD3303X-E(scpi)
Siglent Technologies SSA3032X(discover+scpi+screenshot)

Thanks to all the users in this forum who are helping to test and improve lxi-tools!  :-+

Future work include:
  • Test with more instruments (recurring task, looking for testers with instruments)
  • Add screenshot plugins for more instruments (recurring task)
  • Push it to the most popular GNU/Linux distributions (Ubuntu/Debian, Fedora/RHEL, etc.)
  • Make it work on non-GNU/Linux systems (Windows, macOS, etc.)
  • Extend discover feature to support mDNS/DNS-SD
  • Add HiSlip/TCP support
  • Add a modern QT GUI app with features from commandline tool
  • Add support for advanced scripting in Lua
  • Add GUI feature to support running advanced scripts in a test batch mode (run, pause, continue, pass/fail etc.)
  • Add IPv6 support
  • ...

Call for contributors:
Anyone who would like to contribute to this project is welcome to join in. All types of contributions are welcome (code, feature ideas, doc, test, etc.).

P.S.: Developers/hackers, feel free to contribute. Start maybe by adding e.g. screenshot plugins for your favorite LXI instruments and push them upstream to lxi-tools via GitHub.
P.P.S: For inspiration, see https://github.com/lxi-tools/lxi-tools/blob/master/src/plugins/screenshot_rigol-1000z.c which is the code for the screenshot plugin for Rigol 1000z oscilloscopes.
P.P.P.S: lxi-tools is not in any way affiliated with the LXI consortium. It is a fully independent open source effort.

Steps for building and installing the latest versions from git source (Ubuntu/Debian example):

Code: [Select]
sudo apt-get install git automake autogen autoconf libtool libreadline-dev libc-dev-bin libc6-dev libavahi-core-dev libavahi-common-dev libavahi-client-dev libxml2-dev liblua5.2-dev

mkdir lxi && cd lxi
git clone [url]https://github.com/lxi-tools/liblxi[/url] && cd liblxi
./autogen.sh
./configure --prefix=$HOME/opt/lxi
make install
cd ..

git clone [url]https://github.com/lxi-tools/lxi-tools[/url] && cd lxi-tools
./autogen.sh
./configure --prefix=$HOME/opt/lxi LDFLAGS=-L$HOME/opt/lxi/lib
make CFLAGS=-I$HOME/opt/lxi/include install
cd ..

export PATH=$HOME/opt/lxi/bin:$PATH
« Last Edit: April 09, 2018, 05:44:01 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: 218
  • Country: ar
  • Just an IT monkey with a DSO
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #1 on: October 08, 2017, 07:51:23 am »
I've opened an issue for lxi-tools. Perhaps I'm messing things up when compiling
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #2 on: October 08, 2017, 10:11:21 am »
I've opened an issue for lxi-tools. Perhaps I'm messing things up when compiling

Nope - you did actually find a real bug. Thanks for your github reporting.

It enabled me to quickly release lxi-tools v1.1 which includes the fix. It is available at http://lxi-tools.github.io
« Last Edit: December 20, 2017, 11:49:05 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
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #3 on: October 18, 2017, 12:53:47 am »
New versions of lxi-tools and liblxi are available at http://lxi-tools.github.io

They include some important bug fixes that resolves issues with some instruments not responding.
« Last Edit: December 20, 2017, 11:49:24 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 awallin

  • Frequent Contributor
  • **
  • Posts: 382
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #4 on: October 18, 2017, 03:56:12 am »

do you have plans for python bindings?

Might be a stupid question, but what's the difference between LXI and VXI11?
I've been using this for basic things - with good success: https://github.com/python-ivi/python-vxi11

thanks,
Anders
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #5 on: October 18, 2017, 07:27:10 am »
do you have plans for python bindings?

Not at the moment. Mostly because I don't have a need for it myself. However, if anyone wants to contribute some python bindings I welcome it.

Might be a stupid question, but what's the difference between LXI and VXI11?

It's a perfectly fine question. The short answer is that the LXI standard defines the set of communication protocols used in a LXI/Ethernet enabled instrument. Such protocols include HTTP, VXI11, etc. and in the future HiSLIP. VXI11 is the specific RPC protocol that is used to communicate eg. SCPI commands. It is a fairly dated and slow protocol that will eventually be replaced with the more modern and faster HiSLIP (High-Speed LAN Instrument Protocol).

liblxi provides a simple high level C api that abstracts away the details of the VXI protocol for doing simple stuff like discovering instruments, sending SCPI commands, and receiving responses. Eventually it will do the same for HiSLIP.
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
 
The following users thanked this post: nugglix

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #6 on: October 27, 2017, 02:25:18 am »
New versions of lxi-tools and liblxi are available at https://lxi-tools.github.io

Updates includes some important bug fixes that resolve issues with timeout and receive errors. The API used to connect has also been improved.

For those using Fedora there will be updated packages available in 1-2 weeks or so.
« Last Edit: December 20, 2017, 11:47:44 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
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #7 on: October 28, 2017, 05:12:00 pm »
A new version of lxi-tools has been released - see https://github.com/lxi-tools/lxi-tools

The screenshot feature has now become a subcommand of the lxi tool instead of the separate tool rigol_1000z_screenshot.

Code: [Select]
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 to file                                   

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                                               

Screenshot options:     
  -a, --address <ip>                  Device IP address                                             
  -t, --timeout <seconds>             Timeout (default: 3)                                         
  -m, --model <name>                  Name of device model (model/family)                           
  -l, --list                          List supported device models                                 


Code: [Select]
EXAMPLES
       Send SCPI command to LXI device:

              lxi scpi -a 192.168.0.42 "*IDN?"

       Capture screenshot from LXI device with specific model/family:

              lxi screenshot -a 192.168.0.42 -m rigol-1000z my-screenshot.png

Also added is a small screenshot plugin framework which makes it possible to easily add screenshot support for new instruments for those interested in doing so.
« Last Edit: December 20, 2017, 11:47:58 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
 

Online RoGeorge

  • Frequent Contributor
  • **
  • Posts: 714
  • Country: ro
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #8 on: October 30, 2017, 06:29:36 am »
I noticed that running "lxi discover" does not find any instrument when running on a Debian 8.0 installed in a VMware machine that is running under Windows 10, but sending SCPI commands to specified addresses works just fine.

- The Debian 8 VMware machine is set to use "NAT: Used to share the host's IP address".
- All the Rigol instruments respond when pinged from Deb8.
- In the PC there are 2 physical network cards, one of them is used for the instruments, 192.168.1.*, the other physical network card is for Internet connection, 192.168.100.*
- Both the Internet and the ping to any Rigol instrument works just fine from either Win10 or the Deb8 VMware machine.

For the moment I don't have a native Debian 8 installation without using VMware.

Is this a bug?

Code: [Select]
[email protected]:~$ lxi scpi -a 192.168.1.3 *IDN?
RIGOL TECHNOLOGIES,DS1104Z,DS1ZA16*,00.04.04.SP3
[email protected]:~$ lxi scpi -a 192.168.1.4 *IDN?
RIGOL TECHNOLOGIES,DP832,DP8C16*,00.01.11
[email protected]:~$ lxi scpi -a 192.168.1.5 *IDN?
Rigol Technologies,DG4102,DG4E17*,00.01.12
[email protected]:~$ lxi discover
Searching for LXI devices - please wait...

Broadcasting on interface lo
Broadcasting on interface eth0

No devices found

[email protected]:~$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:0c:29:*:*:* brd ff:ff:ff:ff:ff:ff
    inet 192.168.146.134/24 brd 192.168.146.255 scope global dynamic eth0
       valid_lft 1711sec preferred_lft 1711sec
    inet6 fe80::20c:*:*:*/64 scope link
       valid_lft forever preferred_lft forever
[email protected]:~$
« Last Edit: October 30, 2017, 06:41:21 am by RoGeorge »
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #9 on: October 30, 2017, 07:05:24 am »
I noticed that running "lxi discover" does not find any instrument when running on a Debian 8.0 installed in a VMware machine that is running under Windows 10, but sending SCPI commands to specified addresses works just fine.

- The Debian 8 VMware machine is set to use "NAT: Used to share the host's IP address".

Thats your problem right there - broadcast messages do not translate through NAT and so the lxi discover command will never receive a response from your instrument.

The way to solve it is reconfiguring your VMWare guest to use a bridged network adapter instead of a NAT one.

FYI - lxi discover is tested to work fine with a bridged network adapter from a guest under VirtualBox. I highly recommend using VirtualBox instead of VMWare, but for other reasons :)
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
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #10 on: October 31, 2017, 06:03:58 am »
I've added screenshot support for more instruments:

Code: [Select]
$ lxi screenshot --list
            Name   Description
keysight-iv2000x   Keysight InfiniVision 2000 X series oscilloscopes (experimental)
           rigol   Rigol 1000z/2000/4000 series oscilloscopes
      rs-hmo1000   Rohde & Schwarz HMO 1000 series oscilloscopes (experimental)
  tektronix-2000   Tektronix MSO/DPO 2000 series oscilloscopes (experimental)

It's experimental since I don't have the instruments to test on. But in theory it should work assuming the instrument documentation is accurate :)

Example:
Code: [Select]
lxi screenshot --adress 192.168.0.40 --model rigol screenhot.png
Saved PNG screenshot image to screenhot.png
« Last Edit: November 03, 2017, 01:12:20 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
 
The following users thanked this post: grouchobyte

Online RoGeorge

  • Frequent Contributor
  • **
  • Posts: 714
  • Country: ro
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #11 on: October 31, 2017, 06:27:58 am »
Great, thank you!  :-+

Questions and comments:

- AFAIK all Rigol oscilloscopes use the same SCPI command for a screenshot. Why it was necessary in the code to separate them by 1000/2000/4000 models?
- Also, since lxi-tools allows running a SCPI text file, why not just defining a text SCPI file for each instrument, so the user can add its own instrument any time?
- A thing that I noticed when capturing screenshots with my software was that I was lazy enough to write a small script to increment the file name, so I made the code to put a timestamp in the filename. That was useful because once a command it's typed in the terminal, it's very easy to repeat it by simply "up arrow" and "enter", and the previous screenshot files will not be overwritten.
- I can add screnshots for the Rigol DG4000 DDS signal generators if you want, and for the Rigol DP832 power source. Should I make a pull request, or just tell you here the SCPI commands after manually testing them on my instruments?

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #12 on: October 31, 2017, 07:48:27 am »
- AFAIK all Rigol oscilloscopes use the same SCPI command for a screenshot. Why it was necessary in the code to separate them by 1000/2000/4000 models?
I know. It is the exact same plugin code being run for all the rigol model names but I though it looked better in the list but I think I will end up collapsing it back into one model name "rigol".

- Also, since lxi-tools allows running a SCPI text file, why not just defining a text SCPI file for each instrument, so the user can add its own instrument any time?
The point of the screenshot command is to make it extremely simple to quickly grab a screenshot from a supported model. The best thing for users to do is to simply push a plugin upstream or use liblxi to solve their screenshot needs. Also, you cant easily define in a text file how to strip headers/footers of various complexity - it would quickly become a messy solution. However, I have been pondering to add support for maybe sending/receiving binary data via files using the "lxi scpi" command, in which case users can do whatever they want, even implement screenshot capturing for unsupported models even though I would prefer them to push plugins so everyone can benefit.

- A thing that I noticed when capturing screenshots with my software was that I was lazy enough to write a small script to increment the file name, so I made the code to put a timestamp in the filename. That was useful because once a command it's typed in the terminal, it's very easy to repeat it by simply "up arrow" and "enter", and the previous screenshot files will not be overwritten.
I want the user to be able to explicitly define the resulting filename regardless of image format. This way you can do exactly what you just have done via scripting. But maybe I could make the filename optional so that if no filename is provided it will automatically save to screenshot001.png, screenshot002.png, etc.. Timestamp is not necessary as it would be redundant information since files include a time stamp. **DONE**

- I can add screnshots for the Rigol DG4000 DDS signal generators if you want, and for the Rigol DP832 power source. Should I make a pull request, or just tell you here the SCPI commands after manually testing them on my instruments?

Sure, do a pull request if you want to take a shot at the code. Actually, I was looking a bit quickly through the DP832 docs but didn't find the scpi command for capturing screenshots. I assume it is the same as other rigols but I'm not sure. If not, we can quickly create plugins for specific Rigol models.
« Last Edit: October 31, 2017, 12:16:49 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
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #13 on: November 02, 2017, 07:13:34 am »
FYI - I've added raw/TCP support for sending commands:

Code: [Select]
lxi scpi --raw --address 192.168.0.42 "*IDN?"
RIGOL TECHNOLOGIES,DS1104Z,DS1ZA1234567890,00.04.04.SP3

It is faster than VXI-11 but does not provide the same advantages that VXI-11 brings, in particular there is no timeout/control handling in case your SCPI command somehow stalls/crashes.

A configurable communications backend has also been added to liblxi in the effort to support raw/TCP and also in preparation for adding support for HiSlip/TCP in the future.

These changes will be included in the upcoming releases.
« Last Edit: November 02, 2017, 07:19:15 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
 
The following users thanked this post: dr.diesel

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #14 on: November 02, 2017, 09:06:47 am »
- I can add screnshots for the Rigol DG4000 DDS signal generators if you want, and for the Rigol DP832 power source. Should I make a pull request, or just tell you here the SCPI commands after manually testing them on my instruments?

Please, if you can don't hesitate to test the lxi tool with any LXI/LAN enabled instrument you have :)


I'm looking to hear from anyone who would like to test lxi-tools with their LXI/LAN instruments so that we can improve it steadily. The more instruments that the tools are tested against the better. I'm going to add a list of tested instruments in the README.

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
 

Online RoGeorge

  • Frequent Contributor
  • **
  • Posts: 714
  • Country: ro
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #15 on: November 02, 2017, 12:22:50 pm »
I can test DG4102 screenshot when I'll return home, maybe next Monday or Tuesday.
 
The following users thanked this post: lundmar

Offline rhb

  • Frequent Contributor
  • **
  • Posts: 916
  • Country: us
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #16 on: November 05, 2017, 08:19:31 am »
FYI

liblxi fails in ./configure because it can't find ifaddrs.h on Solaris 10 u8

lxi-tools fails in ./configure because it can't find libreadline even though liibreadline is in /app/lib and /app/lib is in LD_LIBRARY_PATH

FWIW I have 397 executables in /app/bin, all of which were compiled from source.

Back during the workstation wars I built a large system for SunOS, AIX, IRIX, CLIX, Ultrix and HP-UX with only two #ifdefs in the code.  One for byte sex and the other for FORTRAN record length.  The only build dependency was the presence of Gnu make on all systems.  We now have autotools just to make code portable across linux distros.
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #17 on: November 05, 2017, 10:17:37 am »
FYI

liblxi fails in ./configure because it can't find ifaddrs.h on Solaris 10 u8

lxi-tools fails in ./configure because it can't find libreadline even though liibreadline is in /app/lib and /app/lib is in LD_LIBRARY_PATH

FWIW I have 397 executables in /app/bin, all of which were compiled from source.

Back during the workstation wars I built a large system for SunOS, AIX, IRIX, CLIX, Ultrix and HP-UX with only two #ifdefs in the code.  One for byte sex and the other for FORTRAN record length.  The only build dependency was the presence of Gnu make on all systems.  We now have autotools just to make code portable across linux distros.

I'm sorry but lxi-tools and liblxi are designed for use with GNU/Linux systems only.

I'm not surprised you run into issues trying to install it on Solaris and I can't really recommend doing so. If I'm not mistaken Solaris still uses the Solaris C library and clearly it does not include ifaddrs.h . The GNU C library includes it.

The autotools readline check included is a very basic one. If it fails it could be because of missing or wrong configure options.
« Last Edit: November 05, 2017, 10:19:51 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 rhb

  • Frequent Contributor
  • **
  • Posts: 916
  • Country: us
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #18 on: November 05, 2017, 12:33:20 pm »
Congratulations on recreating the major mistakes of the last 70 years.

Did you ever hear of POSIX?  RMS coined the name and the concept.  If you write to the C  and POSIX standards your code will run easily almost anywhere.  That was why that 500,000+ line mixture of C, FORTRAN, lex and yacc ran on all those different systems.  The package was a port from VMS and I insisted on conformance to standards.  It was in regular use for almost 20 years with no support at all for probably 10 years.  There were no bugs left.  We had fewer than a dozen user submitted bugs the first year of deployment and it went down from there.  Every build included a large test suite.  When we wrote a module, we wrote tests for it and ran it on all the supported platforms.  It makes you very sensitive to where the standards say that behavior is "undefined" or "implementation dependent".  So you don't do stupid stuff.

The readline check fails because autotools is semantically and conceptually broken.  It is *supposed* to look in all the directories in LD_LIBRARY_PATH.  I don't try to fix broken machine generated code.  I wasted an entire week trying to get Octave to work once because they botched the autotools setup.  Never mind that R compiled just fine.  I've compiled a lot of code that uses Gnu readline.  Ken Thompson wrote early versions of Unix in fewer lines than a configure script!

The consequence is simply that I shall write my own software rather than contribute to yours. A command line LXI interface is just an example program  from "Advanced Programming in the Unix Environment" by Stevens and Rago decorated with some LXI details.  It can also be done in python or perl, though I don't care much for either.

There's a Dilbert cartoon on the cover of Stevens and Rago that's very relevant.  The interchange in the last  frame is "You're one of those condescending Unix users."  "Here's a nickel, kid.  Get yourself a better computer."
 
The following users thanked this post: cdev

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #19 on: November 05, 2017, 02:15:27 pm »
Congratulations on recreating the major mistakes of the last 70 years.

Did you ever hear of POSIX?  RMS coined the name and the concept.  If you write to the C  and POSIX standards your code will run easily almost anywhere.  That was why that 500,000+ line mixture of C, FORTRAN, lex and yacc ran on all those different systems.  The package was a port from VMS and I insisted on conformance to standards.  It was in regular use for almost 20 years with no support at all for probably 10 years.  There were no bugs left.  We had fewer than a dozen user submitted bugs the first year of deployment and it went down from there.  Every build included a large test suite.  When we wrote a module, we wrote tests for it and ran it on all the supported platforms.  It makes you very sensitive to where the standards say that behavior is "undefined" or "implementation dependent".  So you don't do stupid stuff.

The readline check fails because autotools is semantically and conceptually broken.  It is *supposed* to look in all the directories in LD_LIBRARY_PATH.  I don't try to fix broken machine generated code.  I wasted an entire week trying to get Octave to work once because they botched the autotools setup.  Never mind that R compiled just fine.  I've compiled a lot of code that uses Gnu readline.  Ken Thompson wrote early versions of Unix in fewer lines than a configure script!

The consequence is simply that I shall write my own software rather than contribute to yours. A command line LXI interface is just an example program  from "Advanced Programming in the Unix Environment" by Stevens and Rago decorated with some LXI details.  It can also be done in python or perl, though I don't care much for either.

There's a Dilbert cartoon on the cover of Stevens and Rago that's very relevant.  The interchange in the last  frame is "You're one of those condescending Unix users."  "Here's a nickel, kid.  Get yourself a better computer."

 :-//

I'm sorry but I think your criticism is quite misdirected. I get a feeling you are angry for other reasons and you are just here to prolong whatever workstation wars you have been engaged in for years. I mean, it's all very nice stories but I can't fix the world for you.

Autotools is by no means perfect but it is still the preferred way of distributing software for GNU/Linux systems.

And let me repeat myself, lxi-tools and liblxi is written for GNU/Linux systems (as stated on the frontpage of https://lxi-tools.github.io and in all the READMEs). This means it will not work on POSIX only systems.

I'm a professional SW engineer and I'm a big fan of POSIX and I use it extensively in most software that I write. However, for some applications, part of the software rely on system level features which are not covered by any of the available POSIX standards. In case of liblxi I'm relying on specific interfaces that allows me to discover and manage all available network interfaces to be used in the lxi discover feature. No such interfaces are available via POSIX. Hence I write that part of the code specifically for GNU/Linux systems because it is the most popular platform out there in the *nix world.

To support Solaris I would have to write and maintain these code parts specifically for Solaris. Unfortunately, I simply don't have any plans to support Solaris. Why? Because fact is Solaris is a dying platform with a small and rapidly declining user base. This is true, now more than ever, especially since Oracle laid off the Solaris core development staff this year. R.I.P.
« Last Edit: December 20, 2017, 11:49:59 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
 
The following users thanked this post: Gabri74

Online RoGeorge

  • Frequent Contributor
  • **
  • Posts: 714
  • Country: ro
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #20 on: November 07, 2017, 03:04:32 am »
Made a new build today and testing right now, so brace yourself for a lot of :blah: and :rant:, but no :clap:, even if you fully deserve all the appreciation.

While my general impression about lxi-tools is a very good one :-+, and I highly appreciate what you already put there, in the next messages I will focus only on what I don't like, or on what didn't work as I expected. Many of them will rather be about my personal preferences and feature requests, maybe some misusage from my side, so not exactly a bug report. Didn't looked into the code yet.

I will repeatedly post here while testing, but I will avoid discussing solutions during testing, so please don't get annoyed if I don't reply until tomorrow.

Offline rhb

  • Frequent Contributor
  • **
  • Posts: 916
  • Country: us
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #21 on: November 07, 2017, 04:10:30 am »
I'm a professional SW engineer and I'm a big fan of POSIX and I use it extensively in most software that I write. However, for some applications, part of the software rely on system level features which are not covered by any of the available POSIX standards. In case of liblxi I'm relying on specific interfaces that allows me to discover and manage all available network interfaces to be used in the lxi discover feature. No such interfaces are available via POSIX. Hence I write that part of the code specifically for GNU/Linux systems because it is the most popular platform out there in the *nix world.

Other than not being portable to non-Gnu/Linux systems, I don't see what this does

Quote
int lxi_discover(struct lxi_info_t *info, int timeout)
{
    struct sockaddr_in *broadcast_addr;
    struct ifaddrs *ifap;
    int status;

    // Go through available broadcast addresses
    if (getifaddrs(&ifap) == 0)
    {
   struct ifaddrs *ifap_p = ifap;

   while (ifap_p)
   {
            if ((ifap_p->ifa_addr) && (ifap_p->ifa_addr->sa_family == AF_INET))
            {
      broadcast_addr = (struct sockaddr_in *) ifap_p->ifa_broadaddr;

      // Notify current broadcast address and network interface via callback
      if (info->broadcast != NULL)
                    info->broadcast(inet_ntoa(broadcast_addr->sin_addr), ifap_p->ifa_name);

      // Find LXI devices via broadcast address
      status = discover_devices(broadcast_addr, info, timeout);

            }
            ifap_p = ifap_p->ifa_next;
   }
   freeifaddrs(ifap);
    }

    return LXI_OK;

that can't be done with this from POSIX.1 aka IEEE Std 1003.1 2004

Quote
9964 NAME
19965 SYNOPSIS
19966 #include <net/if.h>
if_nameindex — return all network interface names and indexes
struct if_nameindex *if_nameindex(void);
19967
19968 DESCRIPTION
19969 The if_nameindex( ) function shall return an array of if_nameindex structures, one structure per
19970 interface. The end of the array is indicated by a structure with an if_index field of zero and an
19971 if_name field of NULL.
19972 Applications should call if_freenameindex( ) to release the memory that may be dynamically
19973 allocated by this function, after they have finished using it.
19974 RETURN VALUE
19975 An array of structures identifying local interfaces. A NULL pointer is returned upon an error,
19976 with errno set to indicate the error.
19977 ERRORS
19978 The if_nameindex( ) function may fail if:
[ENOBUFS]
19979
Insufficient resources are available to complete the function.
19980 EXAMPLES
19981 None.
19982 APPLICATION USAGE
19983 None.
19984 RATIONALE
19985 None.
19986 FUTURE DIRECTIONS
19987 None.
19988 SEE ALSO
19989 getsockopt ( ), if_freenameindex( ), if_indextoname( ), if_nametoindex( ), setsockopt ( ), the Base
19990 Definitions volume of IEEE Std 1003.1-2001, <net/if.h>

It looks to me as if ifaddrs got written so someone could claim to be a Linux kernel contributor on their resume.

Anger is not the correct word.  Annoyed is more accurate.  I hate seeing unportable code that could trivially have been written to be portable to any Unix system.   I've had to fix far too much of it.

Solaris is quite alive despite being So Larry's.  Illumos (nee OpenSolaris) is actively developed and maintained by a number of small companies.  And MacOS is Unix, as are FreeBSD, OpenBSD and NetBSD.

If you don't understand the absurdity of autotools, then you don't grok the Unix tradition.

In this particular instance, I probably will fix your code, starting with dumping autotools.  An error generated by a compiler or linker is trivial to fix.  An error generated by autotools is pretty much impossible.  The Octave and  autotools developers both blamed each other.
 

Online RoGeorge

  • Frequent Contributor
  • **
  • Posts: 714
  • Country: ro
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #22 on: November 07, 2017, 04:40:00 am »
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):
Code: [Select]
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 setup
Debian 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 commands

1.
Code: [Select]
[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$
Passed

2.
Code: [Select]
[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 - Cosmetic
Help 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.
Code: [Select]
[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 inconvenience
Leftovers 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:
Code: [Select]
[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$
« Last Edit: November 07, 2017, 04:45:35 am by RoGeorge »
 

Online RoGeorge

  • Frequent Contributor
  • **
  • Posts: 714
  • Country: ro
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #23 on: November 07, 2017, 04:52:49 am »
4.
Code: [Select]
[email protected]:~/lxi-tools$ lxi discovery
Error: No IP address specified
[email protected]:~/lxi-tools$
Failed - Minor inconvenience
Misleading error message. There is a typo in the command name, "discovery" instead of "discover",  not a missing IP.

Online glarsson

  • Frequent Contributor
  • **
  • Posts: 351
  • Country: se
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #24 on: November 07, 2017, 05:08:01 am »
I hate seeing unportable code that could trivially have been written to be portable to any Unix system.   I've had to fix far too much of it.
Agree 100%. A common way to write code for Linux is to grep /usr/include until you find something.  |O
 

Online RoGeorge

  • Frequent Contributor
  • **
  • Posts: 714
  • Country: ro
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #25 on: November 07, 2017, 05:12:14 am »
5.
Code: [Select]
[email protected]:~/lxi-tools$ lxi scpi -r -a 192.168.1.3 "CHAN1:DISP?"
1
[email protected]:~/lxi-tools$ lxi scpi -a 192.168.1.3 "CHAN1:DISP?"
1
[email protected]:~/lxi-tools$ lxi scpi -a 192.168.1.3 -r "CHAN1:DISP?"
1
[email protected]:~/lxi-tools$ lxi scpi -ra 192.168.1.3 "CHAN1:DISP?"
1
[email protected]:~/lxi-tools$ lxi scpi -ra 192.168.1.3 "CHAN1 DISP?"
Command error
[email protected]:~/lxi-tools$ lxi scpi -a 192.168.1.3 "CHAN1 DISP?"
Error: Read error (timeout)
Error: Failed to receive message
[email protected]:~/lxi-tools$
Passed

Online RoGeorge

  • Frequent Contributor
  • **
  • Posts: 714
  • Country: ro
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #26 on: November 07, 2017, 05:28:09 am »
6.
Code: [Select]
[email protected]:~/lxi-tools$ lxi screenshot
Error: Missing address
[email protected]:~/lxi-tools$ lxi screenshot -a 192.168.1.3
Error: Missing model
[email protected]:~/lxi-tools$ lxi screenshot -a 192.168.1.3 -m rigol
Saved screenshot image to screenshot-000.png
[email protected]:~/lxi-tools$ lxi screenshot -a 192.168.1.3 -m rigol -f DS1Z_SCR.png
lxi: invalid option -- 'f'
Passed

Feature request 6.1. - add an option to specify the filename
Feature request 6.2. - add a shorter syntax, like "scr" for "screenshot"
Feature request 6.3. - make model optional, and auto identify the model using the IP and *IDN?
Feature request 6.4. - add an option for datetime-stamp in the filename
Feature request 6.5. - add an option for instrument ID in the filename (can be more than just 1 oscilloscope on the same network, so after a save there is no way to identify where from is the captured screen)
Feature request 6.5. - add an option to immediately open the captured screenshot - for making multiple screen captures (manually) until the best waveform is captured
« Last Edit: November 07, 2017, 05:44:44 am by RoGeorge »
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #27 on: November 07, 2017, 07:22:44 am »
Made a new build today and testing right now, so brace yourself for a lot of :blah: and :rant:, but no :clap:, even if you fully deserve all the appreciation.

While my general impression about lxi-tools is a very good one :-+, and I highly appreciate what you already put there, in the next messages I will focus only on what I don't like, or on what didn't work as I expected. Many of them will rather be about my personal preferences and feature requests, maybe some misusage from my side, so not exactly a bug report. Didn't looked into the code yet.

I will repeatedly post here while testing, but I will avoid discussing solutions during testing, so please don't get annoyed if I don't reply until tomorrow.

Thanks.

Don't worry, I'm always looking for constructive feedback so we can steadily improve the tools and squash any bugs found.

Thank you for your thorough testing. Let me comment on your findings accordingly:

1. Check.

2. I believe the way the commandline is described is fairly conventional. Yes, strictly speaking <command> is optional. However, you can't really do anything without the commands. I think it will only confuse users more if we make everything optional. Popular tools like git is described in a similar way.

3. Good catch. I've pushed a commit that should fix the issue. This is exactly why I need someone with multiple instruments to test :) I only have a single LXI instrument to test with :(

4. To be fixed. Update: FIXED

5. Check.

6.1 Already implemented,   "screenshot [<options>] [<filename>]  Capture screenshot" . If no filename is provided it will autoresolve it.

6.2 Sorry no. I'm not a fan of shorthand expressions like scr. To help lazy people the tool features full bash autocompletion ;) Try e.g. 'source <prefix>/share/bash-completion/completions/lxi' to load completion
manually.

6.3 Seemingly a good idea. Assuming ID strings are consistent then it is possible. I think it should be added to the TODO list as a possible feature in the future. It is something that the screenshot plugin framework should be modified to support.

6.4 Hmm, you win. However, we don't want an option for it. I'll just add date-time by default :) Update: FIXED

6.5 Appending the ID is a bit more tricky since you don't want to include the full string in the screenshot filename. This is something that each screenshot plugin needs to handle because only it will know what to strip from the ID strings of the instruments it supports. This can work if ID strings are consistent, if not it will be troublesome. Add it to the TODO list. As an alternative and simpler solution we could append the model and IP to the filename.

6.6 A good idea but I think this feature should be reserved for a separate graphical screenshot tool to be included in lxi-tools. Something to put on the TODO list too. A simple QT or GTK application would do the job.

Btw. feel free to register a github account and submit any issues you find in the lxi-tools issue tracker: https://github.com/lxi/lxi-tools/issues . Using github issues makes it easier to track and manage issues.
« Last Edit: November 07, 2017, 12:42:07 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
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #28 on: November 07, 2017, 07:25:56 am »
I hate seeing unportable code that could trivially have been written to be portable to any Unix system.   I've had to fix far too much of it.
Agree 100%. A common way to write code for Linux is to grep /usr/include until you find something.  |O

I don't think anyone disagrees here to the extend it is possible. Just be mindful not everything can be done in portable code and sometimes non-portable code is required, especially when dealing with hw interfaces.

Also, this is one open source project among many that I'm doing in the little spare time that I have available so I don't have the time to put endless rigor into making everything portable in the first go. That being said, anyone is welcome to contribute to the project and fix any issues they might find, including portability issues.
« Last Edit: November 07, 2017, 07:55:11 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
 

Online glarsson

  • Frequent Contributor
  • **
  • Posts: 351
  • Country: se
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #29 on: November 07, 2017, 08:08:34 am »
I don't think anyone disagrees here to the extend it is possible. Just be mindful not everything can be done in portable code and sometimes non-portable code is required, especially when dealing with hw interfaces.
True, but the non-portable code can be located in separate files to make it easier to port to different platforms.

Also, this is one open source project among many that I'm doing in the little spare time that I have available so I don't have the time to put endless rigor into making everything portable in the first go. That being said, anyone is welcome to contribute to the project and fix any issues they might find, including portability issues.
I was looking at adding code to sigrok or port lxi-tools to macOS (a certified UNIX with a marketshare larger than Linux) but did get the feeling that contributions to lxi-tools supporting platforms other than Linux was not welcome.
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #30 on: November 07, 2017, 08:57:35 am »
True, but the non-portable code can be located in separate files to make it easier to port to different platforms.
True, especially if there is a lot of it. Conditional ifdefs will do fine for smaller code bits, which is the case here.

I was looking at adding code to sigrok or port lxi-tools to macOS (a certified UNIX with a marketshare larger than Linux) but did get the feeling that contributions to lxi-tools supporting platforms other than Linux was not welcome.
Any contributions to improve lxi-tools or liblxi are welcome. Yes, it is initially made for and tested on GNU/Linux systems but that is mainly because I don't have the bandwidth nor access to test and support other platforms. In other words, I'm not opposed to supporting other platforms but only if someone would like to contribute/help maintain that support. That being said, not much is required to make it work on most platforms.

If you want to help make lxi-tools and liblxi work on macOS I welcome it  :-+
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
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #31 on: November 07, 2017, 11:02:56 am »
Other than not being portable to non-Gnu/Linux systems, I don't see what this does

vxi11_discover() iterates through the broadcast addresses of all available network interface. For each iteration it calls discover_devices() using the broadcast address to find the instruments.

Using getifaddrs() etc. is technically not portable code as it is not blessed by posix, it is however available on most platforms, including Linux, macOS, *BSD, and even Solaris 11+.

If you are not satisfied I invite your to contribute a variant of vxi11_discover() that works on your platform. Making it 100% portable is likely not possible since platforms like Linux are fading away their IOCTL support for retrieving network interface information (broadcast addresses etc.) in favor of a more efficient netlink mechanism.

By the way, you are looking at some old code there. See https://github.com/lxi/liblxi for latest.
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 rhb

  • Frequent Contributor
  • **
  • Posts: 916
  • Country: us
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #32 on: November 07, 2017, 12:45:07 pm »
FWIW I started porting it to Solaris 10 u8.  It's actually nicely written code from the little  I've looked at.  The code I'm using was downloaded from github as a tarball after you started this thread.  So I'm not sure how you can call it old.  Once I've got it running on Solaris, it will work on MacOS and *nix in general. 

if_nameindex() returns all the network interfaces and *is* part of  POSIX  and on Solaris 10 u8 which is so ancient I keep it off the Internet. It's the last Sun released version before it became So Larry's. So as a rough guess, 10 years old.  But nothing can match the Sun/Forte debugger.  Everything else is "flint knives and stone axes".  And I've used probably a dozen different *nix  debuggers.

At the moment I've got lxi_discover() commented out while I deal with other Gnuisms.   Once I've got it to run, I'll fix lxi_discover().

Yes, I'm a grumpy old man.  I've supported over 2 million lines of badly written code that other people inflicted upon the world.  I'm really tired of seeing the same mistakes made over and over again.  IBM created JCL to fix the problem of hard coded filenames.  And of course, *everyone* using JCL knew that everything after a space was a comment because that was the 360 assembler convention. Then 10-20 years later the Motif mob hard coded  xkeysymdb.  After 20+ years I've finally forgotten where. We now have a version of xclock that consumes more memory than most of the computers I've used had available. Your phone needs more horsepower than a Cray YMP.  Ain't progress grand!
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #33 on: November 07, 2017, 01:26:15 pm »
FWIW I started porting it to Solaris 10 u8.  It's actually nicely written code from the little  I've looked at.  The code I'm using was downloaded from github as a tarball after you started this thread.  So I'm not sure how you can call it old.  Once I've got it running on Solaris, it will work on MacOS and *nix in general. 

Sounds good  :-+

Sorry, I meant old as in 5 days old ... the code your are looking at is from before I did some rearrangements to support configurable communication backends (VXI11/TCP vs. RAW/TCP).

if_nameindex() returns all the network interfaces and *is* part of  POSIX  and on Solaris 10 u8 which is so ancient I keep it off the Internet.

Yes, however, getting interface names is not the problem. The problem is going from an interface name or index to actually retrieving the broadcast address in a portable way. I can't find any APIs for this except doing using ioctl() requests which is fine but not really well supported on recent Linux kernels anymore. From the little digging I've done this far I expect we need to do platform handling for this piece of code. I don't recall but I think this is the very reason I did what I did when I wrote this 2-3 years ago, I went with the seemingly most portable implementation.

Yes, I'm a grumpy old man.  I've supported over 2 million lines of badly written code that other people inflicted upon the world.  I'm really tired of seeing the same mistakes made over and over again.  IBM created JCL to fix the problem of hard coded filenames.  And of course, *everyone* using JCL knew that everything after a space was a comment because that was the 360 assembler convention. Then 10-20 years later the Motif mob hard coded  xkeysymdb.  After 20+ years I've finally forgotten where. We now have a version of xclock that consumes more memory than most of the computers I've used had available. Your phone needs more horsepower than a Cray YMP.  Ain't progress grand!

Well, I guess you earned your right to be grumpy ;)

Please bear in mind that I'm doing this open source project among quite a few other open source projects that I maintain in the little spare time I have available, so don't expect everything to be perfect. I simply don't have the time to put the same rigor in this as I do in my professional software projects. That being said, I think it is in a fair shape and with the help from your guys (contributors) I'm sure we can steadily improve it and maybe add some interesting features along the way.

Also, I think we have more views in common than you might think. For example, I share your lack of enthusiasm for perl and python. This is one of the very reasons I created lxi-tools/liblxi - I wanted a proper implementation in C for my LXI instrument control needs.
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
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #34 on: November 08, 2017, 05:41:29 am »
There have been lots of changes and bug fixes recently so I'm pushing new releases which are available for download at https://lxi.github.io

For a summary of changes see:

https://github.com/lxi/lxi-tools/releases/tag/v1.6
https://github.com/lxi/liblxi/releases/tag/v1.4
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
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #35 on: November 08, 2017, 11:23:37 pm »
The *IDN? answer for the last 2 instruments is:
Code: [Select]
[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$

Question, does the rigol screenshot plugin work with these two instruments?

Fun fact, after looking at the screenshot SCPI commands offered by various instruments I have to say that Rigol is by far the one with the most well structured / cleanest SCPI command syntax.  Instruments from the big manufacturers like Tektronix, Keysight, etc. have such cumbersome and illogically named commands. In other words, their syntax is influenced by too much legacy stuff that makes no sense in 2017. They could all do with a good cleanup.
« Last Edit: November 09, 2017, 12:28:57 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: 93
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #36 on: November 09, 2017, 09:08:39 am »
Hello,

I built lxi-tools from git. I get the following error.
What can be wrong?
 
[email protected]:~/lxi-tools/lxi-tools$ lxi discover
Searching for LXI devices - please wait...

Broadcasting on interface lo
Broadcasting on interface eth0
    Found "RIGOL TECHNOLOGIES,DS2302,DS2XXXXXXXXXXXXX,00.03.05.SP3" on address 192.168.1.59

Found 1 device

[email protected]:~/lxi-tools/lxi-tools$ lxi screenshot -a 192.168.1.59 -m rigol 
Error: Read error (timeout)
Error: Failed to receive message


Thanks
Dimitar
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #37 on: November 09, 2017, 10:07:30 am »
[email protected]:~/lxi-tools/lxi-tools$ lxi discover
Searching for LXI devices - please wait...

Broadcasting on interface lo
Broadcasting on interface eth0
    Found "RIGOL TECHNOLOGIES,DS2302,DS2XXXXXXXXXXXXX,00.03.05.SP3" on address 192.168.1.59

Found 1 device

[email protected]:~/lxi-tools/lxi-tools$ lxi screenshot -a 192.168.1.59 -m rigol
Error: Read error (timeout)
Error: Failed to receive message

Thanks for the bug report. Apparently retrieving screenshots from the 2000 series scopes differs slightly from the 1000 series.

To solve this I've made separate plugins for each series.

Try update to the latest lxi-tools git and use the "rigol-2000" model.

Let me know if it works or fails. Thanks.
« Last Edit: November 09, 2017, 11:30:23 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: 93
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #38 on: November 09, 2017, 07:39:41 pm »
Hi Lundmar,

Thank you for the fast update

lxi screenshot -a 192.168.1.59 -m rigol-2000 #Works fine now

I have following extra questions. Not sure which are important taking the current development plan in mind

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

2. The following doesn't work
[email protected]:~$ lxi scpi -ra 192.168.1.59 -m rigol-2000 "CHAN1 DISP?"
lxi: invalid option -- 'm'
[email protected]:~$ lxi scpi -ra 192.168.1.59  "CHAN1 DISP?"             
Error: Timeout
Error: Failed to receive message
Can I send scpi commands to my DS2000

3. I have Siglent SSA3021X instrument.
lxi screenshot -a 192.168.1.59  #Doesn't work for it. Is it a big deal to add support?

4. Few other test samples
lxi screenshot -m rigol-1000 #doesn't work for DP832.
lxi scpi -a 192.168.1.60  "*IDN?" #OK for my DP832.

It is interesting that for the DP832 If I send wrong scpi command I see "Wrong command" on the instrument display and I can not get any response from now on unless i reboot DP832. Is it a problem of DP832?

In general I think lxi-tools is a very good tool!
I  hope soon it will grow to support more instruments.
It can be a backbone for a real lab automation.
I really hate the big NI VISA drivers and stuff ... 

Thanks
Dimitar   
« Last Edit: November 09, 2017, 07:44:13 pm by dpenev »
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #39 on: November 09, 2017, 09:55:11 pm »
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.

2. The following doesn't work
[email protected]:~$ lxi scpi -ra 192.168.1.59 -m rigol-2000 "CHAN1 DISP?"
lxi: invalid option -- 'm'

Correct. The scpi command does not accept '-m'. Only the screenshot command requires this in order to use the corresponding screenshot plugin.

See 'lxi --help' or 'man lxi' to see which options applies to which command.

[email protected]:~$ lxi scpi -ra 192.168.1.59  "CHAN1 DISP?"             
Error: Timeout
Error: Failed to receive message
Can I send scpi commands to my DS2000

Yes, I expect so. Please try without the '-r' option. The raw option is faster but also less reliable because it uses basic RAW/TCP instead of the VXI11/TCP. Perhaps the instrument has crashed maybe due to an invalid command in which case the instrument has a hard time to recover in case of RAW/TCP (handled better by VXI11).

3. I have Siglent SSA3021X instrument.
lxi screenshot -a 192.168.1.59  #Doesn't work for it. Is it a big deal to add support?

If the instrument is LXI compatible, that is, it supports the VXI11/TCP protocol then it should just work.

However, it is not clear to me which Siglent instruments supports VXI11. The documentation for Siglent instruments seem sparse on this topic.

It is possible this instrument does not support VXI11 in which case you might want to try the --raw option instead and maybe in combination with --raw-port if the default port differs from 5555. You might have to do some digging to figure out what port is used (if used at all).

Actually, I've been in contact with Siglent asking if they would like to support the project with some of their instruments for testing so that we can make the tools work with their instruments. Sadly, I haven't heard from them yet. Feel free to write Siglent and ask them to support this project. I think there is a Siglent support thread in this forum where they are listening ;)

4. Few other test samples
lxi screenshot -m rigol-1000 #doesn't work for DP832.

I wouldn't expect it to since the plugin is tailored for the 1000z series scopes.

I took a quick look at the DP800 programmers manual and I couldn't find any evidence that it supports remote screenshot downloads so I'm afraid it is not possible to create a working plugin for this series unless there is an undocumented screenshot feature that I'm not aware of.


lxi scpi -a 192.168.1.60  "*IDN?" #OK for my DP832.

It is interesting that for the DP832 If I send wrong scpi command I see "Wrong command" on the instrument display and I can not get any response from now on unless i reboot DP832. Is it a problem of DP832?

Please try make sure _not_ to use the raw option in this case. We know that Rigol has issues with stalling invalid commands which ends up blocking the RAW/TCP channel. With VXI11/TCP the client tells the instrument that commands are executed under a certain timeout and it handles it accordingly so you can continue to send commands. With RAW/TCP there is no such mechanism.

In general I can't recommend using the --raw option unless you really need the performance gain.

In general I think lxi-tools is a very good tool!
I  hope soon it will grow to support more instruments.
It can be a backbone for a real lab automation.
I really hate the big NI VISA drivers and stuff ... 

Thanks
Dimitar

Thank you. Yes, I think you can get a long way with lxi-tools for convenient commandline operations. liblxi can also be quite useful if you are in need of a simple programmers API for your LXI instrument control needs. Hopefully it can grow into something useful for people who don't like the proprietary and often inferior tools. The very reason I authored lxi-tools/liblxi is because I wanted better tools for my GNU/Linux system. Also, I agree, stuff like NI VISA drivers etc. are just too bloated for my taste and not really open source friendly. I think we can do better. After all, LXI is an open standard so why not make some proper open source tools to support it  :)
« Last Edit: November 11, 2017, 05:44:41 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 borjam

  • Supporter
  • ****
  • Posts: 529
  • Country: es
  • EA2EKH
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #40 on: November 09, 2017, 10:12:53 pm »
Anger is not the correct word.  Annoyed is more accurate.  I hate seeing unportable code that could trivially have been written to be portable to any Unix system.   I've had to fix far too much of it.

(Warning, @Ludmar, not criticizing you although I really hope this can help instill a bit more love for portability!) ;)

I bear your pain, dude.

And some Linux militant attitude certainly doesn't help. This week I sent a pull request to the OpenVSwitch project. A really stupidest, trivialest portability issue that certainly won't make me win an ACM Turing award.

What really annoyed me was the comment by the developer who accepted the pull request: "Ugh, another place that FreeBSD makes builds gratuitously fail."

A source file included <netinet/icmp6.h>, which, as usual, needs definitions from <sys/types.h>.

The original source looked like this:

Code: [Select]
#include <config.h>
#include <ctype.h>
#include <errno.h>
#include <netinet/in.h>
#include <netinet/icmp6.h>
#include <string.h>
#include <sys/types.h>

And it barfed on FreeBSD because <sys/types.h> is not included from <netinet/icmp6.h>. On Linux it is, it seems. What I
find really curious is that useless <sys/types.h> after <string.h> given that it's been included from <netinet/icmp6.h>.
<netinet/icmp6.h> actually includes <string.h>, <sys/types.h> and so on.

The fix for FreeBSD, OS X and presumably other *BSD derived networking code (anything but Linux, despite being *BSD
derived but sometimes seemingly butchered for the sake of it) was trivial, hence my shiny ACM Turing award. Just moving the <sys/types.h> to a position before <netinet/icmp6.h>. It always makes sense to put the #include lines more or less in a generalistic
to specialized order, so I moved it after <errno.h> (should have been ctypes.h but I was in "let's make this just work" mode and
I didn't give it a second thought).

Now, in the Linux world it seems to be customary to have system include files include themselves everything they need. I know
that lots of #include lines are annoying, but even if you are careful with #ifdef barriers and such I find it much better to have the programmer add the proper includes in the right order, so that you won't find portability surprises. But the Linux folks decided to somewhat hide all this...

Anyway what I found really annoying was the "Hey, FreeBSD breaking stuff" attitude. Linux manierism zealots don't help open source software at all, which is a pity.
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #41 on: November 09, 2017, 11:14:39 pm »
(Warning, @Ludmar, not criticizing you although I really hope this can help instill a bit more love for portability!) ;)

I don't want to :horse: but let me make it clear anyway since this topic keeps popping up. I'm fully aware what it takes to make portable programs and I'm all for it. However, one has to start somewhere and in my case it means starting out making it work on the most popular platform and the one that I'm using - thats why I put the GNU/Linux stipulations on the projects. Since this is a project I'm doing in my sparse spare time I wanted to focus on features rather than portability to begin with. That being said, I welcome anyone who would like to contribute to the project by improving the code, and that includes fixing any portability issues also. I expect eventually we will remove the GNU/Linux stipulations once the portability issues have been addressed (the few that there are).

It's always easier to criticize than actually do ;)
« Last Edit: November 09, 2017, 11:23:32 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
 
The following users thanked this post: dr.diesel

Offline HoracioDos

  • Regular Contributor
  • *
  • Posts: 218
  • Country: ar
  • Just an IT monkey with a DSO
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #42 on: November 09, 2017, 11:51:51 pm »
I think you shouldn't give away your work, code it your own way and sell it.
Microsoft, Oracle, IBM have a proven business model. (We do what we want and not what you need and we charge for it)
PD: You should include a "Call Home" feature and sell usage stats. By the way I would donate a good red wine for Tio!
« Last Edit: November 10, 2017, 12:02:25 am by HoracioDos »
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #43 on: November 10, 2017, 12:13:49 am »
By the way I would donate a good red wine for Tio!

Ha ha, well - I'm glad you like tio ;) It's just a small no-nonsense serial tty tool with a simplified interface and a few useful features. Less is more.
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 borjam

  • Supporter
  • ****
  • Posts: 529
  • Country: es
  • EA2EKH
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #44 on: November 10, 2017, 12:23:36 am »
Ha ha, well - I'm glad you like tio ;) It's just a small no-nonsense serial tty tool with a simplified interface and a few useful features. Less is more.
Speaking of what I might feel inclined to send a bottle of Spanish red wine northwards ;)
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #45 on: November 10, 2017, 12:32:19 am »
Speaking of what I might feel inclined to send a bottle of Spanish red wine northwards ;)

Guys don't send me that much red wine as I'm not much of a wine drinker. However, I'll accept some of that fine Argentinian beef and Spanish chorizo ha ha :D
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: 93
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #46 on: November 10, 2017, 06:11:58 am »

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.
I have tested the rigol_2000_png branch. It produce file with png extension but it is actually a bit map, same size, BMP header. 

2. The following doesn't work
[email protected]:~$ lxi scpi -ra 192.168.1.59 -m rigol-2000 "CHAN1 DISP?"
lxi: invalid option -- 'm'

Correct. The scpi command does not accept '-m'. Only the screenshot command requires this in order to use the corresponding screenshot plugin.

See 'lxi --help' or 'man lxi' to see which options applies to which command.

[email protected]:~$ lxi scpi -ra 192.168.1.59  "CHAN1 DISP?"             
Error: Timeout
Error: Failed to receive message
Can I send scpi commands to my DS2000

Yes, I expect so. Please try without the '-r' option. The raw option is faster but also less reliable because it uses basic RAW/TCP instead of the VXI11/TCP. Perhaps the instrument has crashed maybe due to an invalid command in which case the instrument has a hard time to recover in case of RAW/TCP (handled better by VXI11).

Yes without -r I seems to get better results, thank you.

3. I have Siglent SSA3021X instrument.
lxi screenshot -a 192.168.1.59  #Doesn't work for it. Is it a big deal to add support?

If the instrument is LXI compatible, that is, it supports the VXI11/TCP protocol then it should just work.

However, it is not clear to me which Siglent instruments supports VXI11. The documentation for Siglent instruments seem sparse on this topic.

It is possible this instrument does not support VXI11 in which case you might want to try the --raw option instead and maybe in combination with --raw-port if the default port differs from 5555. You might have to do some digging to figure out what port is used (if used at all).

Actually, I've been in contact with Siglent asking if they would like to support the project with some of their instruments for testing so that we can make the tools work with their instruments. Sadly, I haven't heard from them yet. Feel free to write Siglent and ask them to support this project. I think there is a Siglent support thread in this forum where they are listening ;)
The Siglent SSA3000 programing manual is at http://www.siglentamerica.com/USA_website_2014/Documents/Program_Material/SSA3000X_ProgrammingGuide_PG0703X_E03D.pdf

Some results below which probably answers some of the questions you have defined ?
[email protected]:~/lxi-tools$ lxi scpi -a 192.168.1.61  "*IDN?"     
Siglent Technologies,SSA3032X,SSA3XXXXXXXXXXXXX,1.2.8.5a
[email protected]:~/lxi-tools$ lxi scpi -a 192.168.1.61  ":SYSTem:TIME?"
024429
[email protected]:~/lxi-tools$ lxi scpi -a 192.168.1.61  ":SYSTem:DATE?"
20171110
[email protected]:~/lxi-tools$ lxi scpi -a 192.168.1.61  "FREQuency:STAR?"
+1.2560000000E+07
[email protected]:~/lxi-tools$ lxi scpi -a 192.168.1.61  "FREQuency:STOP?"
+2.2560000000E+07
[email protected]:~/lxi-tools$ lxi scpi -a 192.168.1.61  ":MMEMory:STORe"
[email protected]:~/lxi-tools$ lxi screenshot -a 192.168.1.61
Error: Missing model
[email protected]:~/lxi-tools$ lxi screenshot -a 192.168.1.61 -m rigol-2000
Error: Failed to receive message
[email protected]:~/lxi-tools$ lxi screenshot -a 192.168.1.61 -m rigol-1000
Error: Failed to receive message
[email protected]:~/lxi-tools$ 

It seems ":MMEMory:STORe" can capture the screen but not sure if the data can be retreated remotely. 

4. Few other test samples
lxi screenshot -m rigol-1000 #doesn't work for DP832.

I wouldn't expect it to since the plugin is tailored for the 1000z series scopes.

I took a quick look at the DP800 programmers manual and I couldn't find any evidence that it supports remote screenshot downloads so I'm afraid it is not possible to create a working plugin for this series unless there is an undocumented screenshot feature that I'm not aware of.

I see

lxi scpi -a 192.168.1.60  "*IDN?" #OK for my DP832.

It is interesting that for the DP832 If I send wrong scpi command I see "Wrong command" on the instrument display and I can not get any response from now on unless i reboot DP832. Is it a problem of DP832?

Please try make sure _not_ to use the raw option in this case. We know that Rigol has issues with stalling invalid commands which ends up blocking the RAW/TCP channel. With VXI11/TCP the client tells the instrument that commands are executed under a certain timeout and it handles it accordingly so you can continue to send commands. With RAW/TCP there is no such mechanism.

In general I can't recommend using the --raw option unless you really need performance gain.

I see

Thank you
Dimitar
« Last Edit: November 10, 2017, 06:25:41 am by dpenev »
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #47 on: November 10, 2017, 06:53:05 am »
I have tested the rigol_2000_png branch. It produce file with png extension but it is actually a bit map, same size, BMP header. 

Ok. Then it does not look like it is possible to download a PNG screenshot. BMP will have to do for the 2000 series.

The Siglent SSA3000 programing manual is at http://www.siglentamerica.com/USA_website_2014/Documents/Program_Material/SSA3000X_ProgrammingGuide_PG0703X_E03D.pdf

Some results below which probably answers some of the questions you have defined ?
[email protected]:~/lxi-tools$ lxi scpi -a 192.168.1.61  "*IDN?"     
Siglent Technologies,SSA3032X,SSA3XXXXXXXXXXXXX,1.2.8.5a
[email protected]:~/lxi-tools$ lxi scpi -a 192.168.1.61  ":SYSTem:TIME?"
024429
[email protected]:~/lxi-tools$ lxi scpi -a 192.168.1.61  ":SYSTem:DATE?"
20171110
[email protected]:~/lxi-tools$ lxi scpi -a 192.168.1.61  "FREQuency:STAR?"
+1.2560000000E+07
[email protected]:~/lxi-tools$ lxi scpi -a 192.168.1.61  "FREQuency:STOP?"
+2.2560000000E+07
[email protected]:~/lxi-tools$ lxi scpi -a 192.168.1.61  ":MMEMory:STORe"
[email protected]:~/lxi-tools$ lxi screenshot -a 192.168.1.61
Error: Missing model
[email protected]:~/lxi-tools$ lxi screenshot -a 192.168.1.61 -m rigol-2000
Error: Failed to receive message
[email protected]:~/lxi-tools$ lxi screenshot -a 192.168.1.61 -m rigol-1000
Error: Failed to receive message
[email protected]:~/lxi-tools$ 

It seems ":MMEMory:STORe" can capture the screen but not sure if the data can be retreated remotely. 

I did a quick scan through the manual and it does not seem like there is any documented ways to download a screenshot. Yes, you can store screenshots in the local memory subsystem but there are no ways to download that file remotely either. It's a bit silly they don't support such useful feature. Also, the description of each SCPI command is quite lacking. So, unfortunately it seems it will not be possible to create a screenshot plugin to support this Siglent instrument. I guess the only positive thing here is that sending scpi commands to the instrument works fine.
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: 93
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #48 on: November 10, 2017, 07:14:14 am »
Indeed,

BTW did you get some useful information from silentna about screen capture from their oscilloscopes?

Thanks
Dimitar
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #49 on: November 10, 2017, 07:19:44 am »
Indeed,

BTW did you get some useful information from silentna about screen capture from their oscilloscopes?

Thanks
Dimitar

No useful details. SDS1000X/SDS2000X are claimed to support screenshots but without instruments to test on I'm going to focus on other features and instruments.
« Last Edit: November 11, 2017, 12:29:52 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
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #50 on: November 11, 2017, 01:03:38 am »
Feature request 6.3. - make model optional, and auto identify the model using the IP and *IDN?

Thanks for this good idea feature request :-+ . I've implemented it in https://github.com/lxi/lxi-tools/commit/4b07a40e1c07afb099b0842a34e1f01e8031b462

This means that the lxi tool can now be used like this:
Code: [Select]
$ lxi screenshot --address 192.168.1.210
Loaded rigol-1000 screenshot plugin
Saved screenshot image to screenshot_192.168.1.210_2017-11-10_16:07:48.png

The way it works is that it retrieves the ID string of the instrument and matches that against regular expressions provided in each plugin. The plugin with most matches is selected. Using regular expression matching is quite powerful so I expect this will work fine for future needs. Currently, only the Rigol plugins work with this feature as they are the only ones defining useful .regex entries. The other plugins will have to follow when someone shows up with real instruments that can be tested.

Also, I've done away with any model vs. plugin confusion and simplified the interface to manually specify which screenshot plugin to use:
Code: [Select]
$ lxi screenshot --address 192.168.1.210 --plugin rigol-1000
Saved screenshot image to screenshot_192.168.1.210_2017-11-10_16:08:36.png

Feature request 6.5. - add an option for instrument ID in the filename (can be more than just 1 oscilloscope on the same network, so after a save there is no way to identify where from is the captured screen)

I've implemented a compromise solution in https://github.com/lxi/lxi-tools/commit/080681f7af460b47c24ad09f46809fa65c5cb687

Trying to add unique instrument ID in the screenshot filename is troublesome because the IDN strings have no strictly guaranteed format (only guidelines) so we can run into all sorts of trouble trying to render something useful from it. Hence the alternative solution is to simply embed the instrument IP in the screenshot filename to help tell from which instrument screenshot files originate. It's not an unique identifier but it is sufficient for most use cases.
« Last Edit: November 11, 2017, 05:53:39 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
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #51 on: November 12, 2017, 01:16:10 am »
Some important features and bug fixes have been added so I'm releasing a new version of lxi-tools:
https://github.com/lxi/lxi-tools/releases/download/v1.7/lxi-tools-1.7.tar.xz

For a summary of changes please see:
https://github.com/lxi/lxi-tools/releases/tag/v1.7

Thanks to especially RoGeorge for his thorough testing and useful feature requests. Also thanks to dpenev for his testing and help fixing the rigol-2000 screenshot plugin. I've added the instruments that you guys have tested working in the list of tested instruments in the README of lxi-tools.

P.S.: I want to add you guys to the list of contributors in the AUTHORS file. If you are ok with that, please let me know.
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
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #52 on: November 13, 2017, 01:32:10 am »
I've refined and added some more information to the original post that started this thread. People might find it useful information.
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: 93
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #53 on: November 14, 2017, 08:18:39 am »
Hello,

A bit off topic but can be useful for someone .

I have SSA3021X and inspired by the lxi-tool I have implemented procedure to capture the instrument screen from a PC.
It uses lxi-tool to send ":MMEMory:STORe" command
and telnet to download the file.
I hope Siglent will implement a way to transfer a file using scpi command so this script will become unnecessary

extract the two scripts from the tar in a directory
from this directory execute
Code: [Select]
./ssa3000x_print print.png
Note that you need to specify the file name with the extension png.
I guess each time new file name is required. 
Files with path is not supported.

The shell scrip is not polished but is working for me.
Feel free to improve and please share.

Thanks
Dimitar   
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #54 on: November 14, 2017, 09:01:15 am »
I hope Siglent will implement a way to transfer a file using scpi command so this script will become unnecessary

I hope so too. It's quite the detour to have to go manually retrieve the screenshot file like that through the back channel but nice job getting there ;)

You should request Siglent to create a new firmware for the SSA3000 so that it becomes possible to simply dump the screenshot directly via the VXI11 channel. It would be faster and more elegant and should be trivial for them to implement.

I like the fact they are using TI AM335x but its funny to see how they did not remove the traces of the "evm" strings.
« Last Edit: November 14, 2017, 09:08:23 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
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #55 on: November 14, 2017, 10:45:56 pm »
I've pushed a new release of lxi-tools which adds a screenshot plugin for the new Siglent SDS1000X series scopes:

https://github.com/lxi/lxi-tools/releases/tag/v1.8

It's experimental, that is, it is not tested. If anyone has such an instrument feel free to try it out and let me know if it works. Thanks.
« Last Edit: November 15, 2017, 03:43:17 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
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #56 on: November 16, 2017, 10:26:45 am »
3. I have Siglent SSA3021X instrument.
lxi screenshot -a 192.168.1.59  #Doesn't work for it. Is it a big deal to add support?

Update: I've added a screenshot plugin for the Siglent SSA3000X series spectrum analyzers.

It does not do a full screen capture but it captures the inner frame of interest, that is, the signal data window. Please try it out and let me know if it works.

Thanks to Jason from Siglent for providing the info necessary to create the plugin.
« Last Edit: November 16, 2017, 10:38: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: 93
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #57 on: November 19, 2017, 02:58:07 am »
Hi lundmar,

I have tested it from the git master and I get empty bmp.
I have checked  your plugin and I saw that you are not using the response from SCPI command or do I miss something?
In case this is a bug please check  screenshot_siglent-sds1000x.c as well.

 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #58 on: November 19, 2017, 03:09:59 am »
I have checked  your plugin and I saw that you are not using the response from SCPI command or do I miss something?
In case this is a bug please check  screenshot_siglent-sds1000x.c as well.

You are correct. I have pushed a fix for both Siglent screenshot plugins. Thanks.

FYI - I'm currently working on improving the discover feature by searching for instrument services using mDNS/DNS-SD. I'm curious if it will work with Siglent instruments because I know that the classic VXI11 discover feature that we support now does not work.
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: 93
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #59 on: November 19, 2017, 03:24:41 am »
Hello

Still the following doesn't work
 
lxi screenshot -a 192.168.1.61 -p siglent-ssa3000x /share/scr3.png
I am sending you the file I get


at my side
lxi discover
Searching for LXI devices - please wait...

Broadcasting on interface lo
Broadcasting on interface eth0
    Found "Siglent Technologies,SSA3032X,SSA3XXXXXXXXXX,1.2.8.5a" on address 192.168.1.61

Found 1 device
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #60 on: November 19, 2017, 03:45:23 am »
lxi screenshot -a 192.168.1.61 -p siglent-ssa3000x /share/scr3.png
I am sending you the file I get

Hmm, does not look like a bitmap. I've pushed a new change to test. Can you try it out and send me a new file? Thanks.

Also, can you try without the -p option, just to see if it automatically loads the correct plugin.

at my side
lxi discover
Searching for LXI devices - please wait...

Broadcasting on interface lo
Broadcasting on interface eth0
    Found "Siglent Technologies,SSA3032X,SSA3XXXXXXXXXX,1.2.8.5a" on address 192.168.1.61

Found 1 device

Oh great. I was told by Siglent that some of their instruments may not discover but it could be a tool issue. Apparently the recent SSA and presumably also SDS works fine with the lxi-tools discover feature. Either way, we will soon have a discover --mdns option which will allow for finding even more instruments, in particular next gen LXI instruments
« Last Edit: November 19, 2017, 05:37:55 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
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #61 on: November 19, 2017, 08:09:43 am »
FYI - I've released new versions of liblxi and lxi-tools which add support for searching for LXI instruments using mDNS/DNS-SD as described by the most recent LXI device specification.

This means it is now possible to discover modern LXI instruments that do not support the older VXI-11 discover mechanism.

To search for LXI instruments using mDNS/DNS-SD simply add the --mdns option to the discover command like so:

Code: [Select]
$ lxi discover --mdns
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: 93
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #62 on: November 19, 2017, 09:57:34 am »
Hi Lundmar

With the latest liblxi and lxi-tools I get:

[email protected]:/home/dpenev/lxi-tools/lxi-tools# lxi discover --mdns
lxi: unrecognized option '--mdns'
[email protected]:/home/dpenev/lxi-tools/lxi-tools# lxi discover
Searching for LXI devices - please wait...

Error: Unknown discover type (532306400)

No devices found

[email protected]:/home/dpenev/lxi-tools/lxi-tools#
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #63 on: November 19, 2017, 10:15:54 am »
Hi Lundmar

With the latest liblxi and lxi-tools I get:

[email protected]:/home/dpenev/lxi-tools/lxi-tools# lxi discover --mdns
lxi: unrecognized option '--mdns'
[email protected]:/home/dpenev/lxi-tools/lxi-tools# lxi discover
Searching for LXI devices - please wait...

Error: Unknown discover type (532306400)

No devices found

[email protected]:/home/dpenev/lxi-tools/lxi-tools#

It looks like you are not running latest version of lxi-tools. I assume you are pulling the latest from git? Perhaps you forgot to run make install?

Both liblxi and lxi-tools must match latest versions.

Also, for the new feature to work you must install libavahi-core-dev libavahi-common-dev libavahi-client-dev
« Last Edit: November 19, 2017, 10:52:14 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: 93
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #64 on: November 23, 2017, 09:45:02 pm »
Hello,

I tried the latest version

"lxi discover" is working for my Rigol DS2000 scope and my Siglent SSA3000 amalyzer

[email protected]:~/lxi-tools/lxi-tools$ lxi discover --mdns
Searching for LXI devices - please wait...

No services found

Should I start something on my PC?

Screenshot for SSA3000  doesn't work at my side
lxi screenshot -a 192.168.1.61 -p siglent-ssa3000x scr10.png

I am attaching two files I get with line like the above.
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #65 on: November 23, 2017, 11:16:38 pm »
I tried the latest version

"lxi discover" is working for my Rigol DS2000 scope and my Siglent SSA3000 amalyzer

Great. Thanks for testing  :-+

[email protected]:~/lxi-tools/lxi-tools$ lxi discover --mdns
Searching for LXI devices - please wait...

No services found

Should I start something on my PC?

No, its fine. It simply means that these particular instruments do not advertise their presence using mDNS. It's a relatively new feature that many LXI instruments do not support yet.

Screenshot for SSA3000  doesn't work at my side
lxi screenshot -a 192.168.1.61 -p siglent-ssa3000x scr10.png

I am attaching two files I get with line like the above.

Yeah, the files still look like they contain rubbish. There is a pattern but it is certainly not PNG. Perhaps I'm missing some SCPI commands to reconfigure the instrument for PNG image format. I will talk to Siglent to check if I'm missing something here.

By the way, could you please try firing the following command:
Code: [Select]
lxi screenshot -a 192.168.1.61

And tell me if it autodetects the correct screenshot plugin ("siglent-ssa3000x"). Thanks.
« Last Edit: November 24, 2017, 12:53:42 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
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #66 on: November 24, 2017, 04:43:50 am »
I have added some plugins for Rigol devices, the changed files are in the tar archive.
I can't handle git yet.

Peter

[email protected]:~/Programme/lxi/bin$ ./lxi screenshot --list
            Name   Description
keysight-iv2000x   Keysight InfiniVision 2000X series oscilloscopes (experimental)
      rigol-1000   Rigol DS/MSO 1000z series oscilloscopes
      rigol-2000   Rigol DS/MSO 2000 series oscilloscopes
    rigol-dg4000   Rigol DG4000 series function generator
    rigol-dm3000   Rigol DM3000 series digital multimeter
     rigol-dp800   Rigol DP800 series power supply
    rigol-dsa800   Rigol DSA800 series spectrum analyzer
    rigol-dsa700   Rigol DSA700 series spectrum analyzer

      rs-hmo1000   Rohde & Schwarz HMO 1000 series oscilloscopes (experimental)
siglent-sds1000x   Siglent SDS 1000X series oscilloscopes (experimental)
siglent-ssa3000x   Siglent SSA 3000X series spectrum analyzers (experimental)
  tektronix-2000   Tektronix DPO/MSO 2000 series oscilloscopes (experimental)

Edit: tar archiv  new uploaded

Thanks Peter, good stuff  :-+

I've merged your files and made a git commit on your behalf. See https://github.com/lxi/lxi-tools/commit/c0a4199c50f819e069d96285b7de89be927b8cb6

I would like to add you to the contributor list in the AUTHORS file (see https://github.com/lxi/lxi-tools/blob/master/AUTHORS ). I can add you as "PeDre from EEVBlog forum" or by name/email like the others listed. Please let me know what you prefer. Thanks.

Also, have you tested any of the plugins? If not, I will add "(experimental)" to the plugin descriptions.

Isn't it fascinating to see the many different ways Rigol do screenshot SCPI commands? Consistency across products is apparently not a thing at Rigol he he. However, I don't think other manufacturers do much better.

« Last Edit: November 24, 2017, 04:45:36 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: 93
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #67 on: November 24, 2017, 05:04:37 am »
the plugin for SSA3000x is automatically recognized, see bellow

[email protected]:~/lxi-tools/lxi-tools$ sudo lxi screenshot -a 192.168.1.61
Loaded siglent-ssa3000x screenshot plugin
Saved screenshot image to screenshot_192.168.1.61_2017-11-23_19:56:10.bmp
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #68 on: November 24, 2017, 05:12:54 am »
The DM3068 is simulated, with my own programmed LXI server.
The DSA700 is identical to the DSA800.
The other devices have been tested.

Peter

Code: [Select]
[email protected]:~/Programme/lxi/bin$ ./lxi discover
Searching for LXI devices - please wait...

Broadcasting on interface lo
Broadcasting on interface enp2s0
  Found "Rigol Technologies,DG4162,DG4D135100282,00.01.12" on address 192.168.1.54
  Found "RIGOL TECHNOLOGIES,DP831,DP8F174900273,00.01.14" on address 192.168.1.55
  Found "RIGOL TECHNOLOGIES,MSO2302A,DS2F161650093,00.03.05.SP3" on address 192.168.1.52
  Found "Rigol Technologies,DM3068,DM301513679735,01.01.00.01.07.00" on address 192.168.1.37
  Found "Rigol Technologies,DSA815,DSA8A143300837,00.01.18.00.02" on address 192.168.1.51
  Found "RIGOL TECHNOLOGIES,DS1104Z,DS1ZB161150038,00.04.04.SP3" on address 192.168.1.53

Found 6 devices

[email protected]:~/Programme/lxi/bin$ ./lxi screenshot -a 192.168.1.54
Loaded rigol-dg4000 screenshot plugin
Saved screenshot image to screenshot_192.168.1.54_2017-11-23_18:53:19.bmp

[email protected]:~/Programme/lxi/bin$ ./lxi screenshot -a 192.168.1.55
Loaded rigol-dp800 screenshot plugin
Saved screenshot image to screenshot_192.168.1.55_2017-11-23_18:52:03.bmp

[email protected]:~/Programme/lxi/bin$ ./lxi screenshot -a 192.168.1.37
Loaded rigol-dm3000 screenshot plugin
Saved screenshot image to screenshot_192.168.1.37_2017-11-23_18:52:23.bmp

[email protected]:~/Programme/lxi/bin$ ./lxi screenshot -a 192.168.1.51
Loaded rigol-dsa800 screenshot plugin
Saved screenshot image to screenshot_192.168.1.51_2017-11-23_18:52:50.bmp
[/code]

Great, thanks. Then I will simply consider them all non-experimental and also add your instrument models to the list of tested instruments.

Your own LXI server? (VXI-11 or RAW?) Sounds interesting - is it something publicly available? What language is it written in?

FYI - I'm currently writing a full blown HiSlip/TCP client/server library in C so we can have first class open source HiSlip support on GNU/Linux systems and in particular lxi-tools of course.

Btw., you din't tell me how you would like to be added in the AUTHORS file.

Thanks.
« Last Edit: November 24, 2017, 05:15: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
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #69 on: November 24, 2017, 05:17:46 am »
the plugin for SSA3000x is automatically recognized, see bellow

[email protected]:~/lxi-tools/lxi-tools$ sudo lxi screenshot -a 192.168.1.61
Loaded siglent-ssa3000x screenshot plugin
Saved screenshot image to screenshot_192.168.1.61_2017-11-23_19:56:10.bmp

Great, thanks. At least we know that feature works.

I'll get back to you once I get a response from Siglent on exactly what SCPI commands are required for PNG capture.
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
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #70 on: November 24, 2017, 09:08:07 am »
The server is programmed in Xojo for Windows and uses VXI-11.
Was only programmed for a test for my screen capture program.
http://peter.dreisiebner.at/rigol-bildschirmkopie-lan/

Nice. I don't know much of xojo but it looks cool.

I don't need to be named as an author.

Too late, I've already added you as "PeDre from EEVBlog forum" in the contributor section :)

I think it is best to do so on principle to show it is not a one man show and also to put credit where credit is due.

@RoGeorge, @depenev : I've also added both of you by EEVBlog nickname. I appreciate all the testing and ideas you guys have contributed - it has allowed me to vastly improve the tool over the last few weeks.

After all, I think it is appropriate since it is thanksgiving day in some parts of the world today ;)

« Last Edit: November 24, 2017, 10:11:41 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
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #71 on: November 24, 2017, 09:23:44 am »
The DSA700 is identical to the DSA800.
The other devices have been tested.

By the way, is there any chance any of the devices you have tested can be reconfigured for PNG screenshot download?

PNG is the preferred image format for the plugins so if it is possible that would be great. I know that DS2000 series only supports BMP for some unknown reason.
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
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #72 on: November 24, 2017, 03:20:19 pm »
FYI - I've made new releases. This time it is mostly documentation updates but also a bunch of new Rigol screenshot plugins thanks to PeDre.
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
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #73 on: November 24, 2017, 06:40:46 pm »
The DSA800 can also handle screen shots in PNG format, but takes twice as long to do so.
The Rigol devices are fastest with the BMP format.
It is better to change the format when saving.

Ok, I see. I thought PNG would be faster because of the smaller size but obviously the image compression is too costly in time for whatever CPU Rigol is using. Lets just keep it as it is then.
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 3hristian

  • Newbie
  • Posts: 1
  • Country: de
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #74 on: November 25, 2017, 07:59:35 pm »
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 running
Code: [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
Or
Code: [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.
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #75 on: November 25, 2017, 11:37:08 pm »
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 running
Code: [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
Or
Code: [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.

Hi 3hristian,

No worries, you just keep spamming github as much as you like - that is what is what the issue tracker is for ;)

I'm sorry about your installation issue - luckily it's a temporary situation. I'm working on getting lxi-tools/liblxi into Debian so that they will eventually be included in distributions like Ubuntu and Mint. This way users don't have to bother with the challenges of manual installation. Currently software packages are being updated for Fedora. I hope to find a lxi-tools/liblxi maintainer for Debian soon.

Assuming you followed the git install instructions in the top of this thread to the letter then you shouldn't run into any issues with lxi-tools not finding liblxi. However, the issue you see can be bypassed by using for example this command:
Code: [Select]
$ LD_LIBRARY_PATH=$HOME/opt/lxi/lib ./lxi --version
v1.12

Or by simply exporting the variable like so and running the lxi tool:
Code: [Select]
$ export LD_LIBRARY_PATH=$HOME/opt/lxi/lib
$ lxi --version
lxi v1.12

Assuming your install location is $HOME/opt/lxi as suggested in the git install instructions.
« Last Edit: November 25, 2017, 11:39:19 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
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #76 on: November 26, 2017, 02:40:10 pm »
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 :(

To try bypass these issues I've created a snap for lxi-tools.

This means that it is now possible to install the latest release version of lxi-tools on the most popular distributions like so:

Code: [Select]
$ snap install lxi-tools

The great thing about snaps is that I maintain the snap directly and when I update my lxi-tools snap it will be immediately available for users to install. No delay!  :-+

It's pretty cool, check it out.

I've tested it on Fedora 27 and Ubuntu 17.10 but it should work on various other distributions too (Mint, ArchLinux, Debian, Gentoo, OpenSuse, Manjaro, etc.).

See https://snapcraft.io for how to install snap on your distribution.

P.s.: There is one minor issue though: after installing the lxi-tools snap the tool command is 'lxi-tools.lxi' and not 'lxi'. Will be fixed later.
P.p.s: lxi-tools snap details can be seen here: https://dashboard.snapcraft.io/dev/snaps/8744
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 nctnico

  • Super Contributor
  • ***
  • Posts: 13889
  • Country: nl
    • NCT Developments
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #77 on: November 26, 2017, 11:28:59 pm »
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 :(
The 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.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #78 on: November 27, 2017, 12:35:03 am »
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 :(
The 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.

That is true. However, there are some advantages to the snap solution because it actually includes and runs lxi-tools inside its own containerized Ubuntu core image runtime that runs specific versions of dynamic services like e.g. avahi that lxi-tools rely on for mDNS/DNS-SD discovery. If I do a static it is likely that the avahi dbus interface protocol will not work on various distributions because of version differences of their avahi daemon. Also, it's a big plus for end users that they can use the simple snap install command to manage their lxi-tools package and when I push updates they will have a super easy way to upgrade ('snap refresh lxi-tools'). In the end, that is simpler than messing with and setting up a static tarball that might or might not work. The snap support will only improve and spread to more distributions so for application distribution this is the future and I'm jumping right in he he. Once I get the last details of my lxi-tools snap sorted out it will be perfect.
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
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #79 on: November 28, 2017, 02:06:24 am »
FYI - it is now possible to install latest development version using snap:

Code: [Select]
$ snap install lxi-tools --edge

The lxi-tools snap from the edge channel automatically follows the latest git version via automatic CI using https://build.snapcraft.io

Also, the lxi-tools snap is now built for the following architectures: amd64, i386, armhf

For those interested, here is the snapcraft configuration for the lxi-tools snap: https://github.com/lxi/lxi-tools.snapcraft
« Last Edit: November 28, 2017, 02:21:04 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
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #80 on: November 28, 2017, 08:37:15 am »
FYI - I've renamed the website from lxi.github.io to lxi-tools.github.io

Also, there are new releases of lxi-tools and liblxi which include latest fixes and documentation changes.

New snaps are also available for instant upgrade. For those who already have lxi-tools snap installed try (note that it might already be automatically updated):
Code: [Select]
snap refresh lxi-tools

Or, if you don't have it installed already, simply:
Code: [Select]
snap install lxi-tools

After snap is installed, you will have to run this command:
Code: [Select]
$ snap alias lxi-tools.lxi lxi

To make the normal 'lxi' command work. Else only 'lxi-tools.lxi' will work. It's a temporary situation until my snap is approved automatic alias support by vote of the snap guys.

I've also created a new logo for the project just to spruce things up a bit :)

If anyone runs into issues installing using snap please let me know. Thanks.
« Last Edit: November 28, 2017, 03:11:21 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 dpenev

  • Regular Contributor
  • *
  • Posts: 93
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #81 on: November 28, 2017, 11:55:54 pm »
Hi lundmar,

Just to confirm that lxi snap and aliasing seem to be working fine on my Ubuntu 14.04 box.
 
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #82 on: November 29, 2017, 12:24:31 am »
Hi lundmar,

Just to confirm that lxi snap and aliasing seem to be working fine on my Ubuntu 14.04 box.

Thats interesting, I didn't expect snaps to be supported on such old Ubuntu installations but I guess it only demonstrates how powerful snaps are.

Thanks for the feedback :-+

Btw. I haven't heard from Siglent yet regarding the screenshot file format on the SSA3000 - I think most people are off due to extended Thanksgiving holidays.
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: 93
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #83 on: November 29, 2017, 02:32:24 am »
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 
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #84 on: November 29, 2017, 03:27:35 am »
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

Still impressive though.

Oh by the way, I just got a response from Siglent and they provided me an undocumented SCPI command for doing a full screenshot capture on the SSA3000 series :)

In fact, I've already pushed a fix for the siglent-ssa300x plugin so you will be able  to test it immediately via the snap edge channel:

Code: [Select]
$ snap install lxi-tools --edge

Or, if you have it already installed, you can make sure it is up-to-date and using the edge channel like so:
Code: [Select]
$ snap refresh lxi-tools --edge

Please let me know if the plugin now works for you. You might have to take care to increase the default timeout as the image BMP data is rather large.
« Last Edit: November 29, 2017, 07:26:35 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 BloodyCactus

  • Frequent Contributor
  • **
  • Posts: 455
  • Country: us
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #85 on: November 29, 2017, 12:13:24 pm »
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 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 the
Code: [Select]
'G' 0D 0A 1A 0A 00 00 00 0D
but we are missing
Code: [Select]
89 50 4E the start of the PNG magic...



putting in the missing header shows a valid PNG from the scope

Code: [Select]
> file qq.png
qq.png: PNG image data, 640 x 520, 8-bit colormap, non-interlaced



« Last Edit: November 29, 2017, 12:19:15 pm by BloodyCactus »
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #86 on: November 29, 2017, 01:16:48 pm »
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.

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.

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 the
Code: [Select]
'G' 0D 0A 1A 0A 00 00 00 0D
but we are missing
Code: [Select]
89 50 4E the start of the PNG magic...

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: [Select]
snap refresh lxi-tools --edge

By the way, can you please try fire this command?

Code: [Select]
$ lxi screenshot -a scope
Which should automatically load the correct screenshot plugin. If it fails please provide me the IDN string of your instrument.

Thanks
« Last Edit: November 29, 2017, 01:22:37 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 BloodyCactus

  • Frequent Contributor
  • **
  • Posts: 455
  • Country: us
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #87 on: November 29, 2017, 01:49:38 pm »
Code: [Select]
[ sgeorge @ workstation ] - [ /tmp ] 
[$]> lxi screenshot -a scope
Error: Read error (timeout)
Error: Failed to receive message
Error: Unable to retrieve instrument ID

needs a -p, so here is my IDN

Code: [Select]
Found "Rohde&Schwarz,HMO1202,nnnnnnnnn,05.886"
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: [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 in
Code: [Select]
/tmp/snap.1000_lxi-tools_ql0gGm/tmp/
which is
Code: [Select]
drwx------   3 root    sgeorge 4.0K Nov 28 19:50 snap.1000_lxi-tools_ql0gGm
how very strange.

PNG do load correctly tho.
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #88 on: November 29, 2017, 02:30:18 pm »
Code: [Select]
[ sgeorge @ workstation ] - [ /tmp ] 
[$]> lxi screenshot -a scope
Error: Read error (timeout)
Error: Failed to receive message
Error: Unable to retrieve instrument ID

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?"

If that also fails please try with IP address instead of 'scope'.

Doing
Code: [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 in
Code: [Select]
/tmp/snap.1000_lxi-tools_ql0gGm/tmp/
which is
Code: [Select]
drwx------   3 root    sgeorge 4.0K Nov 28 19:50 snap.1000_lxi-tools_ql0gGm
how very strange.

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.

PNG do load correctly tho.

Good :-+
« Last Edit: November 29, 2017, 02:35:05 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 BloodyCactus

  • Frequent Contributor
  • **
  • Posts: 455
  • Country: us
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #89 on: November 29, 2017, 02:55:26 pm »
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?"

Code: [Select]
lxi scpi -a scope "*IDN?"
Rohde&Schwarz,HMO1202,nnnnnnnnn,05.886

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...

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.

 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #90 on: November 29, 2017, 03:19:40 pm »
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.

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.

Ok, got it. Then the problem is not too bad then, except it is of course annoying for your use case that you can't have it write directly to your NFS share. Some say that it is possible for a snap to write to an NFS share if you use the 'mount --bind <location of nfs> <some mount dir in your home>' command to basically map/mount your NFS share into your home and this way the snap will see it as a normal dir.
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
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #91 on: November 30, 2017, 01:16:38 am »
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.
« Last Edit: November 30, 2017, 01:21:07 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 BloodyCactus

  • Frequent Contributor
  • **
  • Posts: 455
  • Country: us
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #92 on: November 30, 2017, 09:37:42 am »
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.

Code: [Select]
lxi screenshot -a scope -p rs-hmo1000 works.

Code: [Select]
> lxi screenshot -a scope
Loaded rs-hmo1000 screenshot plugin
hangs.

no change when using IP. still hangs.

with gdb, I get (but probably not much good to you).

Code: [Select]
#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>, [email protected]=0x7fffffbecbfc "\377\177", [email protected]=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 ([email protected]=0x60a718, [email protected]=0x7fffffbecca0) at xdr.c:214
#8  0x00007ffff76e9791 in __GI_xdr_replymsg ([email protected]=0x60a718, [email protected]=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 ()

 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #93 on: November 30, 2017, 10:30:02 am »
Code: [Select]
> lxi screenshot -a scope
Loaded rs-hmo1000 screenshot plugin
hangs.

Fixed!

New snap available.

What happened is that the automatic screenshot plugin detection first connects to the device to obtain the device ID which is used to automatically match which plugin to load and then it disconnects before it connects again later to retrieve the screenshot but someone forgot to disconnect |O and that obviously causes a hang for instruments that only support 1 active connection.

Thanks for the testing/debug :-+

This is exactly the type of testing I'm looking for - the more instruments tested the better so we can catch and eliminate bugs like this.

Btw. I've added a new benchmark command which can be useful for comparing the VXI-11 request/response performance of instruments:

Code: [Select]
lxi benchmark -a <ip>

Example:
Code: [Select]
$ lxi benchmark -a 192.168.1.210
Benchmarking by sending 100 ID requests. Please wait...
Result: 19.5 requests/second
« Last Edit: December 01, 2017, 02:46:19 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 dpenev

  • Regular Contributor
  • *
  • Posts: 93
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #94 on: November 30, 2017, 11:21:29 pm »
Hello,

I got this:
[email protected]:~$ sudo snap refresh lxi-tools --edge     
snap "lxi-tools" has no updates available
[email protected]:~$ lxi -v
lxi v1.13
[email protected]:~$ lxi screenshot -a 192.168.1.61   
Loaded siglent-ssa3000x screenshot plugin
Error: Failed to receive message
[email protected]:~$

 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #95 on: December 01, 2017, 02:24:39 am »
Hello,

I got this:
[email protected]:~$ sudo snap refresh lxi-tools --edge     
snap "lxi-tools" has no updates available
[email protected]:~$ lxi -v
lxi v1.13

Thats's good. On some systems snaps automatically updates to the latest version available in their active channel (stable, candidate, beta, or edge).

[email protected]:~$ lxi screenshot -a 192.168.1.61   
Loaded siglent-ssa3000x screenshot plugin
Error: Failed to receive message
[email protected]:~$

Hmm. It looks like your SSA3000X instrument does not respond to or recognize the "SCDP." command.

I also notice you seem to be running the latest firmware :-+

I'll talk to Siglent again to verify that the "SCDP." command is actually supported by latest public firmware.

Thanks for testing.
« Last Edit: December 01, 2017, 02:49:54 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
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #96 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: 93
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #97 on: December 01, 2017, 08:16:29 am »
Hi Lundmar,

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

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #98 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
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #99 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
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #100 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: 218
  • Country: ar
  • Just an IT monkey with a DSO
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #101 on: December 02, 2017, 06:11:05 am »
Please stop improving this thing. I'm getting tired of compiling it almost every week  :-DD
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #102 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: 218
  • Country: ar
  • Just an IT monkey with a DSO
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #103 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
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #104 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
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #105 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: 100
  • Country: ro
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #106 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.
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #107 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: 100
  • Country: ro
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #108 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 crispus

  • Regular Contributor
  • *
  • Posts: 100
  • Country: ro
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #109 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.
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #110 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
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #111 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
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #112 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
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #113 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
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #114 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: 100
  • Country: ro
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #115 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.
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #116 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: 100
  • Country: ro
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #117 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.
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #118 on: December 12, 2017, 08:13:00 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

Update 2: Your trace confirmed we get a timeout waiting for response to the screenshot capture command. Please try the following (requires latest because of a fix to interactive mode):

Code: [Select]
$ lxi scpi --address <ip> --interactive

And in interactive mode please enter the following:

Code: [Select]
:disp:data?
:system:error?

I'm not fully convinced that your DM firmware supports the first command so I expect you will see a system error message like e.g. '-113,"Undefined header; keyword cannot be found"'.

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

Thanks - I've added them to the list of tested instruments. Also, I've added you to the list of contributors.

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.

Yeah, I might add that.
« Last Edit: December 12, 2017, 09:49:37 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: 100
  • Country: ro
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #119 on: December 12, 2017, 05:49:29 pm »
Yeah, you're right:
Code: [Select]
$ lxi scpi -a 192.168.1.144 --interactive
Connected to 192.168.1.144
Entering interactive mode (ctrl-d to quit)

lxi> :disp:data?
Error: Read error (timeout)
Error: Failed to receive message
lxi> :system:error?
-113,"Undefined header; keyword cannot be found"
lxi> :system:error?
0,"No error"
lxi> :disp:data?
Error: Read error (timeout)
Error: Failed to receive message
lxi> :system:error?
-113,"Undefined header; keyword cannot be found"
lxi> ^C

I can't see any screenshot related in the programming manual for DM3058
I know I'm numskull, but I look around me and I feel better.
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #120 on: December 12, 2017, 06:23:23 pm »
Yeah, you're right:
Code: [Select]
$ lxi scpi -a 192.168.1.144 --interactive
Connected to 192.168.1.144
Entering interactive mode (ctrl-d to quit)

lxi> :disp:data?
Error: Read error (timeout)
Error: Failed to receive message
lxi> :system:error?
-113,"Undefined header; keyword cannot be found"
lxi> :system:error?
0,"No error"
lxi> :disp:data?
Error: Read error (timeout)
Error: Failed to receive message
lxi> :system:error?
-113,"Undefined header; keyword cannot be found"
lxi> ^C

I can't see any screenshot related in the programming manual for DM3058

Ok.

Btw., did you upgrade to latest firmware?

It's a pretty weird regression if earlier firmware versions support this command but the latest does not. Or perhaps it is only the DM3068 that unofficially supports it.
« Last Edit: December 12, 2017, 06:41:41 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 crispus

  • Regular Contributor
  • *
  • Posts: 100
  • Country: ro
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #121 on: December 13, 2017, 02:03:27 am »
Btw., did you upgrade to latest firmware?
Yes, it seems that already had the latest version. The tricky part though, in the release notes the version contains an additional 02: 1.01.00.02.02.00 on the multimeter versus 1.01.00.02.02.00.02 in the release notes.
I know I'm numskull, but I look around me and I feel better.
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #122 on: December 13, 2017, 03:04:42 am »
Btw., did you upgrade to latest firmware?
Yes, it seems that already had the latest version. The tricky part though, in the release notes the version contains an additional 02: 1.01.00.02.02.00 on the multimeter versus 1.01.00.02.02.00.02 in the release notes.

He he, yeah - those two numbers can make you go blind trying to spot the difference.

So, since the screenshot plugin certainly won't work with the DM3058 I'm thinking I will add to the description that it only works with DM3068.

Or at least, I will assume it to be working with DM3068 until someone tells me otherwise.

Either way, thank you for your testing. I'm sorry we couldn't make it work.

As a last resort, you could try ask Rigol to add screenshot support to their firmware but it might be a futile task - I don't know how much Rigol listens to their users.
« Last Edit: December 13, 2017, 03:24:33 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
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #123 on: December 13, 2017, 08:57:07 am »
New releases of lxi-tools and liblxi are now available via snap, tarball, or git.

This is a feature and bug fix release.

For a complete overview of changes please see:
https://github.com/lxi-tools/lxi-tools/releases/tag/v1.14
https://github.com/lxi-tools/liblxi/releases/tag/v1.8

A lot of new screenshot plugins have been added which add support for many of Siglents instruments.

Also, the screenshot command has been improved so it is now possible to redirect the captured screenshot image directly to external tools for simple or advanced image processing such as resizing, scaling, adding text, format conversion, etc. It's quite a powerful feature. For example, to embed a time stamp in the image, upscale the image to 150%, and convert it to JPG, simply use the lxi tool in combination with e.g. ImageMagicks image manipulation tools like so:

Code: [Select]
$ lxi screenshot -a 10.0.0.42 - | convert -fill white -draw "font-size 16 text 100,100 '`date`'" -scale 150% - screenshot.jpg

Or, to add a label with time stamp:
Code: [Select]
$ lxi screenshot -a 10.0.0.42 - | montage -geometry +0+0 -background white -label "`date`" -scale 150% - screenshot.png

ImageMagicks image manipulation tools support various image operations and over 200 image formats which should satisfy the needs of most users :)

Also, I would like to put a big thank you to Siglent who has been very helpful to test and make sure that lxi-tools works well with all of their LXI compatible instruments  :-+
« Last Edit: December 13, 2017, 01:36:27 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
 
The following users thanked this post: Octane

Offline dpenev

  • Regular Contributor
  • *
  • Posts: 93
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #124 on: December 14, 2017, 04:57:41 am »
Hi lundmar,

I have tested the latest lxi tool v1.15 and screenshot is working fine on my Siglent SSA3021X


A minor note which would be a bit more convenient for me is if I would able to write directly to my share 
At the moment I get an error

lxi screenshot -a 192.168.1.61 /share/scr2.bmp
Loaded siglent-ssa3000x screenshot plugin
Error: Could not write screenshot file (No such file or directory)

Thank you for your work.
Dimitar
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #125 on: December 14, 2017, 07:14:56 am »
Hi lundmar,

I have tested the latest lxi tool v1.15 and screenshot is working fine on my Siglent SSA3021X


A minor note which would be a bit more convenient for me is if I would able to write directly to my share 
At the moment I get an error

lxi screenshot -a 192.168.1.61 /share/scr2.bmp
Loaded siglent-ssa3000x screenshot plugin
Error: Could not write screenshot file (No such file or directory)

Thank you for your work.
Dimitar

You're welcome. I'm glad we finally have it working.

Yes, an unfortunate consequence of using snap at the moment is that it runs in a security confined environment so writing to anywhere outside of your home directory is denied. I'm told this is something which might be fixed in future versions of snap.

Until then there is a little trick you can do to bypass the confinement:
Code: [Select]
$ lxi screenshot -a 10.0.0.42 - | convert - screenshot.png
This way it is the unconfined convert tool that writes the screenshot file and so you can write anywhere you like.

Actually, you can even skip the convert tool assuming your know the image file format extension:
Code: [Select]
$ lxi screenshot -a 10.0.0.42 - > screenshot.png
« Last Edit: December 21, 2017, 05:19:15 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
 
The following users thanked this post: dpenev

Offline ralphrmartin

  • Regular Contributor
  • *
  • Posts: 224
  • Country: gb
    • Work website
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #126 on: December 25, 2017, 03:17:49 am »
Just tried to install this unsuccessfully on debian.

I first installed snap as described, and all went well. I then tried

snap install lxi-tools --edge

and got

error: cannot install "lxi-tools": Get https://search.apps.ubuntu.com/api/v1/snaps/details/core?channel=stable&fields=anon_download_url%2Carchitecture%2Cchannel%2Cdownload_sha3_384%2Csummary%2Cdescription%2Cdeltas%2Cbinary_filesize%2Cdownload_url%2Cepoch%2Cicon_url%2Clast_updated%2Cpackage_name%2Cprices%2Cpublisher%2Cratings_average%2Crevision%2Cscreenshot_urls%2Csnap_id%2Csupport_url%2Ctitle%2Ccontent%2Cversion%2Corigin%2Cdeveloper_id%2Cprivate%2Cconfinement: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

snap install lxi-tools

gives the same result.

Any idea what is up?

Thanks.
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #127 on: December 25, 2017, 08:49:10 am »
Just tried to install this unsuccessfully on debian.

I first installed snap as described, and all went well. I then tried

snap install lxi-tools --edge

and got

error: cannot install "lxi-tools": Get https://search.apps.ubuntu.com/api/v1/snaps/details/core?channel=stable&fields=anon_download_url%2Carchitecture%2Cchannel%2Cdownload_sha3_384%2Csummary%2Cdescription%2Cdeltas%2Cbinary_filesize%2Cdownload_url%2Cepoch%2Cicon_url%2Clast_updated%2Cpackage_name%2Cprices%2Cpublisher%2Cratings_average%2Crevision%2Cscreenshot_urls%2Csnap_id%2Csupport_url%2Ctitle%2Ccontent%2Cversion%2Corigin%2Cdeveloper_id%2Cprivate%2Cconfinement: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

snap install lxi-tools

gives the same result.

Any idea what is up?

Thanks.

I notice that "api/v1/snaps" is involved. I'm not sure but I think recent versions of snap uses snap api v2.

I just installed lxi-tools successfully on Debian 9.3 (Stretch) which uses snap/snapd version 2.29.4.2.

Which Debian and snap version are you using?

EDIT: It looks like snap/snapd is only officially supported on latest stable Debian (Stretch).
« Last Edit: December 25, 2017, 03:41:00 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 ralphrmartin

  • Regular Contributor
  • *
  • Posts: 224
  • Country: gb
    • Work website
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #128 on: December 26, 2017, 04:32:54 am »
I'm using
GNU/Linux testing Stretch
and
snap    2.21-2+b1

I've realised that testing with Stretch is now a bit outdated, so have changed just to testing. Having done that, all seems OK. :-+

Oops, spoke too soon. While snap install worked OK, I now get

bash: lxi: command not found


Am I doing something silly?
« Last Edit: December 26, 2017, 05:38:50 am by ralphrmartin »
 

Offline ralphrmartin

  • Regular Contributor
  • *
  • Posts: 224
  • Country: gb
    • Work website
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #129 on: December 26, 2017, 05:42:19 am »
OK, so I found the binary: /snap/bin/lxi

But trying to run it as

/snap/bin/lxi

gives

cannot bind-mount the mount namespace file /proc/2556/ns/mnt -> lxi-tools.mnt: Permission denied
support process for mount namespace capture exited abnormally
 

Offline crispus

  • Regular Contributor
  • *
  • Posts: 100
  • Country: ro
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #130 on: December 26, 2017, 05:57:56 am »
Do you have /var or /tmp as symbolic link?
I know I'm numskull, but I look around me and I feel better.
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #131 on: December 26, 2017, 06:13:46 am »
I'm using
GNU/Linux testing Stretch
and
snap    2.21-2+b1

I've realised that testing with Stretch is now a bit outdated, so have changed just to testing. Having done that, all seems OK. :-+

Good :)

Oops, spoke too soon. While snap install worked OK, I now get

bash: lxi: command not found


Am I doing something silly?

I don't think so. Actually, the snap binaries are prefixed with the name of the snap. So in case of lxi-tools the lxi binary is named "lxi-tools.lxi". However, the lxi-tools snap recently gained support for adding the automatic alias lxi -> lxi-tools.lxi when installing so the lxi command should just work.

You can list the installed aliases like so:
Code: [Select]
snap aliases

If the alias is not listed you can install it manually:
Code: [Select]
snap alias lxi-tools.lxi lxi

You might also consider using Debian stable. I mean, Debian testing can include broken stuff :)
« Last Edit: December 27, 2017, 12:39:32 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
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #132 on: December 26, 2017, 06:35:17 am »
FYI - lxi-tools was recently picked up by a Debian package maintainer so I expect to see it available in Debian stable in about 1 year or so :)

Of course, it will be available in unstable/testing long before that.
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 ralphrmartin

  • Regular Contributor
  • *
  • Posts: 224
  • Country: gb
    • Work website
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #133 on: December 27, 2017, 09:09:24 am »
Hmm

 snap aliases
gives
Command        Alias  Notes
lxi-tools.lxi  lxi    -

so that does not seem to be the problem.

Neither /var nor /tmp are aliases.

snap version
now gives
snap version
snap    2.27.6-2
snapd   2.27.6-2
series  16
debian  unknown
kernel  4.13.0-1-amd64

Any either ideas on how to get this to run? Even trying to run it as root gives permission errors - and it is not on my path...
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #134 on: December 27, 2017, 09:43:23 am »
Hmm

 snap aliases
gives
Command        Alias  Notes
lxi-tools.lxi  lxi    -

so that does not seem to be the problem.

Neither /var nor /tmp are aliases.

snap version
now gives
snap version
snap    2.27.6-2
snapd   2.27.6-2
series  16
debian  unknown
kernel  4.13.0-1-amd64

Any either ideas on how to get this to run? Even trying to run it as root gives permission errors - and it is not on my path...

The permission denied errors are likely somehow related to the fact that snaps are running in security confinement. You can try disable this confinement like so:

Code: [Select]
$ snap refresh lxi-tools --devmode

Or

Code: [Select]
$ snap refresh lxi-tools --classic

Either way, I think your best option is to use Debian stable since it includes the latest snap version (2.29.x) which is tested to work.

However, if you don't feel like distro downgrading/upgrading you can always compile and install it manually from source as described in the top post of this thread (see e.g. git build steps).

If you feel brave I have also attached the pre-release .deb packages that I got from the Debian maintainer - I have tested them with Debian 9.3.

P.s. If you get it up and running feel free to let us know what specific instruments you might have tested successfully. Thanks.
« Last Edit: December 28, 2017, 10:31:55 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 ralphrmartin

  • Regular Contributor
  • *
  • Posts: 224
  • Country: gb
    • Work website
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #135 on: December 28, 2017, 07:15:56 am »
Both of those variants did nothing, just giving
snap "lxi-tools" has no updates available

However the deb files seem to have worked.

Thanks!

I'll try it out with some instruments in the next few days I hope.
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #136 on: December 28, 2017, 07:28:28 am »
Both of those variants did nothing, just giving
snap "lxi-tools" has no updates available

I think that is expected because there is no new refresh/download available but despite this message it is supposed to change the confinement setting.

However the deb files seem to have worked.

Thanks!

I'll try it out with some instruments in the next few days I hope.

Great - feel free to share your findings.

Unfortunately I will not be able to provide updated .deb packages moving forward except when the Debian package maintainer decides to do so. The great thing about snap is it is always up to date and I can push updates directly to users literally within minutes.
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 ralphrmartin

  • Regular Contributor
  • *
  • Posts: 224
  • Country: gb
    • Work website
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #137 on: December 28, 2017, 08:18:04 am »
Well, findings so far are discovery works for these devices:

  Found "Rigol Technologies,DG4062,[serial#]" on address 192.168.1.207
  Found "KEYSIGHT TECHNOLOGIES,MSO-X 3024T,[serial#],07.20.2017102614" on address 192.168.1.206

Tried sending *IDN? to both - worked OK.

Captured a screenshot from the Keysight, which resulted in a png file, but when I tried to view it, I got told it was not a png.
Running the file command on it just told me it was data.
The first few bytes of the file look like this:
00000000: 470d 0a1a 0a00 0000 0d49 4844 5200 0003  G........IHDR...
00000010: 2000 0002 0008 0200 0000 f5c9 9fbd 0000   ...............
00000020: 2000 4944 4154 7801 edbd 4dac 2cdb 75df   .IDATx...M.,.u.
00000030: 77ce 7df7 f123 fc92 68c1 a114 0e2c 4422  w.}..#..h....,D"
00000040: a297 c086 ded3 e01a a000 3940 3290 022a  [email protected]*
00000050: 4311 b888 151a be9c 270c e051 8078 1a22  C.......'..Q.x."
00000060: 4090 115f 9217 27b8 8092 a108 5883 0089  @.._..'.....X...

Trying to use the Keysight 2000 plugin didn't help.

Captured a screenshot from the Rigol, which resulted in a bmp file, but when I tried to view it, I got told it had a bogus header.
Running file on it told me it was a jpeg!
Changing the file extension to jpg gave me a correct picture of the screen.
 

Offline ralphrmartin

  • Regular Contributor
  • *
  • Posts: 224
  • Country: gb
    • Work website
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #138 on: December 28, 2017, 08:49:34 am »
Just out of curiosity, I tried building this on a Mac. Unfortunately, it didn't work as rpcgen does not have a -M argument on  MacOS X.
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #139 on: December 28, 2017, 09:15:36 am »
Well, findings so far are discovery works for these devices:

  Found "Rigol Technologies,DG4062,[serial#]" on address 192.168.1.207
  Found "KEYSIGHT TECHNOLOGIES,MSO-X 3024T,[serial#],07.20.2017102614" on address 192.168.1.206

Tried sending *IDN? to both - worked OK.


Good.

Captured a screenshot from the Keysight, which resulted in a png file, but when I tried to view it, I got told it was not a png.
Running the file command on it just told me it was data.
The first few bytes of the file look like this:
00000000: 470d 0a1a 0a00 0000 0d49 4844 5200 0003  G........IHDR...
00000010: 2000 0002 0008 0200 0000 f5c9 9fbd 0000   ...............
00000020: 2000 4944 4154 7801 edbd 4dac 2cdb 75df   .IDATx...M.,.u.
00000030: 77ce 7df7 f123 fc92 68c1 a114 0e2c 4422  w.}..#..h....,D"
00000040: a297 c086 ded3 e01a a000 3940 3290 022a  [email protected]*
00000050: 4311 b888 151a be9c 270c e051 8078 1a22  C.......'..Q.x."
00000060: 4090 115f 9217 27b8 8092 a108 5883 0089  @.._..'.....X...

Trying to use the Keysight 2000 plugin didn't help.


Yeah, you are the first to actually test the Keysight plugin. Clearly something needs to be fixed. I'll look into it.
Update: Fixed and ready for testing. Also, the screenshot command should now auto detect your 3000X instrument and automatically load the plugin.

Captured a screenshot from the Rigol, which resulted in a bmp file, but when I tried to view it, I got told it had a bogus header.
Running file on it told me it was a jpeg!
Changing the file extension to jpg gave me a correct picture of the screen.

Oh, interesting. In the screenshot plugin for the dg4000 we assume the image to be BMP but it seems we need to fire an additional command to make sure the format is BMP. I'll fix that.
Update:  Fixed and available in the latest snap on the edge channel.

By the way, if you want to test with snap you could install latest Debian stable (9.3) in a VirtualBox VM - that's what I'm doing on my Ubuntu system to test Debian stuff. In case you do that, remember to make the network adapter bridged (not NAT).
« Last Edit: December 28, 2017, 10:17:56 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
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #140 on: December 28, 2017, 09:36:08 am »
Just out of curiosity, I tried building this on a Mac. Unfortunately, it didn't work as rpcgen does not have a -M argument on  MacOS X.

Unfortunately we don't want to make do without the -M flag because it is what produces thread-safe code. I'm not sure why rpcgen on mac does not support this flag - perhaps too old version of rpcgen?
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 ralphrmartin

  • Regular Contributor
  • *
  • Posts: 224
  • Country: gb
    • Work website
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #141 on: December 28, 2017, 07:23:13 pm »
Thanks for the fixes.

I'm already running Debian in a VM, in bridged mode, on my Mac.  :) But my SSD does not have enough space for yet another VM. :(

I suppose the answer is to uninstall the deb and just install from the Github source, if snap doesn't work (for whatever reason).
 

Offline ralphrmartin

  • Regular Contributor
  • *
  • Posts: 224
  • Country: gb
    • Work website
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #142 on: December 28, 2017, 09:53:25 pm »
There's definitely something wrong with the way the snap version is working. I just installed a fresh Debian stretch in a VirtualBox VM, did
apt-get install snapd
then
snap install lxi-tools
which all seemed to work OK.
But then any of the commands
lxi
lxitools
lxi-tools
just gives me "command not found".

Write once run anywhere is a noble goal - but seems rather too fragile...
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #143 on: December 28, 2017, 10:15:46 pm »
There's definitely something wrong with the way the snap version is working. I just installed a fresh Debian stretch in a VirtualBox VM, did
apt-get install snapd
then
snap install lxi-tools
which all seemed to work OK.
But then any of the commands
lxi
lxitools
lxi-tools
just gives me "command not found".

These are the exact steps I do on Debian 9.3:
Code: [Select]
$ lsb_release -d
Description:   Debian GNU/Linux 9.3 (stretch)
$ snap --version
snap    2.29.4.2
snapd   2.29.4.2
series  16
debian  9
kernel  4.9.0-4-amd64
$ su -
$ snap install lxi-tools --edge
$ lxi --version
lxi v1.16
$ lxi-tools.lxi --version
lxi v1.16
$ snap aliases
Command        Alias  Notes
lxi-tools.lxi  lxi    -

Write once run anywhere is a noble goal - but seems rather too fragile...

At least it is a goal :)
« Last Edit: December 28, 2017, 10:39:39 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
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #144 on: December 28, 2017, 10:20:19 pm »
There's the SCPI command:
:HCOPy:SDUMp:DATA:FORMat BMP|JPEG|PNG
:HCOPy:SDUMp:DATA:FORMat?

Exactly - that is the command I added to fix the format for the DG to force it to BMP. I'm wondering if the same trick needs to be applied to any of the other rigol plugins.
« Last Edit: December 28, 2017, 10:37:11 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 ralphrmartin

  • Regular Contributor
  • *
  • Posts: 224
  • Country: gb
    • Work website
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #145 on: December 28, 2017, 10:52:24 pm »
Well, here is my output

#lsb_release -d
Description:   Debian GNU/Linux 9.3 (stretch)

#snap --version
snap    2.29.4.2
snapd   2.29.4.2
series  16
debian  9
kernel  4.9.0-4-amd64

#snap install lxi-tools --edge
lxi-tools (edge) 1.16 from 'lundmar' installed

#lxi --version
bash: lxi: command not found

#lxi-tools.lxi --version
bash: lxi-tools.lxi: command not found

#snap aliases
Command        Alias  Notes
lxi-tools.lxi  lxi    -

All looks the same - apart from the fact that lxi is not found...
I've got no idea how it can be working on your system and not on mine.
I've had exactly the same result now on both Debian testing and a fresh Debian stretch. :-//
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #146 on: December 28, 2017, 11:05:21 pm »
Well, here is my output

#lsb_release -d
Description:   Debian GNU/Linux 9.3 (stretch)

#snap --version
snap    2.29.4.2
snapd   2.29.4.2
series  16
debian  9
kernel  4.9.0-4-amd64

#snap install lxi-tools --edge
lxi-tools (edge) 1.16 from 'lundmar' installed

#lxi --version
bash: lxi: command not found

#lxi-tools.lxi --version
bash: lxi-tools.lxi: command not found

#snap aliases
Command        Alias  Notes
lxi-tools.lxi  lxi    -

All looks the same - apart from the fact that lxi is not found...
I've got no idea how it can be working on your system and not on mine.
I've had exactly the same result now on both Debian testing and a fresh Debian stretch. :-//

I think I've spotted your problem.

I assume you are using the "su" command to go root. Try "su -".

With the first I see the same as you. With the latter everything works fine.

Also, I normally just switch to and install as root but then exit back to my "test" user and it still works.
« Last Edit: December 29, 2017, 03:53:11 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 ralphrmartin

  • Regular Contributor
  • *
  • Posts: 224
  • Country: gb
    • Work website
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #147 on: December 29, 2017, 03:50:25 am »
Thanks. using
su -
instead of
sudo bash
to get a root terminal did the trick (except I still have to be root to use the lxi command).
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #148 on: December 29, 2017, 04:05:15 am »
Thanks. using
su -
instead of
sudo bash
to get a root terminal did the trick (except I still have to be root to use the lxi command).

Great. Let me know if the fixed screenshot plugins work with your DG and MSO. You should be able to simply do:
Code: [Select]
$ lxi screenshot --address <instrument ip>

I'm not that familiar with the Debian ways of user management. On Ubuntu I don't even have to switch to root to install/remove/use snaps.
« Last Edit: December 29, 2017, 04:20:00 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 ralphrmartin

  • Regular Contributor
  • *
  • Posts: 224
  • Country: gb
    • Work website
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #149 on: December 29, 2017, 06:29:14 am »
Screenshot works well now for keysight, producing a bmp file, and for the Rigol, also producing a bmp file.  :-+
(Without specifying plugins to use).

Keep up the good work!  :)
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #150 on: December 29, 2017, 08:11:15 am »
Screenshot works well now for keysight, producing a bmp file, and for the Rigol, also producing a bmp file.  :-+
(Without specifying plugins to use).

Keep up the good work!  :)

Thanks :)

And thank you for your patience getting the snap running. Great to finally have a Keysight instrument tested working :)

For your testing effort I've added you to the list of contributors.
« Last Edit: December 29, 2017, 08:13:49 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
 
The following users thanked this post: ralphrmartin

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #151 on: December 30, 2017, 07:31:30 am »
New releases available via snap or source.

Changes:
https://github.com/lxi-tools/lxi-tools/releases/tag/v1.16
https://github.com/lxi-tools/liblxi/releases/tag/v1.9

The changes fix the keysight-ivx and rigol-dg4000 screenshot plugins. The discover feature has also been improved with a fallback to request ID via HTTP/XML - this should make it possible to discover instruments from e.g. Aim-TTi.

Also added are fixes making it ready for packaging in Debian and FreeBSD.
« Last Edit: December 30, 2017, 07:35:20 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
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #152 on: January 03, 2018, 06:42:55 am »
I know that some people would welcome a GUI for lxi-tools.

Here is a first try at adding a simple QT5 GUI:



In its first iteration it can simply discover instruments via VXI-11.

To keep the UI simple and easy-to-use I think the next step would be to feature a right-click context menu for the listed instruments which provides the following options:

* Send SCPI command
* Take screenshot (only shown if a matching screenshot plugin is available)
* Benchmark
* Copy Instrument ID
* Copy IP Address

The GUI application binary will be named lxi-gui but will also be possible to start via the commandline lxi tool using the following command: lxi gui

If there are any GUI or QT5 designers out there who are interested in helping creating this GUI application feel free to join in :)

Also, if anyone wants to add a custom, fast, simple or advanced GUI for their particular instrument it is now possible with this lxi-tools/QT5 stack. Contributors are welcome to add any useful instrument tools to lxi-tools.
« Last Edit: January 03, 2018, 07:46:57 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
 
The following users thanked this post: HoracioDos

Offline ralphrmartin

  • Regular Contributor
  • *
  • Posts: 224
  • Country: gb
    • Work website
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #153 on: January 04, 2018, 05:35:33 am »
Just a thought: it could perhaps be useful if some of the most common SCPI commands could be available in a menu, e.g. perform self-test.
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #154 on: January 04, 2018, 06:25:31 am »
Just a thought: it could perhaps be useful if some of the most common SCPI commands could be available in a menu, e.g. perform self-test.

Yeah - the "IEEE 488.2 Common Commands".

http://na.support.keysight.com/vna/help/latest/Programming/GP-IB_Command_Finder/Common_Commands.htm

I'm considering introducing separate tabs/panes for each of the following features: Discovery, SCPI, Screenshot, Benchmark.

Then have the SCPI, Screenshot, and Benchmark features operate on the instrument selected in Discovery.

I'm about to focus on implementing the HiSlip protocol - it will be a while before I revisit the GUI so I'm open for ideas and suggestions.

An instrument manufacturer is kindly sponsoring a HiSlip instrument so I will soon have something to test against  :-+
« Last Edit: January 04, 2018, 12:23:20 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
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #155 on: January 09, 2018, 01:47:55 am »
Siglent Technologies has kindly lent me their new SDS1204X-E oscilloscope (200 MHz, 4 channels) to help the lxi-tools open source effort :-+

I hooked it up, calibrated the 4 included probes, and after enabling the network interface (DHCP) it was easily discovered with lxi-tools.



It turns out that this is an absolutely blazingly fast scope, especially in terms of LXI/LAN SCPI command processing performance!

With the benchmark feature I'm getting ~1100 requests/s via TCP/VXI11:

Code: [Select]
$ lxi benchmark --address 192.168.1.125
Benchmarking by sending 1000 ID requests. Please wait...
Result: 1123.5 requests/second

And I get ~600 requests/s via TCP/RAW:
Code: [Select]
$ lxi benchmark --raw --address 192.168.1.125
Benchmarking by sending 1000 ID requests. Please wait...
Result: 1123.5 requests/second

This is quite impressive. Compared, the performance of e.g. the Rigol DS1054Z is ~30 requests/s via TCP/VXI11 and ~160 requests/s via TCP/RAW.

Of course, the faster performance is to be expected from a newly released scope which clearly uses a newer and faster chipset. However, fact still is, it is very fast and it is one of the first low cost scopes that makes it possible to easily implement a poor-mans data logger using LXI/LAN polling that can consistently sample data at e.g. 100 Hz or more.

I also notice that Siglent uses standard LXI ports as defined here: http://www.lxistandard.org/About/LXI-Protocols.aspx

That is, the available network ports for the SDS1204X-E are:
Code: [Select]
$ nmap -p- 192.168.1.125

Starting Nmap 7.60 ( [url]https://nmap.org[/url] ) at 2018-01-08 15:18 CET
Nmap scan report for 192.168.1.125
Host is up (0.042s latency).
Not shown: 65529 closed ports
PORT     STATE SERVICE
23/tcp   open  telnet
80/tcp   open  http
111/tcp  open  rpcbind
918/tcp  open  unknown
5024/tcp open  scpi-telnet
5025/tcp open  scpi-raw

Nmap done: 1 IP address (1 host up) scanned in 40.14 seconds

In particular, they use standard port 5025 for SCPI/RAW and port 5024 for SCPI/telnet. This is one of the odd things that Rigol fails to do for the DS1054Z (they place it on non-standard port 5555):

Code: [Select]
$ nmap -p- 192.168.1.210

Starting Nmap 7.60 ( [url]https://nmap.org[/url] ) at 2018-01-08 15:19 CET
Nmap scan report for 192.168.1.210
Host is up (0.080s latency).
Not shown: 65529 closed ports
PORT     STATE SERVICE
80/tcp   open  http
111/tcp  open  rpcbind
617/tcp  open  sco-dtmgr
618/tcp  open  dei-icda
619/tcp  open  compaq-evm
5555/tcp open  freeciv

Nmap done: 1 IP address (1 host up) scanned in 40.54 seconds

Taking a screenshot with the SDS1204X-E is very fast too:
Code: [Select]
$ time lxi screenshot -a 192.168.1.125
Loaded siglent-sds screenshot plugin
Saved screenshot image to screenshot_192.168.1.125_2018-01-08_15:37:22.bmp

real    0m0,141s
user    0m0,004s
sys     0m0,024s

Only ~0.14 second!

It's also nice to see that the Siglent scope has a small and light form factor which feels solid.

My first impressions are good - I'm looking forward to more testing with this instrument during the development of the GUI frontend for lxi-tools. It will also make a nice addition to the pool of instruments that I plan to use for lxi-tools performance and regression testing.
« Last Edit: February 02, 2018, 04:57:45 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
 
The following users thanked this post: paf, tautech

Offline BloodyCactus

  • Frequent Contributor
  • **
  • Posts: 455
  • Country: us
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #156 on: January 09, 2018, 12:46:53 pm »
just because, why not :P R&S HMO1202 (which seems surprisingly slow...)

Code: [Select]
[ sgeorge @ workstation ] - [ ~/git/rai1/c64_c128_plus4 ] (master*)
[$]> lxi --version
lxi v1.17

[ sgeorge @ workstation ] - [ ~/git/rai1/c64_c128_plus4 ] (master*)
[$]> lxi benchmark --address scope.cactus
Benchmarking by sending 100 ID requests. Please wait...
Result: 13.9 requests/second

[ sgeorge @ workstation ] - [ ~/git/rai1/c64_c128_plus4 ] (master*)
[$]> lxi benchmark --raw --address scope.cactus
Benchmarking by sending 100 ID requests. Please wait...
Result: 12.6 requests/second

[ sgeorge @ workstation ] - [ ~/git/rai1/c64_c128_plus4 ] (master*)
[$]> nmap -p- scope.cactus

Starting Nmap 7.01 ( https://nmap.org ) at 2018-01-08 20:39 EST
Nmap scan report for scope.cactus (192.168.0.107)
Host is up (0.0022s latency).
Not shown: 65530 closed ports
PORT     STATE SERVICE
80/tcp   open  http
111/tcp  open  rpcbind
1024/tcp open  kdm
1025/tcp open  NFS-or-IIS
5025/tcp open  unknown

Nmap done: 1 IP address (1 host up) scanned in 11.73 seconds
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #157 on: January 09, 2018, 11:10:46 pm »
just because, why not :P R&S HMO1202 (which seems surprisingly slow...)

He he - that is truly slow!

That must be the lowest benchmark scores I has seen so far.

I'm not that surprised though - well established big company instrument manufacturers like R&S tend to over engineer things and this sometimes leads to over engineered cost reduction. Likely their instrument is featuring a low cost, low performance application/communication processor or their application/network stack is horribly inefficient - I think the former is probably the case.
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 ralphrmartin

  • Regular Contributor
  • *
  • Posts: 224
  • Country: gb
    • Work website
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #158 on: January 10, 2018, 04:12:56 am »
Another instrument for you: Keysight 34461A multimeter.
Discovery works fine.
Sending scpi commands seems OK (e.g. *IDN? returns the expected ID string).
Trying to take a screenshot results in it trying to use the rigol-1000Z plugin, and thence timeout. Telling it to use the keysight-ivx plugin gave the same result.
Doing a benchmark gave a result of 45.1 requests a second.

 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #159 on: January 10, 2018, 05:14:21 am »
Another instrument for you: Keysight 34461A multimeter.
Discovery works fine.
Sending scpi commands seems OK (e.g. *IDN? returns the expected ID string).
Trying to take a screenshot results in it trying to use the rigol-1000Z plugin, and thence timeout. Telling it to use the keysight-ivx plugin gave the same result.
Doing a benchmark gave a result of 45.1 requests a second.

Thanks. If you share the ID string that this instrument returns then I can fix the plugin matching part.

It looks like we need to create a new screenshot plugin for this instrument as it handles screenshots differently from the oscilloscopes.

EDIT: I have added a new screenshot plugin "keysight-dmm" that should work with your 34461A multimeter. Let me know if it works for you.
« Last Edit: January 10, 2018, 02:55:15 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
 
The following users thanked this post: ralphrmartin

Offline ralphrmartin

  • Regular Contributor
  • *
  • Posts: 224
  • Country: gb
    • Work website
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #160 on: January 11, 2018, 04:36:36 am »
Thanks. The ID string from the meter is
Keysight Technologies,34461A,<serial number here>,A.02.17-02.40-02.17-00.52-03-02
but apparently the ID string is user changeable to also make it look like an Agilent or HP unit, for backwards compatibility.

I tried
snap refresh lxi-tools --edge
to get your latest version, but it told me
snap "lxi-tools" has no updates available

snap list
reports
Name       Version  Rev   Developer  Notes
core       16-2.30  3748  canonical  core
lxi-tools  1.17     478   lundmar    -

Did I do something wrong? How should I get the new plugin?
« Last Edit: January 11, 2018, 04:46:24 am by ralphrmartin »
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #161 on: January 11, 2018, 05:17:42 am »
Thanks. The ID string from the meter is
Keysight Technologies,34461A,<serial number here>,A.02.17-02.40-02.17-00.52-03-02
but apparently the ID string is user changeable to also make it look like an Agilent or HP unit, for backwards compatibility.

I tried
snap refresh lxi-tools --edge
to get your latest version, but it told me
snap "lxi-tools" has no updates available

snap list
reports
Name       Version  Rev   Developer  Notes
core       16-2.30  3748  canonical  core
lxi-tools  1.17     478   lundmar    -

Did I do something wrong? How should I get the new plugin?

Good - the new plugin should match your ID.

Unfortunately it seems the snap build service is currently down and the ETA is unknown. Hopefully it will soon be available again so that a new snap will be built.

EDIT: It's because of the whole spectre/meltdown thing the build service is down.
« Last Edit: January 11, 2018, 05:58:01 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
 
The following users thanked this post: ralphrmartin

Offline ralphrmartin

  • Regular Contributor
  • *
  • Posts: 224
  • Country: gb
    • Work website
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #162 on: January 11, 2018, 06:02:06 am »
Good to know I haven't done something wrong. Will try again later, and report back. Thanks for the rapid responses! :)
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #163 on: January 13, 2018, 01:13:49 am »
This is how I think the new lxi GUI (lxi-gui) is going to look:



To make it really simple, all features in the listed tab views (SPCI, Screenshot, Benchmark, etc.) operate on the instrument selected in the instrument list.

Currently instruments are automatically added to the list via the search feature but I expect to add the option of also adding instruments manually in case an instrument does not support discovery.

I think the structure of this GUI is very user friendly.
« Last Edit: January 17, 2018, 11:04:08 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
 

Online Karel

  • Super Contributor
  • ***
  • Posts: 1139
  • Country: 00
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #164 on: January 13, 2018, 02:05:09 am »
 :-+
The difference between theory and practice is less in theory than
the difference between theory and practice in practice.
Expensive tools cannot compensate for lack of experience.
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #165 on: January 13, 2018, 03:26:20 am »
Good to know I haven't done something wrong. Will try again later, and report back. Thanks for the rapid responses! :)

The lxi-tools snap is now up to date.

The snap build service is finally up and running again after they patched their build servers with Spectre/Meltdown fixes.

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
 
The following users thanked this post: ralphrmartin

Offline ralphrmartin

  • Regular Contributor
  • *
  • Posts: 224
  • Country: gb
    • Work website
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #166 on: January 13, 2018, 05:04:18 am »
Great!  :-+ I now managed to snap refresh lxi-tools, and can confirm that the Keysight screenshot works as intended. :-+

The UI looks good too. Will it be possible to have multiple windows open, so you can send commands to more than one device at once? E.g. you might want to send frequency commands to an AWG, and measurement commands to a scope...

 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #167 on: January 13, 2018, 06:14:57 am »
Great!  :-+ I now managed to snap refresh lxi-tools, and can confirm that the Keysight screenshot works as intended. :-+

Good - I've added it to the list of tested instruments. Thanks for testing  :-+

The UI looks good too. Will it be possible to have multiple windows open, so you can send commands to more than one device at once? E.g. you might want to send frequency commands to an AWG, and measurement commands to a scope...

Well, yes and no. You can open multiple instances of the application and this way control multiple instruments through different windows.

However, the tab views you see will only support one instrument at a time - namely the one selected.

The feature you are describing is something that I hope to eventually support in a script feature which might become part of lxi-gui.

Meaning, you will be able to use lxi-gui to build a script which contains various action items such as SCPI commands managing one or more instruments.

Each action item will be written in Lua which is a simple, fast, and powerful scripting language.

Lua will make it possible to create scripts looking like this (example):

Code: [Select]
inst0 = connect("vxi11://10.0.0.42")
inst1 = connect("vxi11://192.168.0.21")

scpi(inst0, ":source:frequency 10000")

sleep(1000)

voltage = scpi(inst1, ":measure:voltage:dc?")
if (voltage < 10.5) then fail() end

disconnect(inst1)
disconnect(inst0)

Or, a slightly different but object oriented variation of the same:

Code: [Select]
inst0 = connect("vxi11://10.0.0.42")
inst1 = connect("vxi11://192.168.0.21")

inst0.scpi(":source:frequency 10000")

sleep(1000)

voltage = inst1.scpi(":measure:voltage:dc?")
if (voltage < 10.5) then fail() end

disconnect(inst1)
disconnect(inst0)

Each section in this script can be a separate item in a graphical representation of the script.

The script can be saved/loaded from the application and there will be "play", "pause", "stop" buttons. When you press play it will run the script and each action item will be marked red or green depending on if they fail or succeed.

I think it will work quite nicely. Even though I don't have any plans to add an elaborate GUI for handling graphical scripting blocks I'm making it so it will be possible to add in the future. Ultimately, having Lua scripting support will make it possible to do some of the graphical programming that application such as BenchVue supports.
« Last Edit: January 14, 2018, 10:31:39 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
 
The following users thanked this post: ralphrmartin

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 13889
  • Country: nl
    • NCT Developments
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #168 on: January 14, 2018, 02:27:09 am »
Lua support would be a great feature!  :-+
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #169 on: January 14, 2018, 03:16:34 am »
Lua support would be a great feature!  :-+

I think so too. Of all the scripting languages Lua is quite beautiful/straightforward and it has all the basic language features that are required for logic control. It helps keep the script syntax simple.
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 alm

  • Super Contributor
  • ***
  • Posts: 1163
  • Country: 00
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #170 on: January 14, 2018, 08:54:13 pm »
If you develop this into an instrument control GUI and scripting language, would it not make sense to use an abstraction like VISA rather than interfacing with LXI directly? Otherwise developing a script while having an instrument without LXI in the mix (USBTMC/GPIB/RS-232) becomes a pain, while in VISA you would only change the connection string.
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #171 on: January 14, 2018, 10:09:25 pm »
If you develop this into an instrument control GUI and scripting language, would it not make sense to use an abstraction like VISA rather than interfacing with LXI directly? Otherwise developing a script while having an instrument without LXI in the mix (USBTMC/GPIB/RS-232) becomes a pain, while in VISA you would only change the connection string.

I understand what you are saying but I'm afraid adding a VISA abstraction is beyond the scope and resources of this project.

As you said, VISA abstracts various interfaces such as VXI11/USBTMC/GPIB/RS-232. However, since this is lxi-tools the focus is exclusively on the interfaces supported by the LXI standard (VXI11/HiSLIP etc.) so for this project there are no plans to support other interfaces nor add a full blown VISA API in e.g. Lua.

What you are suggesting is something which would be an excellent feature for a future open source visa-tools project ;)
« Last Edit: January 14, 2018, 10:22:52 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 nctnico

  • Super Contributor
  • ***
  • Posts: 13889
  • Country: nl
    • NCT Developments
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #172 on: January 14, 2018, 10:29:50 pm »
If you develop this into an instrument control GUI and scripting language, would it not make sense to use an abstraction like VISA rather than interfacing with LXI directly? Otherwise developing a script while having an instrument without LXI in the mix (USBTMC/GPIB/RS-232) becomes a pain, while in VISA you would only change the connection string.
A better approach would be to add support to send commands to USBTMC or a COM port (both are pretty similar). VISA is way too bloated.
« Last Edit: January 14, 2018, 11:03:46 pm by nctnico »
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #173 on: January 14, 2018, 10:39:43 pm »
If you develop this into an instrument control GUI and scripting language, would it not make sense to use an abstraction like VISA rather than interfacing with LXI directly? Otherwise developing a script while having an instrument without LXI in the mix (USBTMC/GPIB/RS-232) becomes a pain, while in VISA you would only change the connection string.
A better approach would be to add support to send commands to USBTMC or a COM port (both are pretty similar). VISA is way to bloated.

I agree, if you look at the general syntax and features of VISA you either love it or hate it.

The interface that I plan to support in Lua will be much simpler - just a basic interface for sending SCPI commands, handling responses, and reporting failed test cases.

If this Lua interface proves itself to be useful/efficient/successful , one could consider expanding and adding support for non-LXI interfaces but I think that is something which should be reserved for another project.
« Last Edit: January 14, 2018, 11:17:10 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 alm

  • Super Contributor
  • ***
  • Posts: 1163
  • Country: 00
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #174 on: January 14, 2018, 11:05:53 pm »
A better approach would be to add support to send commands to USBTMC or a COM port (both are pretty similar). VISA is way to bloated.
I was not suggesting to use the NI-VISA implementation, but abstracting the protocol used to access an instrument. For example, there is a Python implementation that is pretty light weight. When I was controlling a DSO that could either controlled through RS-232 or GPIB, I made my own abstraction that would call either ibconfig(), ibwrt() etc for GPIB, or tcsetattr(), write() etc for RS-232, so I did not have to sprinkle conditionals all through my code.

But obviously in a volunteer project the decision on what direction to go is entirely on the developers doing the work.
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #175 on: January 14, 2018, 11:55:30 pm »
A better approach would be to add support to send commands to USBTMC or a COM port (both are pretty similar). VISA is way to bloated.
I was not suggesting to use the NI-VISA implementation, but abstracting the protocol used to access an instrument. For example, there is a Python implementation that is pretty light weight. When I was controlling a DSO that could either controlled through RS-232 or GPIB, I made my own abstraction that would call either ibconfig(), ibwrt() etc for GPIB, or tcsetattr(), write() etc for RS-232, so I did not have to sprinkle conditionals all through my code.

But obviously in a volunteer project the decision on what direction to go is entirely on the developers doing the work.

I think supporting non-LXI interfaces is out of scope for lxi-tools, VISA abstracted or not.

However, I do plan to support instruments with GPIB/RS-232 etc. but do so via a LXI bridge adapter.

Once lxi-tools is in a good shape I hope to maybe design such a thing and support it with open source firmware :)

After all, the future is about everything being network connected :)
« Last Edit: January 14, 2018, 11:57:52 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
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #176 on: January 17, 2018, 10:52:46 am »
I've added the benchmark feature to the new lxi-gui application:

« Last Edit: January 17, 2018, 11:02:55 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
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #177 on: January 18, 2018, 07:47:58 am »
Basic screenshot feature added:





Still a lot to be done. Needs some sort of (full screen) image viewer feature and perhaps a screenshot live view feature (continuously take screenshots - in case of the SDS1204X-E it can perform about 3 frames/second which is pretty good).
« Last Edit: January 20, 2018, 01:06:11 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
 
The following users thanked this post: tautech

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #178 on: January 19, 2018, 05:01:09 am »
FYI - for those who want to try out the new lxi-gui application you should now be able to install and start it using the following commands:

Code: [Select]
$ snap install lxi-tools --edge
$ lxi-tools.lxi-gui

It should also be possible to simply start the application by searching for it in whatever desktop environment you have installed.

lxi-gui is still work in progress and I consider it BETA quality but the basic features are working (discover, SCPI, Screenshot, Benchmark).

If there is anyone out there who would like to help refine the GUI application please feel free to join the project.

I'm not an expert QT5 programmer so it takes time to figure out how to do QT stuff so any help would be appreciated, even if you have no experience in QT programming.

Also, if anyone have some good ideas on features or in which direction lxi-gui should go let yourself be heard :)

Some have suggested to add GUI frontends for various instruments. It is certainly a possibility but I don't have the bandwidth to create nor test such instrument specific interfaces myself. These are things which would be excellent to engage in by contributors who find such things useful. Imagine one of the tab views in lxi-gui automatically showing the instrument UI for the selected and supported instrument...
« Last Edit: January 20, 2018, 10:01:43 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
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #179 on: January 20, 2018, 02:34:11 am »
I've added the IEEE 488.2 Common Commands in the SCPI tab:



Each of the common command buttons displays a tool tip when hovering the mouse over the button.
« Last Edit: January 20, 2018, 09:51:59 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
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #180 on: January 20, 2018, 07:46:33 pm »
The GUI is now fully responsive, meaning it supports resizing the application window to any size and the contents will adjust accordingly.

I consider the widget layout done. It's available via snap. I expect to include lxi-gui in an upcoming lxi-tools release.

This is what the final result looks like:











« Last Edit: January 21, 2018, 04:27:39 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
 
The following users thanked this post: tautech, ralphrmartin

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #181 on: January 23, 2018, 04:48:48 am »
First attempt at adding a simple data recorder feature:

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
 
The following users thanked this post: ralphrmartin, HoracioDos

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #182 on: January 25, 2018, 04:20:44 am »
I've added a vote in the top of this thread: "What OS platform would you like to see lxi-tools ported to next?"

Feel free to cast your vote. Thanks  :-+
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
 

Online Karel

  • Super Contributor
  • ***
  • Posts: 1139
  • Country: 00
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #183 on: January 25, 2018, 05:15:20 am »
I've added a vote in the top of this thread: "What OS platform would you like to see lxi-tools ported to next?"

Feel free to cast your vote. Thanks  :-+

I would like to see that you don't divide your resources over multiple platforms. Instead, focus on Linux only.

The difference between theory and practice is less in theory than
the difference between theory and practice in practice.
Expensive tools cannot compensate for lack of experience.
 
The following users thanked this post: stj

Offline HoracioDos

  • Regular Contributor
  • *
  • Posts: 218
  • Country: ar
  • Just an IT monkey with a DSO
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #184 on: January 26, 2018, 12:24:23 pm »
I would like to see that you don't divide your resources over multiple platforms. Instead, focus on Linux only.

Yeap! There's a missing option that I would like to vote: NONE!!!   >:D

 
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #185 on: January 26, 2018, 01:37:39 pm »
I would like to see that you don't divide your resources over multiple platforms. Instead, focus on Linux only.

Yeap! There's a missing option that I would like to vote: NONE!!!   >:D

Ha ha guys - I see what you are saying. Don't worry - I don't expect to spend time porting it anytime soon. The poll is just to get a feeling of what the demand is for other platforms.
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
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #186 on: January 28, 2018, 10:36:43 am »
lxi-tools v1.17 has been released - see http://lxi-tools.github.io

This is the first release to include the new lxi-gui frontend which features some of the same features as the lxi command line tool plus a few additional features such as a screenshot viewer (single shot and live view) and a simple data recorder. lxi-gui is considered BETA but in a perfectly usable state.

It is available for installation via snap.



« Last Edit: January 28, 2018, 11:05:34 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 Dwaine

  • Regular Contributor
  • *
  • Posts: 212
  • Country: ca
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #187 on: January 28, 2018, 07:03:18 pm »
How do you compile the lxi-gui?
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #188 on: January 29, 2018, 12:50:41 am »
How do you compile the lxi-gui?

By default the configure script disables lxi-gui.

You have to add the '--enable-lxi-gui' configure flag.

However, if you can, I recommend simply using snap to install latest version which includes lxi-gui (lxi-tools.lxi-gui).
« Last Edit: January 29, 2018, 01:03:20 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 Dwaine

  • Regular Contributor
  • *
  • Posts: 212
  • Country: ca
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #189 on: January 29, 2018, 10:44:40 am »
Thanks.   I prefer to build by source.
 

Offline Dwaine

  • Regular Contributor
  • *
  • Posts: 212
  • Country: ca
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #190 on: January 29, 2018, 11:15:12 am »
That worked great.  I had to change the Makefile.in for the fedora qmake-qt5. It was defaulting to qmake.

The GUI is really nice. Worked great with my Rigol scope.  Testing out the graphing with my DM3068.
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #191 on: January 29, 2018, 11:31:43 am »
That worked great.  I had to change the Makefile.in for the fedora qmake-qt5. It was defaulting to qmake.

The GUI is really nice. Worked great with my Rigol scope.  Testing out the graphing with my DM3068.

Great, and thanks  :-+

I'm pretty happy with the general design of the GUI - I hope we can keep this simple layout even as more features are added in the future.

FYI - the issue with calling the correct qmake should be resolved in latest git (it is now calling QT5 qmake indirectly via the qtchooser tool).

« Last Edit: January 30, 2018, 07:22:55 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 ralphrmartin

  • Regular Contributor
  • *
  • Posts: 224
  • Country: gb
    • Work website
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #192 on: January 30, 2018, 09:42:28 pm »
Lundmar

Just a quick comment - the GUI is a little inflexible for small screens. I am running all this on a MacBook Air (under VirtualBox) which gives me an effective screen height of  just over 700 pixels. As a result, the bottom of the window is cut off, and there is no scroll bar etc to make it visible. Is there any simple way to make the window a bit more friendly to smaller screens?

Thanks for all the good work on this!

Ralph
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #193 on: January 30, 2018, 10:25:35 pm »
Lundmar

Just a quick comment - the GUI is a little inflexible for small screens. I am running all this on a MacBook Air (under VirtualBox) which gives me an effective screen height of  just over 700 pixels. As a result, the bottom of the window is cut off, and there is no scroll bar etc to make it visible. Is there any simple way to make the window a bit more friendly to smaller screens?

Thanks for all the good work on this!

Ralph

Hmm, isn't mac supposed to have them fancy high resolution Retina displays? ;)

I've reduced the minimum window size to 700x600 so I assume you can fit it now.
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
 
The following users thanked this post: ralphrmartin

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #194 on: February 02, 2018, 04:50:05 am »
I had to go back and update the benchmark performance numbers for the Siglent SDS1204X-E because it turns out my network routing tables were messed up so all tests were performed over wifi - arrghhhh!  |O

Over cabled network it's not doing ~300 requests/second.... It's doing ~1100 requests/second!!!!

Bam! Thats almost as fast as a Dolorean in overdrive!

With such result there is plenty room to make a poor-mans-datalogger sampling maybe several values at e.g. 100Hz or more.

Oh, and the screenshot live view feature in lxi-gui is now even more smooth hitting about 7 frames/second.
« Last Edit: February 02, 2018, 05:00:24 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
 
The following users thanked this post: tautech

Offline technogeeky

  • Frequent Contributor
  • **
  • Posts: 502
  • Country: us
  • Older New "New Player" Player Playa'
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #195 on: February 02, 2018, 05:34:11 am »
I had to go back and update the benchmark performance numbers for the Siglent SDS1204X-E because it turns out my network routing tables were messed up so all tests were performed over wifi - arrghhhh!  |O

Over cabled network it's not doing ~300 requests/second.... It's doing ~1100 requests/second!!!!

Bam! Thats almost as fast as a Dolorean in overdrive!

With such result there is plenty room to make a poor-mans-datalogger sampling maybe several values at e.g. 100Hz or more.

Oh, and the screenshot live view feature in lxi-gui is now even more smooth hitting about 7 frames/second.

I haven't looked into this software for my oscilloscope (1054z), but I wanted to point out two things I learned when testing various software and hardware configurations in an effort to get the fastest screen capture of the 1054z to make videos/GIFs.

The first thing I learned is that, for the 1054z at least, there is a big difference in screen capture speed over ethernet versus USB; and furthermore this difference changes depending on OS. In my case (Linux) the USB capture was the fastest (maximum capture rate is about 1/3 of a second versus about 2 seconds).

So once I settled on the software and the USB screen capture method, I used the Rigol Bildschirmkopie software to capture "as fast as possible" (the next fastest option being once per second).

However while this does work, it causes many in-scope computed functions to slow down or cease computing entirely! This includes things like updating the various measurement items at the bottom of the screen; it includes the MATH functionality, and it includes the FFT. In other words, while the oscilloscope trace itself would be correct on every screen capture (every 1/3 of a second), the reported measured values would just freeze and stay the same (on both the oscilloscope and the captured screen). The FFT would freeze. And so on.

I'm aware of the notion that one of the main advantages of these new Siglent oscilloscopes is that they are faster, but I wanted to make sure you keep this in mind when doing tests and make sure to report this kind of behavior if you see it. If you do see it, it may be helpful to report the fastest synthetic test to get screen captures and also report how much slower you have to go, if any, to get all features on the screen to update.

As a corollary to this, since it seems the behavior of the Rigol is to drop updating certain on-screen functions if screenshot requests are made too fast, perhaps the Siglent behaves differently: it may slow down screenshot capture rates if there is much more computation going on. Perhaps this is worth testing too.

In any case, please capture a bunch of screenshots and use some software to string them together into a GIF so you can post it here and show off how pretty it is.

I use the free software GIMP, and the steps are pretty easy:

1. "Open as Layers" all of the captures.
2. Do Filters -> Animation -> Optimize (for GIF)
3. Export as GIF, and be sure to set: export as animation, set a reasonable delay between frames, use delay for all frames, and select combine.

I look forward to seeing some samples of what that scope can do in this regard!
 

Online Karel

  • Super Contributor
  • ***
  • Posts: 1139
  • Country: 00
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #196 on: February 02, 2018, 06:04:45 am »
In my case (Linux) the USB capture was the fastest (maximum capture rate is about 1/3 of a second versus about 2 seconds).

Put a USB webcam in front of the scope and you'll get a much higher framerate.
And it doesn't slowdown the scope...
The difference between theory and practice is less in theory than
the difference between theory and practice in practice.
Expensive tools cannot compensate for lack of experience.
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #197 on: February 02, 2018, 06:11:24 am »
I haven't looked into this software for my oscilloscope (1054z), but I wanted to point out two things I learned when testing various software and hardware configurations in an effort to get the fastest screen capture of the 1054z to make videos/GIFs.

The first thing I learned is that, for the 1054z at least, there is a big difference in screen capture speed over ethernet versus USB; and furthermore this difference changes depending on OS. In my case (Linux) the USB capture was the fastest (maximum capture rate is about 1/3 of a second versus about 2 seconds).

So once I settled on the software and the USB screen capture method, I used the Rigol Bildschirmkopie software to capture "as fast as possible" (the next fastest option being once per second).

However while this does work, it causes many in-scope computed functions to slow down or cease computing entirely! This includes things like updating the various measurement items at the bottom of the screen; it includes the MATH functionality, and it includes the FFT. In other words, while the oscilloscope trace itself would be correct on every screen capture (every 1/3 of a second), the reported measured values would just freeze and stay the same (on both the oscilloscope and the captured screen). The FFT would freeze. And so on.

I'm aware of the notion that one of the main advantages of these new Siglent oscilloscopes is that they are faster, but I wanted to make sure you keep this in mind when doing tests and make sure to report this kind of behavior if you see it. If you do see it, it may be helpful to report the fastest synthetic test to get screen captures and also report how much slower you have to go, if any, to get all features on the screen to update.

As a corollary to this, since it seems the behavior of the Rigol is to drop updating certain on-screen functions if screenshot requests are made too fast, perhaps the Siglent behaves differently: it may slow down screenshot capture rates if there is much more computation going on. Perhaps this is worth testing too.


Sure - I already plan to report back such findings. But first I have to fix some things with the data recorder feature in lxi-gui - once that is solved I'm going to play around to see how fast my instruments can actually sample with 2 or more data measurements.

I am of course fully aware there is a difference between benchmarking the request/response time and sampling various measurements. If the measurements are super slow because the chipset or any of its sampling subsystems are slow or overloaded then a quick network response time is no use.

I'm not surprised USB is faster on your Rigol, after all USB2 is 4-5 times faster than your typical 100 Mb/s Ethernet connection which most instruments still rely on. They have yet to jump the 1 Gb/s wagon. I expect we will see that happen soon as modern chipsets are now starting to feature 1G/s network interfaces.

In any case, please capture a bunch of screenshots and use some software to string them together into a GIF so you can post it here and show off how pretty it is.

I use the free software GIMP, and the steps are pretty easy:

1. "Open as Layers" all of the captures.
2. Do Filters -> Animation -> Optimize (for GIF)
3. Export as GIF, and be sure to set: export as animation, set a reasonable delay between frames, use delay for all frames, and select combine.

I look forward to seeing some samples of what that scope can do in this regard!

I can put together a small sample.
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 technogeeky

  • Frequent Contributor
  • **
  • Posts: 502
  • Country: us
  • Older New "New Player" Player Playa'
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #198 on: February 02, 2018, 06:12:36 am »
In my case (Linux) the USB capture was the fastest (maximum capture rate is about 1/3 of a second versus about 2 seconds).

Put a USB webcam in front of the scope and you'll get a much higher framerate.
And it doesn't slowdown the scope...

As though I hadn't considered this. A scope capture program also doesn't suffer from hands going in front of the screen.

In practice, the solution I mentioned works quite well. For example*:




* Note this is at a deceptively high frame rate because it's a capture over 45 minutes.


Another example, taken at 1 screenshot per second:

.
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #199 on: February 02, 2018, 07:44:29 am »
I captured a video instead to capture the time correctly:

https://raw.githubusercontent.com/lxi-tools/misc/master/lxi-gui-benchmark-live-view-sds1204xe.webm

It demonstrates the benchmark and live screenshot feature on the SDS1204X-E. It feels quite responsive.

Update: New video.
« Last Edit: February 03, 2018, 12:45:47 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
 
The following users thanked this post: tautech, technogeeky

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #200 on: February 03, 2018, 02:18:25 pm »
lxi-tools is now on youtube:

http://www.youtube.com/channel/UCDySM9OfJsJ99LBhrfv-pFQ

First video uploaded:

« Last Edit: February 03, 2018, 02:22:54 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
 
The following users thanked this post: Deuze, HoracioDos

Offline HoracioDos

  • Regular Contributor
  • *
  • Posts: 218
  • Country: ar
  • Just an IT monkey with a DSO
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #201 on: February 03, 2018, 10:37:42 pm »
lxi-tools is now on youtube:
Already subscribed here. I hope this is the first of many others regardless of lxi-tools.  :-+
 

Offline Hydron

  • Regular Contributor
  • *
  • Posts: 201
  • Country: gb
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #202 on: February 03, 2018, 11:23:02 pm »
Looks great, will have a play with my RTB2004 when i get time.
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #203 on: February 04, 2018, 02:16:43 am »
Looks great, will have a play with my RTB2004 when i get time.

Let me know when you do you, then we can create a screenshot plugin and get it working with lxi-tools  :-+

Update: I went ahead and updated the existing Rohde & Schwarz plugin to make it support RTB 2000. It should work with your instrument. It is available for testing via the snap edge channel.
« Last Edit: February 04, 2018, 02:51:07 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 Jester

  • Regular Contributor
  • *
  • Posts: 217
  • Country: us
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #204 on: February 04, 2018, 02:53:48 am »
I can't wait for a Windows version.
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #205 on: February 04, 2018, 02:54:23 am »
lxi-tools is now on youtube:
Already subscribed here. I hope this is the first of many others regardless of lxi-tools.  :-+

Thanks for your encouragement. I hope to create more videos in the future :)
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
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #206 on: February 04, 2018, 03:04:09 am »
I can't wait for a Windows version.

One of two things might happen:

 * snaps will magically become supported on Windows via clever virtualization
 * someone ports lxi-tools to Windows

For now, my focus is on new features so I'm hoping the first might happen, which will require no effort, or that someone steps in to help make lxi-tools work on Windows.
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 Gabri74

  • Regular Contributor
  • *
  • Posts: 72
  • Country: it
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #207 on: February 05, 2018, 08:52:47 pm »
I captured a video instead to capture the time correctly:

https://raw.githubusercontent.com/lxi-tools/misc/master/lxi-gui-benchmark-live-view-sds1204xe.webm

It demonstrates the benchmark and live screenshot feature on the SDS1204X-E. It feels quite responsive.

Really nice, great work!
One question: does the continuous screenshotting via the live feature impact scope performance ? Did you see any slowdown in the responsiveness of the Siglent UI ?
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #208 on: February 06, 2018, 01:10:28 am »
I captured a video instead to capture the time correctly:

https://raw.githubusercontent.com/lxi-tools/misc/master/lxi-gui-benchmark-live-view-sds1204xe.webm

It demonstrates the benchmark and live screenshot feature on the SDS1204X-E. It feels quite responsive.

Really nice, great work!
One question: does the continuous screenshotting via the live feature impact scope performance ? Did you see any slowdown in the responsiveness of the Siglent UI ?

Thanks. No, it still felt quite responsive during the live view. However, it was a simple test so I will have to do some more testing to tell for sure.
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
 
The following users thanked this post: Gabri74

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #209 on: February 06, 2018, 04:08:03 am »
A big thank you and shout-out to Kikusui Electronics Corporation who has sponsored one of their latest generation compact DC power supplies, the PMX35-3A, to support the continued development of the open source lxi-tools project  :-+

I hooked it up to power one of my embedded Linux development boards and connected it to the network after which it was easily discovered with lxi-tools.



This is a really nice and compact DC power supply but what makes it particular interesting for the lxi-tools project, besides being fully LXI compliant, is the fact that it features the new HiSlip communication protocol and mDNS/DNS-SD service discovery. This device is going to be very helpful and instrumental in the effort to bring HiSlip and mDNS discovery features to lxi-tools.

In fact, testing with the PMX35-3A revealed the already implemented lxi-tools mDNS discovery feature to be broken. After further testing and debug this has been fixed and the mDNS discover feature now works perfectly fine:



Also, as is evident from the screenshot above, the PMX is an absolute screaming performance beast when it comes to VXI-11 and RAW communication speed!

With ~1600 requests/second for VXI-11 and as high as ~3700 requests/second for RAW - this is like nothing I have ever seen before - good work Kikusui!  :-+
 
After fixing the mDNS discover feature I started playing with the PMX device in combination with lxi-gui to test and refine the new data recorder feature. The end result is demonstrated in this youtube video:



Notice that the data recorder now automatically scales the chart axes and supports saving sample data to CSV for later import in e.g. Libreoffice Calc.

The command line lxi tool has been stable for a while and the new lxi-gui is now also getting in pretty good shape with all the basic features working. Next, focus is going to be on implementing an open source HiSlip library and armed with the Kikusui PMX35-3A we will now have a faster path to test and make sure the HiSlip implementation is correct  :-+
« Last Edit: February 06, 2018, 11:50:55 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
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
« Last Edit: February 06, 2018, 11:17:01 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: 218
  • Country: ar
  • Just an IT monkey with a DSO
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #211 on: February 07, 2018, 01:11:02 am »
I hooked it up to power one of my embedded Linux development boards and connected it to the network after which it was easily discovered with lxi-tools.
Nice!! It has its own LAN port. I would like to setup a USB to Ethernet bridge with a raspberry pi and try to send commands to a KORAD 3005p (Serial and USB ports only) just for fun.
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #212 on: February 07, 2018, 01:52:39 am »
I hooked it up to power one of my embedded Linux development boards and connected it to the network after which it was easily discovered with lxi-tools.
Nice!! It has its own LAN port. I would like to setup a USB to Ethernet bridge with a raspberry pi and try to send commands to a KORAD 3005p (Serial and USB ports only) just for fun.

It could be fun to create a LXI compatible Ethernet/USB/Serial bridge. This is one of the things that will become possible with the new hislip library I'm writing - it will support both server and client side.
« Last Edit: February 07, 2018, 01:24:27 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 Hydron

  • Regular Contributor
  • *
  • Posts: 201
  • Country: gb
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #213 on: February 07, 2018, 10:19:39 pm »
I have done a quick test of the RTB2004 using the "edge" release. Screenshots seem to work well, taking ~1.2s to capture. This is fine for screenshots but way too slow for making a video, best to use the fast web livescreen/remote panel if you need that. Discovery and screenshot plugin autodetect also work.

Benchmark shows the following (2 channels, roll mode - these numbers change significantly depending on how much work the scope is doing):
Code: [Select]
lxi benchmark -a 192.168.0.47 -c 1000
Benchmarking by sending 1000 ID requests. Please wait...
Result: 74.9 requests/second
lxi benchmark -a 192.168.0.47 -c 1000 -r
Benchmarking by sending 1000 ID requests. Please wait...
Result: 140.9 requests/second
I haven't tried logging anything yet, or the GUI.

Thanks for the work on this tool - I look forward to it's continued development!
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #214 on: February 08, 2018, 01:01:15 am »
I have done a quick test of the RTB2004 using the "edge" release. Screenshots seem to work well, taking ~1.2s to capture. This is fine for screenshots but way too slow for making a video, best to use the fast web livescreen/remote panel if you need that. Discovery and screenshot plugin autodetect also work.

Benchmark shows the following (2 channels, roll mode - these numbers change significantly depending on how much work the scope is doing):
Code: [Select]
lxi benchmark -a 192.168.0.47 -c 1000
Benchmarking by sending 1000 ID requests. Please wait...
Result: 74.9 requests/second
lxi benchmark -a 192.168.0.47 -c 1000 -r
Benchmarking by sending 1000 ID requests. Please wait...
Result: 140.9 requests/second
I haven't tried logging anything yet, or the GUI.

Thanks for the work on this tool - I look forward to it's continued development!

Great. It's not the fastest scope we have seen but it's not that slow either. However, I'm surprised that the instruments web live view feature is faster - it may be using a media streaming protocol to make it faster. Interesting.

Also, we might make the screenshot feature a bit faster by reconfiguring the plugin fo BMP instead of PNG. For some instruments PNG compression is relatively slow.

I'll add the scope to the list of tested instruments and add you as contributor for testing. Thanks.
« Last Edit: February 08, 2018, 01:10:07 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 Hydron

  • Regular Contributor
  • *
  • Posts: 201
  • Country: gb
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #215 on: February 08, 2018, 04:58:22 am »
The live view/control is VERY fast, e.g. see this video:

(skip to 50 min for a nice display of a swept function gen)

Unfortunately the UI could do with some speed improvements, especially when using lots of functions and channels simultaneously (and this is reflected in the LXI numbers as well). While it has a 1Gbit Ethernet interface, I don't think this has much effect as the bottleneck is not the connection (linked video is via WiFi access point I think). It's a shame as otherwise you could do some cool things with 1Gbit of network bandwidth (e.g. 10s of MSa/s streaming, or fast data capture/manipulation on PC). Hopefully manufacturers will start to improve in this area.
« Last Edit: February 08, 2018, 05:00:16 am by Hydron »
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #216 on: February 08, 2018, 05:14:12 am »
The live view/control is VERY fast, e.g. see this video:
(skip to 50 min for a nice display of a swept function gen)

Unfortunately the UI could do with some speed improvements, especially when using lots of functions and channels simultaneously (and this is reflected in the LXI numbers as well). While it has a 1Gbit Ethernet interface, I don't think this has much effect as the bottleneck is not the connection (linked video is via WiFi access point I think). It's a shame as otherwise you could do some cool things with 1Gbit of network bandwidth (e.g. 10s of MSa/s streaming, or fast data capture/manipulation on PC). Hopefully manufacturers will start to improve in this area.

That looks like a very nice and responsive web live control interface. The update rate must be 24 fps or more and I bet that the video feed is hardware encoded and streamed via RTSP or similar protocol. Every scope should do this :)
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 Hydron

  • Regular Contributor
  • *
  • Posts: 201
  • Country: gb
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #217 on: February 08, 2018, 05:38:58 am »
I haven't looked properly into how they're doing it, but I don't think it's a hardware encoded video - everything is FPGA based internally so there's no hard IP blocks to do something like that (and no evidence of video encoding artifacts). I've attached the web page source and the "screencam.js" client side code incase it's of interest (the other javascript used is some standard library by the looks of it). I had to add .txt extension because of forum limitation.
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #218 on: February 08, 2018, 06:05:12 am »
I haven't looked properly into how they're doing it, but I don't think it's a hardware encoded video - everything is FPGA based internally so there's no hard IP blocks to do something like that (and no evidence of video encoding artifacts). I've attached the web page source and the "screencam.js" client side code incase it's of interest (the other javascript used is some standard library by the looks of it). I had to add .txt extension because of forum limitation.

Ahh, I see. They are simply retrieving the image data directly from the webserver via HTTP requests:

"XMLHttpRequest;c.open("GET","/screenshot?img="+b+"&key="+vm,!0);c.setRequestHeader("Cache-Control","no-cache");..."

I can't tell from the code but the image format is likely just raw bitmap.

Inspired by this, I went ahead and reconfigured the R&S screenshot plugin to BMP. Feel free to test and see if it is faster than before :)
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 Hydron

  • Regular Contributor
  • *
  • Posts: 201
  • Country: gb
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #219 on: February 08, 2018, 06:42:22 am »
I tried to "refresh" the snap version to test, it reported that it was already up to date. Should I remove the snap version and clone/build the git repo?
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #220 on: February 08, 2018, 06:51:02 am »
I tried to "refresh" the snap version to test, it reported that it was already up to date. Should I remove the snap version and clone/build the git repo?

It's all automated so when I push a change to github the snap is automatically built and released for the various architectures. It usually only takes 10-20 minutes for a full update but currently it seems that i386/amd64 snaps are lagging behind.

You can see when it is updated here:
https://build.snapcraft.io/user/lxi-tools/lxi-tools.snapcraft

I expect they will build soon.

Update: Snaps with the updated R&S plugin are now built and released (edge channel).
« Last Edit: February 08, 2018, 07:26:11 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 Hydron

  • Regular Contributor
  • *
  • Posts: 201
  • Country: gb
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #221 on: February 08, 2018, 09:23:34 am »
No change in time for BMP, so the live screen view must be doing something different...
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #222 on: February 08, 2018, 09:29:33 am »
No change in time for BMP, so the live screen view must be doing something different...

Ok, well - it was worth a shot.
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
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #223 on: February 12, 2018, 01:00:02 am »
The SCPI tab page has been updated with some of the most useful mandatory SCPI 1999.0 commands. Especially the ":system:error?" command comes handy when programming and trying out commands.



Also, the "OPT?" command has been removed from the Common Commands as it is not strictly part of the IEEE 488.2 standard.

With the exception of adding support for adding customs command buttons I think this interface is done.
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 N0NB

  • Contributor
  • Posts: 25
  • Country: us
  • Amateur radio op; electronics dabbler
    • N0NB.us
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #224 on: February 12, 2018, 05:21:47 am »
I can report that my Siglent SDS 1202X-E benchmarks at 929 samples/second at 9999 samples.  The live view works surprisingly well.  Thanks, Martin.

For those of you who use Slackware, I have uploaded build scripts to SlackBuilds.org for both liblxi 1.9 and lxi-tools 1.16.  I have updates pending for 1.11 and 1.18, respectively, with a build option for the GUI so long as the SBo qt5 package is installed.  The scripts work for Slackware 14.2, bith 32 and 64 bit.

- Nate

The optimist proclaims we live in the best of all possible worlds.  The pessimist fears this is true.
 
The following users thanked this post: tautech, lundmar

Offline awallin

  • Frequent Contributor
  • **
  • Posts: 382
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #225 on: February 17, 2018, 07:53:01 pm »
Hi Lundmar, everyone,

I'd like to make an instrument that is controlled by LXI, I'm using an Arduino Due with Ethernet-shield on the Due.

Could you give some pointers on where to begin?
By googling I found some parsers for SCPI-commands (formatted ascii-text) - but I'm not sure what goes on top of the Arduino Ethernet driver to receive LXI commands?
Previously we used Modbus/TCP on the Arduino Due (and found a ready made library for that), but I'd like to move to LXI as modbus seems quite 1980s... ^-^

thanks!
AW
 

Offline N0NB

  • Contributor
  • Posts: 25
  • Country: us
  • Amateur radio op; electronics dabbler
    • N0NB.us
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #226 on: February 18, 2018, 12:38:59 am »
I can report that SlackBuild scripts for liblxi 1.11 and lxi-tools (with build option for the GUI) for Slackware/Slackware64 14.2 and friends are now live at SlackBuilds.org.
- Nate

The optimist proclaims we live in the best of all possible worlds.  The pessimist fears this is true.
 
The following users thanked this post: lundmar

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #227 on: February 18, 2018, 03:45:46 am »
Hi Lundmar, everyone,

I'd like to make an instrument that is controlled by LXI, I'm using an Arduino Due with Ethernet-shield on the Due.

Could you give some pointers on where to begin?
By googling I found some parsers for SCPI-commands (formatted ascii-text) - but I'm not sure what goes on top of the Arduino Ethernet driver to receive LXI commands?
Previously we used Modbus/TCP on the Arduino Due (and found a ready made library for that), but I'd like to move to LXI as modbus seems quite 1980s... ^-^

thanks!
AW

A LXI compatible instrument supports one of the following protocols for communicating SCPI: RAW/TCP, VXI11/TCP, HiSlip/TCP.

You have to decide which communication protocol to go with for your server implementation and then add to that your SCPI parser.

RAW/TCP offers fast communication but is less robust. It is easy to implement as it is just a standard socket TCP server. There are countless examples available online on how to create socket TCP servers.

VXI11/TCP is robust but slow as it introduces a lot of protocol communication overhead. It is more complicated to implement as it is a protocol based on the aging RPC framework. Both VXI11 client and server stubs are defined by this file: https://github.com/lxi-tools/liblxi/blob/master/src/vxi11core.rpcl and then generated into C code using the rpcgen tool: https://linux.die.net/man/1/rpcgen . General guides on how to implement a RPC(gen) server are available, for example: https://docs.oracle.com/cd/E19683-01/816-1435/rpcgenpguide-21470/index.html . However, the specific VXI11 server stub implementation is largely undocumented AFAIK which makes it harder to implement.

HiSlip/TCP is the future communications protocol for LXI compatible instruments. It is robust and basically just as fast as a RAW/TCP connection because it has very little communication overhead. I'm not aware of any open source client/server HiSlip implementations so I have started writing my own: https://github.com/lxi-tools/libhislip . It is still work in progress but now that I have finished the basics of lxi-gui I hope to continue this project but it won't be done anytime soon.

VXI-11 is available in most LXI compatible instruments and kind of considered the standard option. To keep things simple and get something working fast, you might just want to go with RAW/TCP.

Finally, to make your instrument discoverable on the network you will have to implement either VXI11 discovery or mDNS/DNS-SD. In your case, I recommend the first option as it is easy to implement, especially in an Arduino type environment. It's basically just a specific response to a network broadcast message.

I hope this helps you decide in which direction to go.
« Last Edit: February 18, 2018, 07:35: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 awallin

  • Frequent Contributor
  • **
  • Posts: 382
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #228 on: February 18, 2018, 07:05:10 pm »
A LXI compatible instrument supports one of the following protocols for communicating SCPI: RAW/TCP, VXI11/TCP, HiSlip/TCP.

You have to decide which communication protocol to go with for your server implementation and then add to that your SCPI parser.

RAW/TCP offers fast communication but is less robust. It is easy to implement as it is just a standard socket TCP server. There are countless examples available online on how to create socket TCP servers.

VXI11/TCP is robust but slow as it introduces a lot of protocol communication overhead. It is more complicated to implement as it is a protocol based on the aging RPC framework. Both VXI11 client and server stubs are defined by this file: https://github.com/lxi-tools/liblxi/blob/master/src/vxi11core.rpcl and then generated into C code using the rpcgen tool: https://linux.die.net/man/1/rpcgen . General guides on how to implement a RPC(gen) server are available, for example: https://docs.oracle.com/cd/E19683-01/816-1435/rpcgenpguide-21470/index.html . However, the specific VXI11 server stub implementation is largely undocumented AFAIK which makes it harder to implement.

Thanks for this explanation. I found this vxi-11 implementation on arduino due:
https://www.bankras.org/projects/electronics/instrument-of-things/
and that code is now here: https://github.com/bankrasrg/colortestkitmeter

I will try to get it working and see how far I get.
If it gets too complicated I guess I will just fall back to simple http control only.

AW
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #229 on: February 19, 2018, 01:01:37 am »
A LXI compatible instrument supports one of the following protocols for communicating SCPI: RAW/TCP, VXI11/TCP, HiSlip/TCP.

You have to decide which communication protocol to go with for your server implementation and then add to that your SCPI parser.

RAW/TCP offers fast communication but is less robust. It is easy to implement as it is just a standard socket TCP server. There are countless examples available online on how to create socket TCP servers.

VXI11/TCP is robust but slow as it introduces a lot of protocol communication overhead. It is more complicated to implement as it is a protocol based on the aging RPC framework. Both VXI11 client and server stubs are defined by this file: https://github.com/lxi-tools/liblxi/blob/master/src/vxi11core.rpcl and then generated into C code using the rpcgen tool: https://linux.die.net/man/1/rpcgen . General guides on how to implement a RPC(gen) server are available, for example: https://docs.oracle.com/cd/E19683-01/816-1435/rpcgenpguide-21470/index.html . However, the specific VXI11 server stub implementation is largely undocumented AFAIK which makes it harder to implement.

Thanks for this explanation. I found this vxi-11 implementation on arduino due:
https://www.bankras.org/projects/electronics/instrument-of-things/
and that code is now here: https://github.com/bankrasrg/colortestkitmeter

I will try to get it working and see how far I get.
If it gets too complicated I guess I will just fall back to simple http control only.

AW

Interesting implementation. Though, it's a shame it is GPLv3.

Good luck.
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
 

Online Karel

  • Super Contributor
  • ***
  • Posts: 1139
  • Country: 00
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #230 on: February 19, 2018, 01:13:57 am »
Though, it's a shame it is GPLv3.

???:palm:
The difference between theory and practice is less in theory than
the difference between theory and practice in practice.
Expensive tools cannot compensate for lack of experience.
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #231 on: February 19, 2018, 01:22:53 am »
Though, it's a shame it is GPLv3.

???:palm:

I would prefer a more permissive license. If you include GPLv3 code in your firmware you are forced to make all your firmware GPLv3.
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
 

Online Karel

  • Super Contributor
  • ***
  • Posts: 1139
  • Country: 00
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #232 on: February 19, 2018, 01:29:07 am »
Though, it's a shame it is GPLv3.

???:palm:

I would prefer a more permissive license. If you include GPLv3 code in your firmware you are forced to make all your firmware GPLv3.

And what's wrong with that? You use my code, I use your code. Sounds fair to me.

You'd prefer that people can take without giving back?? Doesn't sound fair to me.
The difference between theory and practice is less in theory than
the difference between theory and practice in practice.
Expensive tools cannot compensate for lack of experience.
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #233 on: February 19, 2018, 01:35:12 am »
Though, it's a shame it is GPLv3.

???:palm:

I would prefer a more permissive license. If you include GPLv3 code in your firmware you are forced to make all your firmware GPLv3.

And what's wrong with that? You use my code, I use your code. Sounds fair to me.

You'd prefer that people can take without giving back?? Doesn't sound fair to me.

I would prefer people take my code and use it in whatever way they want - if they give back fine, if not fine too. I don't really want to put any restrictions like the GPLv3 does.
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
 

Online Karel

  • Super Contributor
  • ***
  • Posts: 1139
  • Country: 00
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #234 on: February 19, 2018, 01:41:56 am »
I would prefer people take my code and use it in whatever way they want - if they give back fine, if not fine too. I don't really want to put any restrictions like the GPLv3 does.

Why is it a shame if somebody wants  to put restrictions on the use of his software?

According to you it's a shame if people want to sell software, either open or closed source,
either for money or for giving back your code?
The difference between theory and practice is less in theory than
the difference between theory and practice in practice.
Expensive tools cannot compensate for lack of experience.
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #235 on: February 19, 2018, 02:07:18 am »
I would prefer people take my code and use it in whatever way they want - if they give back fine, if not fine too. I don't really want to put any restrictions like the GPLv3 does.

Why is it a shame if somebody wants  to put restrictions on the use of his software?

According to you it's a shame if people want to sell software, either open or closed source,
either for money or for giving back your code?

Thats not what I said at all.

I don't mind people putting restrictions on the open source software they publish. What matters is what kind of restrictions.

I support free choice - with GPLv3 all your firmware code is forced to be GPLv3 - that seems less of a free choice to me.

I don't mind people taking my code and mixing/linking it with their proprietary or other open source licensed software and sell it as a product. If they find it useful they are free to contribute back any fixes or improvements they make and reap the long term maintenance benefits of doing so... or not. That's free choice.
« Last Edit: February 19, 2018, 02:08:53 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
 

Online Karel

  • Super Contributor
  • ***
  • Posts: 1139
  • Country: 00
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #236 on: February 19, 2018, 02:16:01 am »
I would prefer people take my code and use it in whatever way they want - if they give back fine, if not fine too. I don't really want to put any restrictions like the GPLv3 does.

Why is it a shame if somebody wants  to put restrictions on the use of his software?

According to you it's a shame if people want to sell software, either open or closed source,
either for money or for giving back your code?

Thats not what I said at all.

You said: "it's a shame it is GPLv3"
The difference between theory and practice is less in theory than
the difference between theory and practice in practice.
Expensive tools cannot compensate for lack of experience.
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #237 on: February 19, 2018, 02:39:24 am »
I would prefer people take my code and use it in whatever way they want - if they give back fine, if not fine too. I don't really want to put any restrictions like the GPLv3 does.

Why is it a shame if somebody wants  to put restrictions on the use of his software?

According to you it's a shame if people want to sell software, either open or closed source,
either for money or for giving back your code?

Thats not what I said at all.

You said: "it's a shame it is GPLv3"

Yes, exactly. For the reasons I stated.
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
 

Online Karel

  • Super Contributor
  • ***
  • Posts: 1139
  • Country: 00
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #238 on: February 19, 2018, 03:25:28 am »
I would prefer people take my code and use it in whatever way they want - if they give back fine, if not fine too. I don't really want to put any restrictions like the GPLv3 does.

Why is it a shame if somebody wants  to put restrictions on the use of his software?

According to you it's a shame if people want to sell software, either open or closed source,
either for money or for giving back your code?

Thats not what I said at all.

You said: "it's a shame it is GPLv3"

Yes, exactly. For the reasons I stated.

So, you say it's a shame if somebody publishes opensource code under a license that requires you to give back your code.
But isn't it a shame if people only want to take and not to give back?

It's a shame that my baker asks money for his bread. This way I can't take his bread without giving him money. My baker is too restrictive... :palm:


The difference between theory and practice is less in theory than
the difference between theory and practice in practice.
Expensive tools cannot compensate for lack of experience.
 

Offline dpenev

  • Regular Contributor
  • *
  • Posts: 93
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #239 on: February 19, 2018, 04:40:55 am »
Karel,

Why we should be so literal?
Lets thank lundmar for his great work
And let everyone of us has its own opinion about the open source licenses :)
 

Online Karel

  • Super Contributor
  • ***
  • Posts: 1139
  • Country: 00
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #240 on: February 19, 2018, 04:48:40 am »
Karel,

Why we should be so literal?
Lets thank lundmar for his great work
And let everyone of us has its own opinion about the open source licenses :)

Agreed.
The difference between theory and practice is less in theory than
the difference between theory and practice in practice.
Expensive tools cannot compensate for lack of experience.
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #241 on: February 19, 2018, 08:17:38 am »
I would prefer people take my code and use it in whatever way they want - if they give back fine, if not fine too. I don't really want to put any restrictions like the GPLv3 does.

Why is it a shame if somebody wants  to put restrictions on the use of his software?

According to you it's a shame if people want to sell software, either open or closed source,
either for money or for giving back your code?

Thats not what I said at all.

You said: "it's a shame it is GPLv3"

Yes, exactly. For the reasons I stated.

So, you say it's a shame if somebody publishes opensource code under a license that requires you to give back your code.
But isn't it a shame if people only want to take and not to give back?

It's a shame that my baker asks money for his bread. This way I can't take his bread without giving him money. My baker is too restrictive... :palm:

Karel, I'm a big proponent of open source software and I suspect we can agree on most things open source.

However, to understand why I think it is a shame that this particular code is licensed under GPLv3 you have to understand the subtle but important differences between the various open source licenses and in particular what makes GPLv3 problematic in this case.

I don't want to use your baker analogy because well, analogies like that are not precise nor well translated.

Imagine instead that an instrument manufacturer is creating a new advanced instrument and have invested 10 man years or more of engineering work into implementing its micro-controller firmware. Now, if the manufacturer wants to use this specific GPLv3 VXI11 implementation to add a VXI11 feature to the instrument, that means the manufacturer would also be forced to release all firmware code under the same GPLv3 license basically inviting competing instrument manufacturers to simply take/steal the entire firmware work when the product is released. This is clearly a futile way for an instrument manufacturer to make money.

Instead, if the same VXI11 implementation is released under a more permissive license such as a BSD type license or even LGPLv2 then the instrument manufacturer is free to use the VXI11 implementation without compromising the rest of the heavily invested firmware. This way the instrument manufacturer might end up actually using and improving the open source VXI11 implementation and, in case of LGPLv2, be obligated to give back those improvements and, in case of a BSD type license, not be obligated to give back but might feel inclined to do so anyway simply to avoid self maintaining any improvements long term. Also, optimistically, if the instrument manufacturer can't use the GPLv3 VXI11 implementation the manufacturer might start their own VXI11 open source project instead of contributing to the original project and that would ultimately result in a waste of community resources.

Open source licensing is complicated and one has to choose carefully which license to use to maximize the use and success of any open source project.

I don't want to turn this into a big GPLv3 discussion thread but I'm not alone in expressing my concerns with GPLv3 - there are valid reasons why the BSD people dislike GPL and also why Linus Torvalds continue to license the Linux kernel under GPLv2 instead of GPLv3.

Anyway, I hope it is now clear to everyone why I think it is a shame this particular open source VXI11 code is licensed under GPLv3 instead of a more permissive open source license. Hence my original statement.
« Last Edit: February 19, 2018, 10:16:06 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
 
The following users thanked this post: Gabri74

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #242 on: February 20, 2018, 10:51:45 am »
It is possible to add an instrument UI feature to lxi-gui.

Here is a couple of mockups:





When a supported instrument is chosen in the instrument list the corresponding instrument UI could be loaded.

All buttons could be made pushable and the dials rotate able (perhaps easily by using QT Quick/QML).

Also, the Instrument UI could be combined with the live view feature or a digit generator to offer full control and feedback.

I'm just putting the idea out there since I won't have any time myself to implement this. However, lxi-gui and QT5 provides the basic framework and includes the bits and pieces that makes it possible to add such feature.

Maybe someone would like to jump this idea and take a shot a implementing it.

Hoping there is a QT5 buff out there who would like to get involved :)
« Last Edit: February 20, 2018, 10:59:52 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 Hydron

  • Regular Contributor
  • *
  • Posts: 201
  • Country: gb
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #243 on: February 20, 2018, 09:19:23 pm »
To go with the above post, here is an example of the web UI of the RTB2004, which I'm guessing is the sort of thing that lundmar is getting to:
(note that the mouse was hovering over the horizontal scale knob when I captured this - see the arrows that come up)
Unfortunately implementing this isn't something I can do either (in this case due to lack of skill rather than time, though time is lacking as well!)
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #244 on: February 21, 2018, 03:57:41 am »
To go with the above post, here is an example of the web UI of the RTB2004, which I'm guessing is the sort of thing that lundmar is getting to:
(note that the mouse was hovering over the horizontal scale knob when I captured this - see the arrows that come up)
Unfortunately implementing this isn't something I can do either (in this case due to lack of skill rather than time, though time is lacking as well!)

Thats one of the best examples and exactly what I'm inspired by but instead of a web page it will be a plugin in lxi-gui. Such instrument UI feature could be convenient and useful, in particular for instruments that has no web page like that or maybe the instrument web page is no good.

Though, it's a lot of work but it could be done.
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 ralphrmartin

  • Regular Contributor
  • *
  • Posts: 224
  • Country: gb
    • Work website
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #245 on: February 21, 2018, 05:48:07 am »
To be honest, I don't see the point of front panel emulators. If I want to use the instruments front panel, I dont need a computer.

What would be much more useful in my view would be some way of writing simple scripts so I can do something like this

For V = 0 to 3.3 step 0.1
Set the power supply output to V
Tell the meter to read the current I
Save V, I to file
End for

Surely such automation is the real use of LXI, not just having a remote front panel?
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #246 on: February 21, 2018, 07:02:14 am »
To be honest, I don't see the point of front panel emulators. If I want to use the instruments front panel, I dont need a computer.

What would be much more useful in my view would be some way of writing simple scripts so I can do something like this

For V = 0 to 3.3 step 0.1
Set the power supply output to V
Tell the meter to read the current I
Save V, I to file
End for

Surely such automation is the real use of LXI, not just having a remote front panel?

I think it is safe to say that people have different needs - for some such a remote front panel might be useful.

In my case, I actually have all of my instruments installed in a lab room separate from my office room in which I spend most of my work time. It's really nice to not have to listen to the accumulated loud noise that most instruments generate and if I just need to quick tweak an instrument I believe such remote feature could be convenient.

That being said, my current development priorities are adding support for HiSlip and eventually Lua scripting to support exactly what you describe.

I'm just putting the instrument UI idea out there in case someone think it is a good idea and would like to take a crack at it :)

« Last Edit: February 21, 2018, 08:35:07 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
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #247 on: February 24, 2018, 02:10:01 am »
FYI - the snapcraft folks have accepted my request for automatic alias of lxi-gui.

This means, to start the lxi-tools GUI application, you can now use the shorter straightforward alias 'lxi-gui' instead of 'lxi-tools.lxi-gui'

The new alias should be available automatically or when installing the snap.
« Last Edit: February 24, 2018, 02:50:46 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 gsocker

  • Contributor
  • Posts: 11
  • Country: us
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #248 on: March 05, 2018, 07:01:12 am »
Just tested the HMO/RTB screenshot plugin with some other R&S/Hameg instruments.
HMC8043 power supply: works, autodetects correct plugin.
HMC8012 DMM: works, does not autodetect plugin as IDN string returned starts with "HAMEG", not "Rohde & Schwarz", even though the branding is R&S otherwise. First part of returned string is "HAMEG,HMC8012".
HMO3054: works, same issue as HMC8012: IDN string contains HAMEG, not R&S.

« Last Edit: March 05, 2018, 07:05:19 am by gsocker »
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #249 on: March 05, 2018, 07:20:42 am »
Just tested the HMO/RTB screenshot plugin with some other R&S/Hameg instruments.
HMC8043 power supply: works, autodetects correct plugin.
HMC8012 DMM: works, does not autodetect plugin as IDN string returned starts with "HAMEG", not "Rohde & Schwarz", even though the branding is R&S otherwise. First part of returned string is "HAMEG,HMC8012".
HMO3054: works, same issue as HMC8012: IDN string contains HAMEG, not R&S.

Great, thanks for testing  :-+

I've fixed the plugin so it should detect your instruments correctly.

R&S bought Hameg right?

I don't expect we will see any new instruments from R&S with Hameg identifier?
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 gsocker

  • Contributor
  • Posts: 11
  • Country: us
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #250 on: March 05, 2018, 08:09:10 am »
Yes, R&S brought Hameg - back around 2005/6 I think. Mine were bought around the time they were switching things over to R&S branding - the HMO3054 is branded as "R&S/Hameg".

The PS and and DMM were bought later and have have R&S branding, which is why it's a bit weird that the DMM id string still returns "Hameg" instead of R&S. However, I doubt any future instruments will return "Hameg" as the manufacturer.
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #251 on: March 05, 2018, 08:28:02 am »
Yes, R&S brought Hameg - back around 2005/6 I think. Mine were bought around the time they were switching things over to R&S branding - the HMO3054 is branded as "R&S/Hameg".

The PS and and DMM were bought later and have have R&S branding, which is why it's a bit weird that the DMM id string still returns "Hameg" instead of R&S. However, I doubt any future instruments will return "Hameg" as the manufacturer.

Ok.

I've updated the list of tested instruments and added you to our list of contributors as a thank you for testing.
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
 

Online tautech

  • Super Contributor
  • ***
  • Posts: 11105
  • Country: nz
    • Taupaki Technologies Ltd.
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #252 on: March 05, 2018, 08:34:58 am »
lundmar
I've been following this for some time and I'd like to offer my sincere thanks for your efforts in supporting a wide range of Siglent products.  :-+
AFAIK there'll be a couple more for you to check later on this year.
Avid Rabid Hobbyist & NZ Siglent Distributor
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #253 on: March 05, 2018, 09:27:34 am »
lundmar
I've been following this for some time and I'd like to offer my sincere thanks for your efforts in supporting a wide range of Siglent products.  :-+
AFAIK there'll be a couple more for you to check later on this year.

tautech, thank you very much :)

Siglent has been very helpful making it possible for me to add full support for their LXI compatible instruments :-+

I'm very happy to see instrument manufacturers like Siglent put their support behind the open source lxi-tools project. In fact, I'm hoping more instrument manufacturers will do the same. The end goal is to make available free high quality open source instrument software tools which make it easy for users to manage their instruments remotely without having to concern themselves with costly proprietary software which may or may not bring much value.

I hope Siglent will continue to support the lxi-tools project and I'll be looking forward to add support for more of their instruments in the future.
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
 
The following users thanked this post: bmdaly

Offline gsocker

  • Contributor
  • Posts: 11
  • Country: us
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #254 on: March 05, 2018, 09:34:41 am »

Ok.

I've updated the list of tested instruments and added you to our list of contributors as a thank you for testing.

One note - the HMO 3054 is not discoverable via "lxi discover" and does not claim LXI support.
 It also doesn't support VXI-11; it is raw sockets only, defaulting to port 5025. Commands and the screenshots work fine.
The HMC8043/HMC8012 are discoverable if the -m option is used.
 

Online tautech

  • Super Contributor
  • ***
  • Posts: 11105
  • Country: nz
    • Taupaki Technologies Ltd.