Open source lxi-tools and liblxi v1.0 released for GNU/Linux - Page 1
Forum section: electronics / testgear

author: lundmar
author_rank: Frequent Contributor
timestamp: October 07, 2017, 05:51:10 pm
content: Hi,I have released lxi-tools for GNU/Linux - seehttps://lxi-tools.github.ioThe 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 seehttps://github.com/lxi-tools/lxi-toolsInstallation:Latest lxi-tools:lxi-tools-1.21.tar.xz(Changes,GitHub)Latest liblxi:liblxi-1.13.tar.xz(Changes,GitHub)Install latest stable version using snap:$ snap install lxi-toolsInstall latest development version using snap:$ snap install lxi-tools --edgeSupported snap architectures: amd64, i386, armhfVisithttps://snapcraft.ioto see how to install snap for your distribution.If you are a Windows user you can install e.g. Virtualbox (seehttps://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 itTested instruments:The lxi commandline tool included in lxi-tools is tested to work successfully with the following instruments:InstrumentWorking featuresKeysight 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-SDAdd HiSlip/TCP supportAdd a modern QT GUI app with features from commandline toolAdd support for advanced scripting in LuaAdd 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, seehttps://github.com/lxi-tools/lxi-tools/blob/master/src/plugins/screenshot_rigol-1000z.cwhich 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: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-devmkdir lxi && cd lxigit clone https://github.com/lxi-tools/liblxi && cd liblxi./autogen.sh./configure --prefix=$HOME/opt/lximake installcd ..git clone https://github.com/lxi-tools/lxi-tools && cd lxi-tools./autogen.sh./configure --prefix=$HOME/opt/lxi LDFLAGS=-L$HOME/opt/lxi/libmake CFLAGS=-I$HOME/opt/lxi/include installcd ..export PATH=$HOME/opt/lxi/bin:$PATH

author: HoracioDos
author_rank: Frequent Contributor
timestamp: October 07, 2017, 08:51:23 pm
content: I've opened an issue for lxi-tools. Perhaps I'm messing things up when compiling

author: lundmar
author_rank: Frequent Contributor
timestamp: October 07, 2017, 11:11:21 pm
content: Quote from: HoracioDos on October 07, 2017, 08:51:23 pmNope - 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 athttp://lxi-tools.github.io

author: lundmar
author_rank: Frequent Contributor
timestamp: October 17, 2017, 01:53:47 pm
content: New versions of lxi-tools and liblxi are available athttp://lxi-tools.github.ioThey include some important bug fixes that resolves issues with some instruments not responding.

author: awallin
author_rank: Frequent Contributor
timestamp: October 17, 2017, 04:56:12 pm
content: 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-vxi11thanks,Anders

author: lundmar
author_rank: Frequent Contributor
timestamp: October 17, 2017, 08:27:10 pm
content: Quote from: awallin on October 17, 2017, 04:56:12 pmNot 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.Quote from: awallin on October 17, 2017, 04:56:12 pmIt'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.

author: lundmar
author_rank: Frequent Contributor
timestamp: October 26, 2017, 03:25:18 pm
content: New versions of lxi-tools and liblxi are available athttps://lxi-tools.github.ioUpdates 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.

author: lundmar
author_rank: Frequent Contributor
timestamp: October 28, 2017, 06:12:00 am
content: A new version of lxi-tools has been released - seehttps://github.com/lxi-tools/lxi-toolsThe screenshot feature has now become a subcommand of the lxi tool instead of the separate tool rigol_1000z_screenshot.Code:Usage: lxi [--version] [--help] <command> [<args>]-v, --version Display version-h, --help Display helpCommands:discover [<options>] Search for LXI devicesscpi [<options>] <scpi-command> Send SCPI commandscreenshot [<options>] <filename> Capture screenshot to fileDiscover 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 fileScreenshot 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 modelsCode:EXAMPLESSend 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.pngAlso 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.

author: RoGeorge
author_rank: Super Contributor
timestamp: October 29, 2017, 07:29:36 pm
content: 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:rogeorge@debian80:~$ lxi scpi -a 192.168.1.3 *IDN?RIGOL TECHNOLOGIES,DS1104Z,DS1ZA16*,00.04.04.SP3rogeorge@debian80:~$ lxi scpi -a 192.168.1.4 *IDN?RIGOL TECHNOLOGIES,DP832,DP8C16*,00.01.11rogeorge@debian80:~$ lxi scpi -a 192.168.1.5 *IDN?Rigol Technologies,DG4102,DG4E17*,00.01.12rogeorge@debian80:~$ lxi discoverSearching for LXI devices - please wait...Broadcasting on interface loBroadcasting on interface eth0No devices foundrogeorge@debian80:~$ ip a1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group defaultlink/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00inet 127.0.0.1/8 scope host lovalid_lft forever preferred_lft foreverinet6 ::1/128 scope hostvalid_lft forever preferred_lft forever2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000link/ether 00:0c:29:*:*:* brd ff:ff:ff:ff:ff:ffinet 192.168.146.134/24 brd 192.168.146.255 scope global dynamic eth0valid_lft 1711sec preferred_lft 1711secinet6 fe80::20c:*:*:*/64 scope linkvalid_lft forever preferred_lft foreverrogeorge@debian80:~$

author: lundmar
author_rank: Frequent Contributor
timestamp: October 29, 2017, 08:05:24 pm
content: Quote from: RoGeorge on October 29, 2017, 07:29:36 pmThats 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

author: lundmar
author_rank: Frequent Contributor
timestamp: October 30, 2017, 07:03:58 pm
content: I've added screenshot support for more instruments:Code:$ lxi screenshot --listName Descriptionkeysight-iv2000x Keysight InfiniVision 2000 X series oscilloscopes (experimental)rigol Rigol 1000z/2000/4000 series oscilloscopesrs-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 accurateExample:Code:lxi screenshot --adress 192.168.0.40 --model rigol screenhot.pngSaved PNG screenshot image to screenhot.png

author: RoGeorge
author_rank: Super Contributor
timestamp: October 30, 2017, 07:27:58 pm
content: 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?

author: lundmar
author_rank: Frequent Contributor
timestamp: October 30, 2017, 08:48:27 pm
content: Quote from: RoGeorge on October 30, 2017, 07:27:58 pmI 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".Quote from: RoGeorge on October 30, 2017, 07:27:58 pmThe 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.Quote from: RoGeorge on October 30, 2017, 07:27:58 pmI 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**Quote from: RoGeorge on October 30, 2017, 07:27:58 pmSure, 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.

author: lundmar
author_rank: Frequent Contributor
timestamp: November 01, 2017, 08:13:34 pm
content: FYI - I've added raw/TCP support for sending commands:Code:lxi scpi --raw --address 192.168.0.42 "*IDN?"RIGOL TECHNOLOGIES,DS1104Z,DS1ZA1234567890,00.04.04.SP3It 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.

author: lundmar
author_rank: Frequent Contributor
timestamp: November 01, 2017, 10:06:47 pm
content: Quote from: RoGeorge on October 30, 2017, 07:27:58 pmPlease, if you can don't hesitate to test the lxi tool with any LXI/LAN enabled instrument you haveI'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.

author: RoGeorge
author_rank: Super Contributor
timestamp: November 02, 2017, 01:22:50 am
content: I can test DG4102 screenshot when I'll return home, maybe next Monday or Tuesday.

author: rhb
author_rank: Super Contributor
timestamp: November 04, 2017, 09:19:31 pm
content: FYIliblxi fails in ./configure because it can't find ifaddrs.h on Solaris 10 u8lxi-tools fails in ./configure because it can't find libreadline even though liibreadline is in /app/lib and /app/lib is in LD_LIBRARY_PATHFWIW 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.

author: lundmar
author_rank: Frequent Contributor
timestamp: November 04, 2017, 11:17:37 pm
content: Quote from: rhb on November 04, 2017, 09:19:31 pmI'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.

author: rhb
author_rank: Super Contributor
timestamp: November 05, 2017, 01:33:20 am
content: 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."

author: lundmar
author_rank: Frequent Contributor
timestamp: November 05, 2017, 03:15:27 am
content: Quote from: rhb on November 05, 2017, 01:33:20 amI'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 ofhttps://lxi-tools.github.ioand 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.

author: RoGeorge
author_rank: Super Contributor
timestamp: November 06, 2017, 04:04:32 pm
content: Made a new build today and testing right now, so brace yourself for a lot ofand, but no, even if you fully deserve all the appreciation.Whilemy 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.

author: rhb
author_rank: Super Contributor
timestamp: November 06, 2017, 05:10:30 pm
content: Quote from: lundmar on November 05, 2017, 03:15:27 amOther than not being portable to non-Gnu/Linux systems, I don't see what this doesQuotethat can't be done with this from POSIX.1 aka IEEE Std 1003.1 2004QuoteIt 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.

author: RoGeorge
author_rank: Super Contributor
timestamp: November 06, 2017, 05:40:00 pm
content: 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:cd ~mkdir lxi-toolscd lxi-tools/git clone https://github.com/lxi/liblxicd liblxi/suapt-get updateapt-get install automakeapt-get install autogen autoconf libtool./autogen.sh./configuremakemake installcd ..git clone https://github.com/lxi/lxi-toolscd lxi-tools/./autogen.shapt-get install libreadline-dev./configuremakemake installexitcd ..# not required any more ???# export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib"lxiTest setupDebian 8 running inside VMware 12 Player running inside Windows 10Three LXI instruments are connected to LAN:192.168.1.3 is a Rigol DS1054Z oscilloscope192.168.1.4 is a Rigol DP832 power supply192.168.1.5 is a Rigol DG4102 arbitrary waveform generatorTested commands1.Code:rogeorge@debian80:~/lxi-tools$ lxiUsage: lxi [--version] [--help] <command> [<args>]-v, --version Display version-h, --help Display helpCommands:discover [<options>] Search for LXI devicesscpi [<options>] <scpi-command> Send SCPI commandscreenshot [<options>] [<filename>] Capture screenshotDiscover 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 modelsrogeorge@debian80:~/lxi-tools$Passed2.Code:rogeorge@debian80:~/lxi-tools$ lxi --versionlxi v1.6rogeorge@debian80:~/lxi-tools$ lxi -vlxi v1.6rogeorge@debian80:~/lxi-tools$ lxi -hUsage: lxi [--version] [--help] <command> [<args>]-v, --version Display version-h, --help Display helpCommands:discover [<options>] Search for LXI devicesscpi [<options>] <scpi-command> Send SCPI commandscreenshot [<options>] [<filename>] Capture screenshotDiscover 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 modelsrogeorge@debian80:~/lxi-tools$ lxi --helpUsage: lxi [--version] [--help] <command> [<args>]-v, --version Display version-h, --help Display helpCommands:discover [<options>] Search for LXI devicesscpi [<options>] <scpi-command> Send SCPI commandscreenshot [<options>] [<filename>] Capture screenshotDiscover 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 modelsrogeorge@debian80:~/lxi-tools$Failed - CosmeticHelp 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:rogeorge@debian80:~/lxi-tools$ lxi discoverSearching for LXI devices - please wait...Broadcasting on interface loBroadcasting on interface eth0Found "RIGOL TECHNOLOGIES,DS1104Z,DS1ZA16*,00.04.04.SP3" on address 192.168.1.3Found "Rigol Technologies,DG4102,DG4E17*,00.01.124.SP3" on address 192.168.1.5Found "RIGOL TECHNOLOGIES,DP832,DP8C16*,00.01.114.SP3" on address 192.168.1.4Found 3 devicesrogeorge@debian80:~/lxi-tools$Failed - Major inconvenienceLeftovers 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:rogeorge@debian80:~/lxi-tools$ lxi scpi -a 192.168.1.5 *IDN?Rigol Technologies,DG4102,DG4E17*,00.01.12rogeorge@debian80:~/lxi-tools$ lxi scpi -a 192.168.1.4 *IDN?RIGOL TECHNOLOGIES,DP832,DP8C16*,00.01.11rogeorge@debian80:~/lxi-tools$

author: RoGeorge
author_rank: Super Contributor
timestamp: November 06, 2017, 05:52:49 pm
content: 4.Code:rogeorge@debian80:~/lxi-tools$ lxi discoveryError: No IP address specifiedrogeorge@debian80:~/lxi-tools$Failed - Minor inconvenienceMisleading error message. There is a typo in the command name, "discovery" instead of "discover", not a missing IP.

author: glarsson
author_rank: Frequent Contributor
timestamp: November 06, 2017, 06:08:01 pm
content: Quote from: rhb on November 06, 2017, 05:10:30 pmAgree 100%. A common way to write code for Linux is to grep /usr/include until you find something.

author: RoGeorge
author_rank: Super Contributor
timestamp: November 06, 2017, 06:12:14 pm
content: 5.Code:rogeorge@debian80:~/lxi-tools$ lxi scpi -r -a 192.168.1.3 "CHAN1:DISP?"1rogeorge@debian80:~/lxi-tools$ lxi scpi -a 192.168.1.3 "CHAN1:DISP?"1rogeorge@debian80:~/lxi-tools$ lxi scpi -a 192.168.1.3 -r "CHAN1:DISP?"1rogeorge@debian80:~/lxi-tools$ lxi scpi -ra 192.168.1.3 "CHAN1:DISP?"1rogeorge@debian80:~/lxi-tools$ lxi scpi -ra 192.168.1.3 "CHAN1 DISP?"Command errorrogeorge@debian80:~/lxi-tools$ lxi scpi -a 192.168.1.3 "CHAN1 DISP?"Error: Read error (timeout)Error: Failed to receive messagerogeorge@debian80:~/lxi-tools$Passed

author: RoGeorge
author_rank: Super Contributor
timestamp: November 06, 2017, 06:28:09 pm
content: 6.Code:rogeorge@debian80:~/lxi-tools$ lxi screenshotError: Missing addressrogeorge@debian80:~/lxi-tools$ lxi screenshot -a 192.168.1.3Error: Missing modelrogeorge@debian80:~/lxi-tools$ lxi screenshot -a 192.168.1.3 -m rigolSaved screenshot image to screenshot-000.pngrogeorge@debian80:~/lxi-tools$ lxi screenshot -a 192.168.1.3 -m rigol -f DS1Z_SCR.pnglxi: invalid option -- 'f'PassedFeature request 6.1. - add an option to specify the filenameFeature 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 filenameFeature 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

author: lundmar
author_rank: Frequent Contributor
timestamp: November 06, 2017, 08:22:44 pm
content: Quote from: RoGeorge on November 06, 2017, 04:04:32 pmThanks.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 testI only have a single LXI instrument to test with4. To be fixed.Update: FIXED5. 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 autocompletionTry e.g. 'source <prefix>/share/bash-completion/completions/lxi' to load completionmanually.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 defaultUpdate: FIXED6.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.

author: lundmar
author_rank: Frequent Contributor
timestamp: November 06, 2017, 08:25:56 pm
content: Quote from: glarsson on November 06, 2017, 06:08:01 pmI 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.

author: glarsson
author_rank: Frequent Contributor
timestamp: November 06, 2017, 09:08:34 pm
content: Quote from: lundmar on November 06, 2017, 08:25:56 pmTrue, but the non-portable code can be located in separate files to make it easier to port to different platforms.Quote from: lundmar on November 06, 2017, 08:25:56 pmI 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.

author: lundmar
author_rank: Frequent Contributor
timestamp: November 06, 2017, 09:57:35 pm
content: Quote from: glarsson on November 06, 2017, 09:08:34 pmTrue, especially if there is a lot of it. Conditional ifdefs will do fine for smaller code bits, which is the case here.Quote from: glarsson on November 06, 2017, 09:08:34 pmAny 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

author: lundmar
author_rank: Frequent Contributor
timestamp: November 07, 2017, 12:02:56 am
content: Quote from: rhb on November 06, 2017, 05:10:30 pmvxi11_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. Seehttps://github.com/lxi/liblxifor latest.

author: rhb
author_rank: Super Contributor
timestamp: November 07, 2017, 01:45:07 am
content: 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!

author: lundmar
author_rank: Frequent Contributor
timestamp: November 07, 2017, 02:26:15 am
content: Quote from: rhb on November 07, 2017, 01:45:07 amSounds goodSorry, 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).Quote from: rhb on November 07, 2017, 01:45:07 amYes, 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.Quote from: rhb on November 07, 2017, 01:45:07 amWell, I guess you earned your right to be grumpyPlease 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.

author: lundmar
author_rank: Frequent Contributor
timestamp: November 07, 2017, 06:41:29 pm
content: There have been lots of changes and bug fixes recently so I'm pushing new releases which are available for download athttps://lxi.github.ioFor a summary of changes see:https://github.com/lxi/lxi-tools/releases/tag/v1.6https://github.com/lxi/liblxi/releases/tag/v1.4

author: lundmar
author_rank: Frequent Contributor
timestamp: November 08, 2017, 12:23:37 pm
content: Quote from: RoGeorge on November 06, 2017, 05:40:00 pmQuestion, 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.

author: dpenev
author_rank: Regular Contributor
timestamp: November 08, 2017, 10:08:39 pm
content: Hello,I built lxi-tools from git. I get the following error.What can be wrong?dpenev@yni:~/lxi-tools/lxi-tools$ lxi discoverSearching for LXI devices - please wait...Broadcasting on interface loBroadcasting on interface eth0Found "RIGOL TECHNOLOGIES,DS2302,DS2XXXXXXXXXXXXX,00.03.05.SP3" on address 192.168.1.59Found 1 devicedpenev@yni:~/lxi-tools/lxi-tools$ lxi screenshot -a 192.168.1.59 -m rigolError: Read error (timeout)Error: Failed to receive messageThanksDimitar

author: lundmar
author_rank: Frequent Contributor
timestamp: November 08, 2017, 11:07:30 pm
content: Quote from: dpenev on November 08, 2017, 10:08:39 pmThanks 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.

author: dpenev
author_rank: Regular Contributor
timestamp: November 09, 2017, 08:39:41 am
content: Hi Lundmar,Thank you for the fast updatelxi screenshot -a 192.168.1.59 -m rigol-2000 #Works fine nowI have following extra questions. Not sure which are important taking the current development plan in mind1. Can there be a option for png instead of bmp? png are smaller.2. The following doesn't workdpenev@yni:~$ lxi scpi -ra 192.168.1.59 -m rigol-2000 "CHAN1 DISP?"lxi: invalid option -- 'm'dpenev@yni:~$ lxi scpi -ra 192.168.1.59 "CHAN1 DISP?"Error: TimeoutError: Failed to receive messageCan I send scpi commands to my DS20003. 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 sampleslxi 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 ...ThanksDimitar

author: lundmar
author_rank: Frequent Contributor
timestamp: November 09, 2017, 10:55:11 am
content: Quote from: dpenev on November 09, 2017, 08:39:41 amThe 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.Quote from: dpenev on November 09, 2017, 08:39:41 amCorrect. 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.Quote from: dpenev on November 09, 2017, 08:39:41 amYes, 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).Quote from: dpenev on November 09, 2017, 08:39:41 amIf 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 listeningQuote from: dpenev on November 09, 2017, 08:39:41 amI 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.Quote from: dpenev on November 09, 2017, 08:39:41 amPlease 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.Quote from: dpenev on November 09, 2017, 08:39:41 amThank 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

author: borjam
author_rank: Unknown
timestamp: November 09, 2017, 11:12:53 am
content: Quote from: rhb on November 06, 2017, 05:10:30 pm(Warning, @Ludmar,not criticizing youalthough 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:#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 Ifind 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 *BSDderived 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 generalisticto 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 andI 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 knowthat 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.

author: lundmar
author_rank: Frequent Contributor
timestamp: November 09, 2017, 12:14:39 pm
content: Quote from: borjam on November 09, 2017, 11:12:53 amI don't want tobut 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

author: HoracioDos
author_rank: Frequent Contributor
timestamp: November 09, 2017, 12:51:51 pm
content: 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!

author: lundmar
author_rank: Frequent Contributor
timestamp: November 09, 2017, 01:13:49 pm
content: Quote from: HoracioDos on November 09, 2017, 12:51:51 pmHa ha, well - I'm glad you like tioIt's just a small no-nonsense serial tty tool with a simplified interface and a few useful features. Less is more.

author: borjam
author_rank: Unknown
timestamp: November 09, 2017, 01:23:36 pm
content: Quote from: lundmar on November 09, 2017, 01:13:49 pmSpeaking of what I might feel inclined to send a bottle of Spanish red wine northwards

author: lundmar
author_rank: Frequent Contributor
timestamp: November 09, 2017, 01:32:19 pm
content: Quote from: borjam on November 09, 2017, 01:23:36 pmGuys 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

author: dpenev
author_rank: Regular Contributor
timestamp: November 09, 2017, 07:11:58 pm
content: Quote from: lundmar on November 09, 2017, 10:55:11 amI have tested the rigol_2000_png branch. It produce file with png extension but it is actually a bit map, same size, BMP header.Quote from: lundmar on November 09, 2017, 10:55:11 amYes without -r I seems to get better results, thank you.Quote from: lundmar on November 09, 2017, 10:55:11 amThe Siglent SSA3000 programing manual is athttp://www.siglentamerica.com/USA_website_2014/Documents/Program_Material/SSA3000X_ProgrammingGuide_PG0703X_E03D.pdfSome results below which probably answers some of the questions you have defined ?dpenev@yni:~/lxi-tools$ lxi scpi -a 192.168.1.61 "*IDN?"Siglent Technologies,SSA3032X,SSA3XXXXXXXXXXXXX,1.2.8.5adpenev@yni:~/lxi-tools$ lxi scpi -a 192.168.1.61 ":SYSTem:TIME?"024429dpenev@yni:~/lxi-tools$ lxi scpi -a 192.168.1.61 ":SYSTem:DATE?"20171110dpenev@yni:~/lxi-tools$ lxi scpi -a 192.168.1.61 "FREQuency:STAR?"+1.2560000000E+07dpenev@yni:~/lxi-tools$ lxi scpi -a 192.168.1.61 "FREQuency:STOP?"+2.2560000000E+07dpenev@yni:~/lxi-tools$ lxi scpi -a 192.168.1.61 ":MMEMory:STORe"dpenev@yni:~/lxi-tools$ lxi screenshot -a 192.168.1.61Error: Missing modeldpenev@yni:~/lxi-tools$ lxi screenshot -a 192.168.1.61 -m rigol-2000Error: Failed to receive messagedpenev@yni:~/lxi-tools$ lxi screenshot -a 192.168.1.61 -m rigol-1000Error: Failed to receive messagedpenev@yni:~/lxi-tools$It seems ":MMEMory:STORe" can capture the screen but not sure if the data can be retreated remotely.Quote from: lundmar on November 09, 2017, 10:55:11 amI seeQuote from: lundmar on November 09, 2017, 10:55:11 amI seeThank youDimitar

author: lundmar
author_rank: Frequent Contributor
timestamp: November 09, 2017, 07:53:05 pm
content: Quote from: dpenev on November 09, 2017, 07:11:58 pmOk. Then it does not look like it is possible to download a PNG screenshot. BMP will have to do for the 2000 series.Quote from: dpenev on November 09, 2017, 07:11:58 pmI 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.

author: dpenev
author_rank: Regular Contributor
timestamp: November 09, 2017, 08:14:14 pm
content: Indeed,BTW did you get some useful information from silentna about screen capture from their oscilloscopes?ThanksDimitar

author: lundmar
author_rank: Frequent Contributor
timestamp: November 09, 2017, 08:19:44 pm
content: Quote from: dpenev on November 09, 2017, 08:14:14 pmNo 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.

author: lundmar
author_rank: Frequent Contributor
timestamp: November 10, 2017, 02:03:38 pm
content: Quote from: RoGeorge on November 06, 2017, 06:28:09 pmThanks for this good idea feature request. I've implemented it inhttps://github.com/lxi/lxi-tools/commit/4b07a40e1c07afb099b0842a34e1f01e8031b462This means that the lxi tool can now be used like this:Code:$ lxi screenshot --address 192.168.1.210Loaded rigol-1000 screenshot pluginSaved screenshot image to screenshot_192.168.1.210_2017-11-10_16:07:48.pngThe 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:$ lxi screenshot --address 192.168.1.210 --plugin rigol-1000Saved screenshot image to screenshot_192.168.1.210_2017-11-10_16:08:36.pngQuote from: RoGeorge on November 06, 2017, 06:28:09 pmI've implemented a compromise solution inhttps://github.com/lxi/lxi-tools/commit/080681f7af460b47c24ad09f46809fa65c5cb687Trying 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.

author: lundmar
author_rank: Frequent Contributor
timestamp: November 11, 2017, 02:16:10 pm
content: 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.xzFor a summary of changes please see:https://github.com/lxi/lxi-tools/releases/tag/v1.7Thanks 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.

author: lundmar
author_rank: Frequent Contributor
timestamp: November 12, 2017, 02:32:10 pm
content: I've refined and added some more information to the original post that started this thread. People might find it useful information.

author: dpenev
author_rank: Regular Contributor
timestamp: November 13, 2017, 09:18:39 pm
content: 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" commandand telnet to download the file.I hope Siglent will implement a way to transfer a file using scpi command so this script will become unnecessaryextract the two scripts from the tar in a directoryfrom this directory executeCode:./ssa3000x_print print.pngNote 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.ThanksDimitar

author: lundmar
author_rank: Frequent Contributor
timestamp: November 13, 2017, 10:01:15 pm
content: Quote from: dpenev on November 13, 2017, 09:18:39 pmI 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 thereYou 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.

author: lundmar
author_rank: Frequent Contributor
timestamp: November 14, 2017, 11:45:56 am
content: 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.8It'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.

author: lundmar
author_rank: Frequent Contributor
timestamp: November 15, 2017, 11:26:45 pm
content: Quote from: dpenev on November 09, 2017, 08:39:41 amUpdate: 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.

author: dpenev
author_rank: Regular Contributor
timestamp: November 18, 2017, 03:58:07 pm
content: 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.

author: lundmar
author_rank: Frequent Contributor
timestamp: November 18, 2017, 04:09:59 pm
content: Quote from: dpenev on November 18, 2017, 03:58:07 pmYou 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.

author: dpenev
author_rank: Regular Contributor
timestamp: November 18, 2017, 04:24:41 pm
content: HelloStill the following doesn't worklxi screenshot -a 192.168.1.61 -p siglent-ssa3000x /share/scr3.pngI am sending you the file I getat my sidelxi discoverSearching for LXI devices - please wait...Broadcasting on interface loBroadcasting on interface eth0Found "Siglent Technologies,SSA3032X,SSA3XXXXXXXXXX,1.2.8.5a" on address 192.168.1.61Found 1 device

author: lundmar
author_rank: Frequent Contributor
timestamp: November 18, 2017, 04:45:23 pm
content: Quote from: dpenev on November 18, 2017, 04:24:41 pmHmm, 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.Quote from: dpenev on November 18, 2017, 04:24:41 pmOh 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

author: lundmar
author_rank: Frequent Contributor
timestamp: November 18, 2017, 09:09:43 pm
content: 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:$ lxi discover --mdns

author: dpenev
author_rank: Regular Contributor
timestamp: November 18, 2017, 10:57:34 pm
content: Hi LundmarWith the latest liblxi and lxi-tools I get:root@yni:/home/dpenev/lxi-tools/lxi-tools# lxi discover --mdnslxi: unrecognized option '--mdns'root@yni:/home/dpenev/lxi-tools/lxi-tools# lxi discoverSearching for LXI devices - please wait...Error: Unknown discover type (532306400)No devices foundroot@yni:/home/dpenev/lxi-tools/lxi-tools#

author: lundmar
author_rank: Frequent Contributor
timestamp: November 18, 2017, 11:15:54 pm
content: Quote from: dpenev on November 18, 2017, 10:57:34 pmIt 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

author: dpenev
author_rank: Regular Contributor
timestamp: November 23, 2017, 10:45:02 am
content: Hello,I tried the latest version"lxi discover" is working for my Rigol DS2000 scope and my Siglent SSA3000 amalyzerdpenev@yni:~/lxi-tools/lxi-tools$ lxi discover --mdnsSearching for LXI devices - please wait...No services foundShould I start something on my PC?Screenshot for SSA3000 doesn't work at my sidelxi screenshot -a 192.168.1.61 -p siglent-ssa3000x scr10.pngI am attaching two files I get with line like the above.

author: lundmar
author_rank: Frequent Contributor
timestamp: November 23, 2017, 12:16:38 pm
content: Quote from: dpenev on November 23, 2017, 10:45:02 amGreat. Thanks for testingQuote from: dpenev on November 23, 2017, 10:45:02 amNo, 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.Quote from: dpenev on November 23, 2017, 10:45:02 amYeah, 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:lxi screenshot -a 192.168.1.61And tell me if it autodetects the correct screenshot plugin ("siglent-ssa3000x"). Thanks.

author: lundmar
author_rank: Frequent Contributor
timestamp: November 23, 2017, 05:43:50 pm
content: Quote from: PeDre on November 23, 2017, 04:43:07 pmThanks Peter, good stuffI've merged your files and made a git commit on your behalf. Seehttps://github.com/lxi/lxi-tools/commit/c0a4199c50f819e069d96285b7de89be927b8cb6I would like to add you to the contributor list in the AUTHORS file (seehttps://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.

author: dpenev
author_rank: Regular Contributor
timestamp: November 23, 2017, 06:04:37 pm
content: the plugin for SSA3000x is automatically recognized, see bellowdpenev@yni:~/lxi-tools/lxi-tools$ sudo lxi screenshot -a 192.168.1.61Loaded siglent-ssa3000x screenshot pluginSaved screenshot image to screenshot_192.168.1.61_2017-11-23_19:56:10.bmp

author: lundmar
author_rank: Frequent Contributor
timestamp: November 23, 2017, 06:12:54 pm
content: Quote from: PeDre on November 23, 2017, 05:56:59 pmGreat, 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.

author: lundmar
author_rank: Frequent Contributor
timestamp: November 23, 2017, 06:17:46 pm
content: Quote from: dpenev on November 23, 2017, 06:04:37 pmGreat, 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.

author: lundmar
author_rank: Frequent Contributor
timestamp: November 23, 2017, 10:08:07 pm
content: Quote from: PeDre on November 23, 2017, 06:30:49 pmNice. I don't know much of xojo but it looks cool.Quote from: PeDre on November 23, 2017, 06:30:49 pmToo late, I've already added you as "PeDre from EEVBlog forum" in the contributor sectionI 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

author: lundmar
author_rank: Frequent Contributor
timestamp: November 23, 2017, 10:23:44 pm
content: Quote from: PeDre on November 23, 2017, 05:56:59 pmBy 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.

author: lundmar
author_rank: Frequent Contributor
timestamp: November 24, 2017, 04:20:19 am
content: 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.

author: lundmar
author_rank: Frequent Contributor
timestamp: November 24, 2017, 07:40:46 am
content: Quote from: PeDre on November 24, 2017, 07:21:09 amOk, 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.

author: 3hristian
author_rank: Newbie
timestamp: November 25, 2017, 08:59:35 am
content: 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:$ lxi --helplxi: error while loading shared libraries: liblxi.so.1: cannot open shared object file: No such file or directoryi am runningCode: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/LinuxOrCode:Linux Mint 18.1 Cinnamon 64-bitif that floats your goat.As solving this issue has many solutions hence I wanted to ask first before fumbling around.

author: lundmar
author_rank: Frequent Contributor
timestamp: November 25, 2017, 12:37:08 pm
content: Quote from: 3hristian on November 25, 2017, 08:59:35 amHi 3hristian,No worries, you just keep spamming github as much as you like - that is what is what the issue tracker is forI'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:$ LD_LIBRARY_PATH=$HOME/opt/lxi/lib ./lxi --versionv1.12Or by simply exporting the variable like so and running the lxi tool:Code:$ export LD_LIBRARY_PATH=$HOME/opt/lxi/lib$ lxi --versionlxi v1.12Assuming your install location is $HOME/opt/lxi as suggested in the git install instructions.

author: lundmar
author_rank: Frequent Contributor
timestamp: November 26, 2017, 03:40:10 am
content: 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 packagesTo 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:$ snap install lxi-toolsThe 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.).Seehttps://snapcraft.iofor 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

author: nctnico
author_rank: Super Contributor
timestamp: November 26, 2017, 12:28:59 pm
content: Quote from: lundmar on November 26, 2017, 03:40:10 amThe 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.

author: lundmar
author_rank: Frequent Contributor
timestamp: November 26, 2017, 01:35:03 pm
content: Quote from: nctnico on November 26, 2017, 12:28:59 pmThat 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.

author: lundmar
author_rank: Frequent Contributor
timestamp: November 27, 2017, 03:06:24 pm
content: FYI - it is now possible to install latest development version using snap:Code:$ snap install lxi-tools --edgeThe lxi-tools snap from the edge channel automatically follows the latest git version via automatic CI usinghttps://build.snapcraft.ioAlso, the lxi-tools snap is now built for the following architectures: amd64, i386, armhfFor those interested, here is the snapcraft configuration for the lxi-tools snap:https://github.com/lxi/lxi-tools.snapcraft

author: lundmar
author_rank: Frequent Contributor
timestamp: November 27, 2017, 09:37:15 pm
content: FYI - I've renamed the website from lxi.github.io to lxi-tools.github.ioAlso, 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:snap refresh lxi-toolsOr, if you don't have it installed already, simply:Code:snap install lxi-toolsAfter snap is installed, you will have to run this command:Code:$ snap alias lxi-tools.lxi lxiTo 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 bitIf anyone runs into issues installing using snap please let me know. Thanks.

author: dpenev
author_rank: Regular Contributor
timestamp: November 28, 2017, 12:55:54 pm
content: Hi lundmar,Just to confirm that lxi snap and aliasing seem to be working fine on my Ubuntu 14.04 box.

author: lundmar
author_rank: Frequent Contributor
timestamp: November 28, 2017, 01:24:31 pm
content: Quote from: dpenev on November 28, 2017, 12:55:54 pmThats 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 feedbackBtw. 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.

author: dpenev
author_rank: Regular Contributor
timestamp: November 28, 2017, 03:32:24 pm
content: 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

author: lundmar
author_rank: Frequent Contributor
timestamp: November 28, 2017, 04:27:35 pm
content: Quote from: dpenev on November 28, 2017, 03:32:24 pmStill 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 seriesIn 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:$ snap install lxi-tools --edgeOr, if you have it already installed, you can make sure it is up-to-date and using the edge channel like so:Code:$ snap refresh lxi-tools --edgePlease 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.

author: BloodyCactus
author_rank: Frequent Contributor
timestamp: November 29, 2017, 01:13:24 am
content: hmmmCode:> /snap/bin/lxi --versioncannot change current working directory to the original directory: Permission denied> sudo /snap/bin/lxi --versioncannot change current working directory to the original directory: Permission denied> cd /tmp> lxi --versionlxi v1.13oh, solved my own problem, posting here for posterity. You get the above error if you run it when your in an NFS mounted directory/path.oh and screenshot fails on hmo-rs1000 (I have hmo1202)Code:> lxi screenshot -p rs-hmo1000 -a scopeSaved screenshot image to screenshot_scope_2017-11-28_19:55:38.png> file screenshot_scope_2017-11-28_19\:55\:38.pngscreenshot_scope_2017-11-28_19:55:38.png: datayou can see theCode:'G' 0D 0A 1A 0A 00 00 00 0Dbut we are missingCode:89 50 4Ethe start of the PNG magic...putting in the missing header shows a valid PNG from the scopeCode:> file qq.pngqq.png: PNG image data, 640 x 520, 8-bit colormap, non-interlaced

author: lundmar
author_rank: Frequent Contributor
timestamp: November 29, 2017, 02:16:48 am
content: Quote from: BloodyCactus on November 29, 2017, 01:13:24 amYeah, sorry about that.It has to do with the way that snaps work. All snaps are running in a security enabled Linux container which means that the snap is only allowed access to certain subsystems. For example, in case of lxi-tools, it can only access your network and home directory (if it was not NFS network mounted). The main upside of having such level of security is that I am allowed to distribute updates quickly and directly to end users without having to go through the slow package update procedures of the various Linux distributions which can take weeks or even months sometimes. And the downsides... well, you just found one he he. That being said, I will investigate if it possible to reconfigure the snap to gain access to network mounted file systems.Quote from: BloodyCactus on November 29, 2017, 01:13:24 amFixed! Thanks for the detailed debug info. It was very helpfulIt's fixed in this commit:https://github.com/lxi-tools/lxi-tools/commit/04a7cbf9a61af9ead886d4a4a29ddc11b61cbe34The git commit automatically triggers an update of the lxi-tools snap in the edge channel so you should be able to update to it immediately:Code:snap refresh lxi-tools --edgeBy the way, can you please try fire this command?Code:$ lxi screenshot -a scopeWhich should automatically load the correct screenshot plugin. If it fails please provide me the IDN string of your instrument.Thanks

author: BloodyCactus
author_rank: Frequent Contributor
timestamp: November 29, 2017, 02:49:38 am
content: Code:[ sgeorge @ workstation ] - [ /tmp ][$]> lxi screenshot -a scopeError: Read error (timeout)Error: Failed to receive messageError: Unable to retrieve instrument IDneeds a -p, so here is my IDNCode: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.DoingCode:lxi screensscreenshot -p rs-hmo1000 -a scopeSaved screenshot image to screenshot_scope_2017-11-28_21:43:12.pngdoes not actually put "screenshot_scope_2017-11-28_21:43:12.png" on disk. not in my home directory, or anywhere...ok. found them inCode:/tmp/snap.1000_lxi-tools_ql0gGm/tmp/which isCode:drwx------ 3 root sgeorge 4.0K Nov 28 19:50 snap.1000_lxi-tools_ql0gGmhow very strange.PNG do load correctly tho.

author: lundmar
author_rank: Frequent Contributor
timestamp: November 29, 2017, 03:30:18 am
content: Quote from: BloodyCactus on November 29, 2017, 02:49:38 amHmm, strange. I didn't expect it to fail retrieving the ID. Can your please verify that the following command works for you?Code:$ lxi scpi -a scope "*IDN?"If that also fails please try with IP address instead of 'scope'.Quote from: BloodyCactus on November 29, 2017, 02:49:38 amYes, since your home directory is NFS network mounted, the lxi-tools snap can't access your home directory. And when you are in /tmp the security container redirects the files to the tmp of the snap. magic...The good news is that the NFS home issue is apparently something which has been resolved and a fix should soon be available with newly released snap subsystems. Unfortunately, only recent Ubuntu and Fedora systems are deploying latest versions of snap/snapd. In other words, if you are running a recent Ubuntu version (e.g. 17.10) chances are it will soon be available.Quote from: BloodyCactus on November 29, 2017, 02:49:38 amGood

author: BloodyCactus
author_rank: Frequent Contributor
timestamp: November 29, 2017, 03:55:26 am
content: Quote from: lundmar on November 29, 2017, 03:30:18 amCode:lxi scpi -a scope "*IDN?"Rohde&Schwarz,HMO1202,nnnnnnnnn,05.886lxi screenshot -a 192.168.0.107 also fails, without -pQuotemy 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.

author: lundmar
author_rank: Frequent Contributor
timestamp: November 29, 2017, 04:19:40 am
content: Quote from: BloodyCactus on November 29, 2017, 03:55:26 amOk 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.Quote from: BloodyCactus on November 29, 2017, 03:55:26 amOk, 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.

author: lundmar
author_rank: Frequent Contributor
timestamp: November 29, 2017, 02:16:38 pm
content: Quote from: lundmar on November 29, 2017, 04:19:40 amOk, I've found and fixed the bug. It was a very silly and simple bugThe 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.

author: BloodyCactus
author_rank: Frequent Contributor
timestamp: November 29, 2017, 10:37:42 pm
content: Quote from: lundmar on November 29, 2017, 02:16:38 pmCode:lxi screenshot -a scope -p rs-hmo1000works.Code:> lxi screenshot -a scopeLoaded rs-hmo1000 screenshot pluginhangs.no change when using IP. still hangs.with gdb, I get (but probably not much good to you).Code:#0 0x00007ffff76b76f0 in __poll_nocancel () at ../sysdeps/unix/syscall-template.S:84#1 0x00007ffff76f14e3 in readtcp (ctptr=0x60a6b0 "\004",buf=0x60e3d0 "d, Robert Gauthier, Floyd Wilder, Mark Drissel, Kenny Lyons,\n# Paul Dunne, Tirath Pannu, Mike L", len=4000) at clnt_tcp.c:480#2 0x00007ffff76ea946 in fill_input_buf (rstrm=0x60a770) at xdr_rec.c:567#3 get_input_bytes (len=4, addr=0x7fffffbecbac "", rstrm=<optimized out>) at xdr_rec.c:586#4 set_input_fragment (rstrm=<optimized out>) at xdr_rec.c:605#5 xdrrec_getbytes (xdrs=<optimized out>, addr=addr@entry=0x7fffffbecbfc "\377\177", len=len@entry=4)at xdr_rec.c:262#6 0x00007ffff76eab83 in xdrrec_getlong (xdrs=<optimized out>, lp=0x7fffffbecc18) at xdr_rec.c:218#7 0x00007ffff76f6aab in __GI_xdr_u_long (xdrs=xdrs@entry=0x60a718, ulp=ulp@entry=0x7fffffbecca0) at xdr.c:214#8 0x00007ffff76e9791 in __GI_xdr_replymsg (xdrs=xdrs@entry=0x60a718, rmsg=rmsg@entry=0x7fffffbecca0)at rpc_prot.c:135#9 0x00007ffff76f12ae in clnttcp_call (h=0x60a690, proc=10, xdr_args=0x7ffff7bd07f1 <xdr_Create_LinkParms>,args_ptr=0x7fffffbecdb0 "\220\246`", xdr_results=0x7ffff7bd0ad1 <xdr_Create_LinkResp>,results_ptr=0x60a0e8 "\210\v\230\367\377\177", timeout=...) at clnt_tcp.c:287#10 0x00007ffff7bd01e8 in create_link_1 () from liblxi.so.1#11 0x00007ffff7bcedb2 in vxi11_connect () from liblxi.so.1#12 0x00007ffff7bcea0e in lxi_connect () from liblxi.so.1#13 0x0000000000404339 in rs_hmo1000_screenshot ()#14 0x0000000000403525 in screenshot ()#15 0x0000000000402384 in main ()

author: lundmar
author_rank: Frequent Contributor
timestamp: November 29, 2017, 11:30:02 pm
content: Quote from: BloodyCactus on November 29, 2017, 10:37:42 pmFixed!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 disconnectand that obviously causes a hang for instruments that only support 1 active connection.Thanks for the testing/debugThis 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:lxi benchmark -a <ip>Example:Code:$ lxi benchmark -a 192.168.1.210Benchmarking by sending 100 ID requests. Please wait...Result: 19.5 requests/second

author: dpenev
author_rank: Regular Contributor
timestamp: November 30, 2017, 12:21:29 pm
content: Hello,I got this:dpenev@yni:~$ sudo snap refresh lxi-tools --edgesnap "lxi-tools" has no updates availabledpenev@yni:~$ lxi -vlxi v1.13dpenev@yni:~$ lxi screenshot -a 192.168.1.61Loaded siglent-ssa3000x screenshot pluginError: Failed to receive messagedpenev@yni:~$

author: lundmar
author_rank: Frequent Contributor
timestamp: November 30, 2017, 03:24:39 pm
content: Quote from: dpenev on November 30, 2017, 12:21:29 pmThats's good. On some systems snaps automatically updates to the latest version available in their active channel (stable, candidate, beta, or edge).Quote from: dpenev on November 30, 2017, 12:21:29 pmHmm. 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 firmwareI'll talk to Siglent again to verify that the "SCDP." command is actually supported by latest public firmware.Thanks for testing.

author: lundmar
author_rank: Frequent Contributor
timestamp: November 30, 2017, 05:50:59 pm
content: 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.

author: dpenev
author_rank: Regular Contributor
timestamp: November 30, 2017, 09:16:29 pm
content: Hi Lundmar,I don't find SCDP command in the SSA3000X programming manual.

author: lundmar
author_rank: Frequent Contributor
timestamp: November 30, 2017, 09:39:40 pm
content: Quote from: dpenev on November 30, 2017, 09:16:29 pmHi,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.

author: lundmar
author_rank: Frequent Contributor
timestamp: December 01, 2017, 01:15:16 am
content: Quote from: dpenev on November 30, 2017, 09:16:29 pmI'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:$ snap info lxi-toolsname: lxi-toolssummary: Open source LXI toolspublisher: lundmardescription: |Lxi-tools is a collection of open source software tools that enables controlof LXI compatible instruments such as modern oscilloscopes, power supplies,spectrum analyzers etc.snap-id: yha3V4dqfwJwpjSWgMFEMViAlQ2iMdL7commands:- lxi-tools.lxitracking: edgeinstalled: 1.13 (110) 14MB -refreshed: 2017-12-01 02:08:58 +0100 CETchannels:stable: 1.12 (42) 14MB -candidate: ?beta: ?edge: 1.13 (110) 14MB -

author: lundmar
author_rank: Frequent Contributor
timestamp: December 01, 2017, 02:38:07 pm
content: Following the usual rapid release cycle I have made a new release of lxi-tools available.For an overview of the changes please seehttps://github.com/lxi-tools/lxi-tools/releases/tag/v1.13This 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 pluginThis release is available for install via the snap stable channel:Code:$ snap install lxi-tools

author: HoracioDos
author_rank: Frequent Contributor
timestamp: December 01, 2017, 07:11:05 pm
content: Please stop improving this thing. I'm getting tired of compiling it almost every week

author: lundmar
author_rank: Frequent Contributor
timestamp: December 01, 2017, 07:19:12 pm
content: Quote from: HoracioDos on December 01, 2017, 07:11:05 pmHa ha HoracioDosI can highly recommend you install via snap instead - it updates automatically. No need to manually compile stuff anymore

author: HoracioDos
author_rank: Frequent Contributor
timestamp: December 01, 2017, 07:28:44 pm
content: Quote from: lundmar on December 01, 2017, 07:19:12 pmI prefer flatpak or old school compile

author: lundmar
author_rank: Frequent Contributor
timestamp: December 01, 2017, 07:34:26 pm
content: Quote from: HoracioDos on December 01, 2017, 07:28:44 pmWell, it looks like snap is winning over flatpak in the popularity race... just sayingEither 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.

author: lundmar
author_rank: Frequent Contributor
timestamp: December 01, 2017, 08:29:37 pm
content: Quote from: BloodyCactus on November 29, 2017, 01:13:24 amOh, 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:snap install lxi-tools --classicThen 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.

author: crispus
author_rank: Regular Contributor
timestamp: December 10, 2017, 04:25:16 pm
content: 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:user@host: /s/l/out $ bin/lxi discoverSearching for LXI devices - please wait...Broadcasting on interface loBroadcasting on interface eth0Found "Rigol Technologies,DM3058,DM3XXXX,01.01.00.02.02.00" on address 192.168.1.144user@host: /s/l/out $ bin/lxi screenshot -a 192.168.1.144 screenshotLoaded rigol-dm3000 screenshot plugin<I can hear a beep on the multimeter><some time after>Error: Read error (timeout)Error: Failed to receive messageuser@host: /s/l/out $I do have the latest version built from github.

author: lundmar
author_rank: Frequent Contributor
timestamp: December 10, 2017, 04:38:45 pm
content: Quote from: crispus on December 10, 2017, 04:25:16 pmPerhaps I'll add an option for which interface to broadcast on. Something like:Code:$ lxi discover --interface wlan0For now, to speed things up a bit, you can decrease the timeout. Usually '--timeout 1' is sufficient.Quote from: crispus on December 10, 2017, 04:25:16 pmDo 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.

author: crispus
author_rank: Regular Contributor
timestamp: December 10, 2017, 04:51:09 pm
content: 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.

author: crispus
author_rank: Regular Contributor
timestamp: December 10, 2017, 05:57:03 pm
content: 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.

author: lundmar
author_rank: Frequent Contributor
timestamp: December 10, 2017, 07:41:19 pm
content: Quote from: PeDre on December 10, 2017, 05:38:50 pmAhh 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.

author: lundmar
author_rank: Frequent Contributor
timestamp: December 10, 2017, 07:47:29 pm
content: Quote from: crispus on December 10, 2017, 05:57:03 pmOk. 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

author: lundmar
author_rank: Frequent Contributor
timestamp: December 10, 2017, 08:15:08 pm
content: 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?

author: lundmar
author_rank: Frequent Contributor
timestamp: December 10, 2017, 11:18:36 pm
content: Quote from: lundmar on November 09, 2017, 10:55:11 amUpdate: 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:$ lxi screenshot --address 10.0.0.42 - | convert - screenshot.jpgThis feature will be included in the upcoming release. It is already available in the snap edge channel.

author: lundmar
author_rank: Frequent Contributor
timestamp: December 11, 2017, 02:44:39 pm
content: Quote from: PeDre on December 11, 2017, 06:41:09 amOk good - so it is just an undocumented feature.Quote from: PeDre on December 11, 2017, 08:49:36 amOk, 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 testingMan, I wish I had more instruments so I could create a small lab with various instruments for regression and feature testing.

author: crispus
author_rank: Regular Contributor
timestamp: December 11, 2017, 03:04:33 pm
content: Quote from: lundmar on December 11, 2017, 02:44:39 pmIf you refer tohttps://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.Quote from: lundmar on December 11, 2017, 02:44:39 pmI mentioned that I have also MSO1104Z-S, DG4062 and DSA815-TG. And periodically I could run some regression tests.

author: lundmar
author_rank: Frequent Contributor
timestamp: December 11, 2017, 03:25:17 pm
content: Quote from: crispus on December 11, 2017, 03:04:33 pmI 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).Quote from: crispus on December 11, 2017, 03:04:33 pmIf 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.

author: crispus
author_rank: Regular Contributor
timestamp: December 11, 2017, 08:47:13 pm
content: Still doesn't work (neither with snap --edge, nor from source files)Same error (the following output is from snap):Code:$ lxiUsage: /snap/lxi-tools/220/bin/lxi [--version] [--help] <command> [<args>]$ lxi screenshot -a 192.168.1.144 -Loaded rigol-dm3000 screenshot pluginError: Read error (timeout)Error: Failed to receive messageDiscover && screnshots works from other instruments:Code:$ lxi discover --timeout 1Searching for LXI devices - please wait...Broadcasting on interface loBroadcasting on interface eth0Found "Rigol Technologies,DG4062,DG4xxx,00.01.12" on address 192.168.1.67Found "RIGOL TECHNOLOGIES,MSO1104Z,DS1xxxx,00.04.04.SP3" on address 192.168.1.149Found "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.pngMaybe 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.

author: lundmar
author_rank: Frequent Contributor
timestamp: December 11, 2017, 09:13:00 pm
content: Quote from: crispus on December 11, 2017, 08:47:13 pmUpdate 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:$ lxi scpi --address <ip> --interactiveAnd in interactive mode please enter the following:Code::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"'.Quote from: crispus on December 11, 2017, 08:47:13 pmThanks - I've added them to the list of tested instruments. Also, I've added you to the list of contributors.Quote from: crispus on December 11, 2017, 08:47:13 pmYeah, I might add that.

author: crispus
author_rank: Regular Contributor
timestamp: December 12, 2017, 06:49:29 am
content: Yeah, you're right:Code:$ lxi scpi -a 192.168.1.144 --interactiveConnected to 192.168.1.144Entering interactive mode (ctrl-d to quit)lxi> :disp:data?Error: Read error (timeout)Error: Failed to receive messagelxi> :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 messagelxi> :system:error?-113,"Undefined header; keyword cannot be found"lxi> ^CI can't see any screenshot related in theprogramming manualfor DM3058

author: lundmar
author_rank: Frequent Contributor
timestamp: December 12, 2017, 07:23:23 am
content: Quote from: crispus on December 12, 2017, 06:49:29 amOk.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.

author: crispus
author_rank: Regular Contributor
timestamp: December 12, 2017, 03:03:27 pm
content: Quote from: lundmar on December 12, 2017, 07:23:23 amYes, 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.

author: lundmar
author_rank: Frequent Contributor
timestamp: December 12, 2017, 04:04:42 pm
content: Quote from: crispus on December 12, 2017, 03:03:27 pmHe 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.

author: lundmar
author_rank: Frequent Contributor
timestamp: December 12, 2017, 09:57:07 pm
content: 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.14https://github.com/lxi-tools/liblxi/releases/tag/v1.8A 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:$ lxi screenshot -a 10.0.0.42 - | convert -fill white -draw "font-size 16 text 100,100 '`date`'" -scale 150% - screenshot.jpgOr, to add a label with time stamp:Code:$ lxi screenshot -a 10.0.0.42 - | montage -geometry +0+0 -background white -label "`date`" -scale 150% - screenshot.pngImageMagicks image manipulation tools support various image operations and over 200 image formats which should satisfy the needs of most usersAlso, 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

author: dpenev
author_rank: Regular Contributor
timestamp: December 13, 2017, 05:57:41 pm
content: Hi lundmar,I have tested the latest lxi tool v1.15 and screenshot is working fine on my Siglent SSA3021XA minor note which would be a bit more convenient for me is if I would able to write directly to my shareAt the moment I get an errorlxi screenshot -a 192.168.1.61 /share/scr2.bmpLoaded siglent-ssa3000x screenshot pluginError: Could not write screenshot file (No such file or directory)Thank you for your work.Dimitar

author: lundmar
author_rank: Frequent Contributor
timestamp: December 13, 2017, 08:14:56 pm
content: Quote from: dpenev on December 13, 2017, 05:57:41 pmYou'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:$ lxi screenshot -a 10.0.0.42 - | convert - screenshot.pngThis 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:$ lxi screenshot -a 10.0.0.42 - > screenshot.png

author: ralphrmartin
author_rank: Frequent Contributor
timestamp: December 24, 2017, 04:17:49 pm
content: Just tried to install this unsuccessfully on debian.I first installed snap as described, and all went well. I then triedsnap install lxi-tools --edgeand goterror: cannot install "lxi-tools": Gethttps://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-toolsgives the same result.Any idea what is up?Thanks.

author: lundmar
author_rank: Frequent Contributor
timestamp: December 24, 2017, 09:49:10 pm
content: Quote from: ralphrmartin on December 24, 2017, 04:17:49 pmI 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).

author: ralphrmartin
author_rank: Frequent Contributor
timestamp: December 25, 2017, 05:32:54 pm
content: I'm usingGNU/Linux testing Stretchandsnap 2.21-2+b1I'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 getbash: lxi: command not foundAm I doing something silly?

author: ralphrmartin
author_rank: Frequent Contributor
timestamp: December 25, 2017, 06:42:19 pm
content: OK, so I found the binary: /snap/bin/lxiBut trying to run it as/snap/bin/lxigivescannot bind-mount the mount namespace file /proc/2556/ns/mnt -> lxi-tools.mnt: Permission deniedsupport process for mount namespace capture exited abnormally

author: crispus
author_rank: Regular Contributor
timestamp: December 25, 2017, 06:57:56 pm
content: Do you have /var or /tmp as symbolic link?

author: lundmar
author_rank: Frequent Contributor
timestamp: December 25, 2017, 07:13:46 pm
content: Quote from: ralphrmartin on December 25, 2017, 05:32:54 pmGoodQuote from: ralphrmartin on December 25, 2017, 05:32:54 pmI 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:snap aliasesIf the alias is not listed you can install it manually:Code:snap alias lxi-tools.lxi lxiYou might also consider using Debian stable. I mean, Debian testing can include broken stuff

author: lundmar
author_rank: Frequent Contributor
timestamp: December 25, 2017, 07:35:17 pm
content: 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 soOf course, it will be available in unstable/testing long before that.

author: ralphrmartin
author_rank: Frequent Contributor
timestamp: December 26, 2017, 10:09:24 pm
content: Hmmsnap aliasesgivesCommand Alias Noteslxi-tools.lxi lxi -so that does not seem to be the problem.Neither /var nor /tmp are aliases.snap versionnow givessnap versionsnap 2.27.6-2snapd 2.27.6-2series 16debian unknownkernel 4.13.0-1-amd64Any 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...

author: lundmar
author_rank: Frequent Contributor
timestamp: December 26, 2017, 10:43:23 pm
content: Quote from: ralphrmartin on December 26, 2017, 10:09:24 pmThe 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:$ snap refresh lxi-tools --devmodeOrCode:$ snap refresh lxi-tools --classicEither 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.

author: ralphrmartin
author_rank: Frequent Contributor
timestamp: December 27, 2017, 08:15:56 pm
content: Both of those variants did nothing, just givingsnap "lxi-tools" has no updates availableHowever the deb files seem to have worked.Thanks!I'll try it out with some instruments in the next few days I hope.

author: lundmar
author_rank: Frequent Contributor
timestamp: December 27, 2017, 08:28:28 pm
content: Quote from: ralphrmartin on December 27, 2017, 08:15:56 pmI think that is expected because there is no new refresh/download available but despite this message it is supposed to change the confinement setting.Quote from: ralphrmartin on December 27, 2017, 08:15:56 pmGreat - 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.

author: ralphrmartin
author_rank: Frequent Contributor
timestamp: December 27, 2017, 09:18:04 pm
content: Well, findings so far are discovery works for these devices:Found "Rigol Technologies,DG4062,[serial#]" on address 192.168.1.207Found "KEYSIGHT TECHNOLOGIES,MSO-X 3024T,[serial#],07.20.2017102614" on address 192.168.1.206Tried 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 ..........9@2..*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.

author: ralphrmartin
author_rank: Frequent Contributor
timestamp: December 27, 2017, 09:49:34 pm
content: 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.

author: lundmar
author_rank: Frequent Contributor
timestamp: December 27, 2017, 10:15:36 pm
content: Quote from: ralphrmartin on December 27, 2017, 09:18:04 pmGood.Quote from: ralphrmartin on December 27, 2017, 09:18:04 pmYeah, 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.Quote from: ralphrmartin on December 27, 2017, 09:18:04 pmOh, 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).

author: lundmar
author_rank: Frequent Contributor
timestamp: December 27, 2017, 10:36:08 pm
content: Quote from: ralphrmartin on December 27, 2017, 09:49:34 pmUnfortunately 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?

author: ralphrmartin
author_rank: Frequent Contributor
timestamp: December 28, 2017, 08:23:13 am
content: 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).

author: ralphrmartin
author_rank: Frequent Contributor
timestamp: December 28, 2017, 10:53:25 am
content: There's definitely something wrong with the way the snap version is working. I just installed a fresh Debian stretch in a VirtualBox VM, didapt-get install snapdthensnap install lxi-toolswhich all seemed to work OK.But then any of the commandslxilxitoolslxi-toolsjust gives me "command not found".Write once run anywhere is a noble goal - but seems rather too fragile...

author: lundmar
author_rank: Frequent Contributor
timestamp: December 28, 2017, 11:15:46 am
content: Quote from: ralphrmartin on December 28, 2017, 10:53:25 amThese are the exact steps I do on Debian 9.3:Code:$ lsb_release -dDescription: Debian GNU/Linux 9.3 (stretch)$ snap --versionsnap 2.29.4.2snapd 2.29.4.2series 16debian 9kernel 4.9.0-4-amd64$ su -$ snap install lxi-tools --edge$ lxi --versionlxi v1.16$ lxi-tools.lxi --versionlxi v1.16$ snap aliasesCommand Alias Noteslxi-tools.lxi lxi -Quote from: ralphrmartin on December 28, 2017, 10:53:25 amAt least it is a goal

author: lundmar
author_rank: Frequent Contributor
timestamp: December 28, 2017, 11:20:19 am
content: Quote from: PeDre on December 28, 2017, 07:23:33 amExactly - 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.

author: ralphrmartin
author_rank: Frequent Contributor
timestamp: December 28, 2017, 11:52:24 am
content: Well, here is my output#lsb_release -dDescription: Debian GNU/Linux 9.3 (stretch)#snap --versionsnap 2.29.4.2snapd 2.29.4.2series 16debian 9kernel 4.9.0-4-amd64#snap install lxi-tools --edgelxi-tools (edge) 1.16 from 'lundmar' installed#lxi --versionbash: lxi: command not found#lxi-tools.lxi --versionbash: lxi-tools.lxi: command not found#snap aliasesCommand Alias Noteslxi-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.

author: lundmar
author_rank: Frequent Contributor
timestamp: December 28, 2017, 12:05:21 pm
content: Quote from: ralphrmartin on December 28, 2017, 11:52:24 amI 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.

author: ralphrmartin
author_rank: Frequent Contributor
timestamp: December 28, 2017, 04:50:25 pm
content: Thanks. usingsu -instead ofsudo bashto get a root terminal did the trick (except I still have to be root to use the lxi command).

author: lundmar
author_rank: Frequent Contributor
timestamp: December 28, 2017, 05:05:15 pm
content: Quote from: ralphrmartin on December 28, 2017, 04:50:25 pmGreat. Let me know if the fixed screenshot plugins work with your DG and MSO. You should be able to simply do:Code:$ 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.

author: ralphrmartin
author_rank: Frequent Contributor
timestamp: December 28, 2017, 07:29:14 pm
content: 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!

author: lundmar
author_rank: Frequent Contributor
timestamp: December 28, 2017, 09:11:15 pm
content: Quote from: ralphrmartin on December 28, 2017, 07:29:14 pmThanksAnd thank you for your patience getting the snap running. Great to finally have a Keysight instrument tested workingFor your testing effort I've added you to the list of contributors.

author: lundmar
author_rank: Frequent Contributor
timestamp: December 29, 2017, 08:31:30 pm
content: New releases available via snap or source.Changes:https://github.com/lxi-tools/lxi-tools/releases/tag/v1.16https://github.com/lxi-tools/liblxi/releases/tag/v1.9The 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.

author: lundmar
author_rank: Frequent Contributor
timestamp: January 02, 2018, 07:42:55 pm
content: 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 AddressThe 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 guiIf there are any GUI or QT5 designers out there who are interested in helping creating this GUI application feel free to join inAlso, 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.

author: ralphrmartin
author_rank: Frequent Contributor
timestamp: January 03, 2018, 06:35:33 pm
content: 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.

author: lundmar
author_rank: Frequent Contributor
timestamp: January 03, 2018, 07:25:31 pm
content: Quote from: ralphrmartin on January 03, 2018, 06:35:33 pmYeah - the "IEEE 488.2 Common Commands".http://na.support.keysight.com/vna/help/latest/Programming/GP-IB_Command_Finder/Common_Commands.htmI'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

author: lundmar
author_rank: Frequent Contributor
timestamp: January 08, 2018, 02:47:55 pm
content: Siglent Technologies has kindly lent me their new SDS1204X-E oscilloscope (200 MHz, 4 channels) to help the lxi-tools open source effortI 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 absolutelyblazinglyfast 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:$ lxi benchmark --address 192.168.1.125Benchmarking by sending 1000 ID requests. Please wait...Result: 1123.5 requests/secondAnd I get ~600 requests/s via TCP/RAW:Code:$ lxi benchmark --raw --address 192.168.1.125Benchmarking by sending 1000 ID requests. Please wait...Result: 1123.5 requests/secondThis 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.aspxThat is, the available network ports for the SDS1204X-E are:Code:$ nmap -p- 192.168.1.125Starting Nmap 7.60 ( https://nmap.org ) at 2018-01-08 15:18 CETNmap scan report for 192.168.1.125Host is up (0.042s latency).Not shown: 65529 closed portsPORT STATE SERVICE23/tcp open telnet80/tcp open http111/tcp open rpcbind918/tcp open unknown5024/tcp open scpi-telnet5025/tcp open scpi-rawNmap done: 1 IP address (1 host up) scanned in 40.14 secondsIn 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:$ nmap -p- 192.168.1.210Starting Nmap 7.60 ( https://nmap.org ) at 2018-01-08 15:19 CETNmap scan report for 192.168.1.210Host is up (0.080s latency).Not shown: 65529 closed portsPORT STATE SERVICE80/tcp open http111/tcp open rpcbind617/tcp open sco-dtmgr618/tcp open dei-icda619/tcp open compaq-evm5555/tcp open freecivNmap done: 1 IP address (1 host up) scanned in 40.54 secondsTaking a screenshot with the SDS1204X-E is very fast too:Code:$ time lxi screenshot -a 192.168.1.125Loaded siglent-sds screenshot pluginSaved screenshot image to screenshot_192.168.1.125_2018-01-08_15:37:22.bmpreal 0m0,141suser 0m0,004ssys 0m0,024sOnly ~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.

author: BloodyCactus
author_rank: Frequent Contributor
timestamp: January 09, 2018, 01:46:53 am
content: just because, why notR&S HMO1202 (which seems surprisingly slow...)Code:[ sgeorge @ workstation ] - [ ~/git/rai1/c64_c128_plus4 ] (master*)[$]> lxi --versionlxi v1.17[ sgeorge @ workstation ] - [ ~/git/rai1/c64_c128_plus4 ] (master*)[$]> lxi benchmark --address scope.cactusBenchmarking 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.cactusBenchmarking by sending 100 ID requests. Please wait...Result: 12.6 requests/second[ sgeorge @ workstation ] - [ ~/git/rai1/c64_c128_plus4 ] (master*)[$]> nmap -p- scope.cactusStarting Nmap 7.01 ( https://nmap.org ) at 2018-01-08 20:39 ESTNmap scan report for scope.cactus (192.168.0.107)Host is up (0.0022s latency).Not shown: 65530 closed portsPORT STATE SERVICE80/tcp open http111/tcp open rpcbind1024/tcp open kdm1025/tcp open NFS-or-IIS5025/tcp open unknownNmap done: 1 IP address (1 host up) scanned in 11.73 seconds

author: lundmar
author_rank: Frequent Contributor
timestamp: January 09, 2018, 12:10:46 pm
content: Quote from: BloodyCactus on January 09, 2018, 01:46:53 amHe 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.

author: ralphrmartin
author_rank: Frequent Contributor
timestamp: January 09, 2018, 05:12:56 pm
content: 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.

author: lundmar
author_rank: Frequent Contributor
timestamp: January 09, 2018, 06:14:21 pm
content: Quote from: ralphrmartin on January 09, 2018, 05:12:56 pmThanks. 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.

author: ralphrmartin
author_rank: Frequent Contributor
timestamp: January 10, 2018, 05:36:36 pm
content: Thanks. The ID string from the meter isKeysight Technologies,34461A,<serial number here>,A.02.17-02.40-02.17-00.52-03-02but apparently the ID string is user changeable to also make it look like an Agilent or HP unit, for backwards compatibility.I triedsnap refresh lxi-tools --edgeto get your latest version, but it told mesnap "lxi-tools" has no updates availablesnap listreportsName Version Rev Developer Notescore 16-2.30 3748 canonical corelxi-tools 1.17 478 lundmar -Did I do something wrong? How should I get the new plugin?

author: lundmar
author_rank: Frequent Contributor
timestamp: January 10, 2018, 06:17:42 pm
content: Quote from: ralphrmartin on January 10, 2018, 05:36:36 pmGood - 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.

author: ralphrmartin
author_rank: Frequent Contributor
timestamp: January 10, 2018, 07:02:06 pm
content: Good to know I haven't done something wrong. Will try again later, and report back. Thanks for the rapid responses!

author: lundmar
author_rank: Frequent Contributor
timestamp: January 12, 2018, 02:13:49 pm
content: 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.

author: lundmar
author_rank: Frequent Contributor
timestamp: January 12, 2018, 04:26:20 pm
content: Quote from: ralphrmartin on January 10, 2018, 07:02:06 pmThe 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.

author: ralphrmartin
author_rank: Frequent Contributor
timestamp: January 12, 2018, 06:04:18 pm
content: 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...

author: lundmar
author_rank: Frequent Contributor
timestamp: January 12, 2018, 07:14:57 pm
content: Quote from: ralphrmartin on January 12, 2018, 06:04:18 pmGood - I've added it to the list of tested instruments. Thanks for testingQuote from: ralphrmartin on January 12, 2018, 06:04:18 pmWell, 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: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() enddisconnect(inst1)disconnect(inst0)Or, a slightly different but object oriented variation of the same:Code: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() enddisconnect(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.

author: nctnico
author_rank: Super Contributor
timestamp: January 13, 2018, 03:27:09 pm
content: Lua support would be a great feature!

author: lundmar
author_rank: Frequent Contributor
timestamp: January 13, 2018, 04:16:34 pm
content: Quote from: nctnico on January 13, 2018, 03:27:09 pmI 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.

author: alm
author_rank: Super Contributor
timestamp: January 14, 2018, 09:54:13 am
content: 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.

author: lundmar
author_rank: Frequent Contributor
timestamp: January 14, 2018, 11:09:25 am
content: Quote from: alm on January 14, 2018, 09:54:13 amI 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

author: nctnico
author_rank: Super Contributor
timestamp: January 14, 2018, 11:29:50 am
content: Quote from: alm on January 14, 2018, 09:54:13 amA 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.

author: lundmar
author_rank: Frequent Contributor
timestamp: January 14, 2018, 11:39:43 am
content: Quote from: nctnico on January 14, 2018, 11:29:50 amI 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.

author: alm
author_rank: Super Contributor
timestamp: January 14, 2018, 12:05:53 pm
content: Quote from: nctnico on January 14, 2018, 11:29:50 amI was not suggesting to use the NI-VISA implementation, but abstracting the protocol used to access an instrument. For example, there is aPython implementationthat 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.

author: lundmar
author_rank: Frequent Contributor
timestamp: January 14, 2018, 12:55:30 pm
content: Quote from: alm on January 14, 2018, 12:05:53 pmI 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 firmwareAfter all, the future is about everything being network connected

author: lundmar
author_rank: Frequent Contributor
timestamp: January 16, 2018, 11:52:46 pm
content: I've added the benchmark feature to the new lxi-gui application:

author: lundmar
author_rank: Frequent Contributor
timestamp: January 17, 2018, 08:47:58 pm
content: 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).

author: lundmar
author_rank: Frequent Contributor
timestamp: January 18, 2018, 06:01:09 pm
content: 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:$ snap install lxi-tools --edge$ lxi-tools.lxi-guiIt 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 heardSome 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...

author: lundmar
author_rank: Frequent Contributor
timestamp: January 19, 2018, 03:34:11 pm
content: 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.

author: lundmar
author_rank: Frequent Contributor
timestamp: January 20, 2018, 08:46:33 am
content: 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:

author: lundmar
author_rank: Frequent Contributor
timestamp: January 22, 2018, 05:48:48 pm
content: First attempt at adding a simple data recorder feature:

author: lundmar
author_rank: Frequent Contributor
timestamp: January 24, 2018, 05:20:44 pm
content: 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

author: Karel
author_rank: Super Contributor
timestamp: January 24, 2018, 06:15:20 pm
content: Quote from: lundmar on January 24, 2018, 05:20:44 pmI would like to see that you don't divide your resources over multiple platforms. Instead, focus on Linux only.

author: HoracioDos
author_rank: Frequent Contributor
timestamp: January 26, 2018, 01:24:23 am
content: Quote from: Karel on January 24, 2018, 06:15:20 pmYeap! There's a missing option that I would like to vote: NONE!!!

author: lundmar
author_rank: Frequent Contributor
timestamp: January 26, 2018, 02:37:39 am
content: Quote from: HoracioDos on January 26, 2018, 01:24:23 amHa 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.

author: lundmar
author_rank: Frequent Contributor
timestamp: January 27, 2018, 11:36:43 pm
content: lxi-tools v1.17 has been released - seehttp://lxi-tools.github.ioThis 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.

author: Dwaine
author_rank: Frequent Contributor
timestamp: January 28, 2018, 08:03:18 am
content: How do you compile the lxi-gui?

author: lundmar
author_rank: Frequent Contributor
timestamp: January 28, 2018, 01:50:41 pm
content: Quote from: Dwaine on January 28, 2018, 08:03:18 amBy 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).

author: Dwaine
author_rank: Frequent Contributor
timestamp: January 28, 2018, 11:44:40 pm
content: Thanks. I prefer to build by source.

author: Dwaine
author_rank: Frequent Contributor
timestamp: January 29, 2018, 12:15:12 am
content: 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.

author: lundmar
author_rank: Frequent Contributor
timestamp: January 29, 2018, 12:31:43 am
content: Quote from: Dwaine on January 29, 2018, 12:15:12 amGreat, and thanksI'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).

author: ralphrmartin
author_rank: Frequent Contributor
timestamp: January 30, 2018, 10:42:28 am
content: LundmarJust 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

author: lundmar
author_rank: Frequent Contributor
timestamp: January 30, 2018, 11:25:35 am
content: Quote from: ralphrmartin on January 30, 2018, 10:42:28 amHmm, 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.

author: lundmar
author_rank: Frequent Contributor
timestamp: February 01, 2018, 05:50:05 pm
content: 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!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.

author: technogeeky
author_rank: Frequent Contributor
timestamp: February 01, 2018, 06:34:11 pm
content: Quote from: lundmar on February 01, 2018, 05:50:05 pmI 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 theRigol Bildschirmkopiesoftware to capture "as fast as possible" (the next fastest option being once per second).Howeverwhile 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 todropupdating 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!

author: Karel
author_rank: Super Contributor
timestamp: February 01, 2018, 07:04:45 pm
content: Quote from: technogeeky on February 01, 2018, 06:34:11 pmPut a USB webcam in front of the scope and you'll get a much higher framerate.And it doesn't slowdown the scope...

author: lundmar
author_rank: Frequent Contributor
timestamp: February 01, 2018, 07:11:24 pm
content: Quote from: technogeeky on February 01, 2018, 06:34:11 pmSure - 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.Quote from: technogeeky on February 01, 2018, 06:34:11 pmI can put together a small sample.

author: technogeeky
author_rank: Frequent Contributor
timestamp: February 01, 2018, 07:12:36 pm
content: Quote from: Karel on February 01, 2018, 07:04:45 pmAs 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:.

author: lundmar
author_rank: Frequent Contributor
timestamp: February 01, 2018, 08:44:29 pm
content: I captured a video instead to capture the time correctly:https://raw.githubusercontent.com/lxi-tools/misc/master/lxi-gui-benchmark-live-view-sds1204xe.webmIt demonstrates the benchmark and live screenshot feature on the SDS1204X-E. It feels quite responsive.Update:New video.

author: lundmar
author_rank: Frequent Contributor
timestamp: February 03, 2018, 03:18:25 am
content: lxi-tools is now on youtube:https://www.youtube.com/channel/UCDySM9OfJsJ99LBhrfv-pFQFirst video uploaded:https://youtu.be/8EE3mf_wADg

author: HoracioDos
author_rank: Frequent Contributor
timestamp: February 03, 2018, 11:37:42 am
content: Quote from: lundmar on February 03, 2018, 03:18:25 amAlready subscribed here. I hope this is the first of many others regardless of lxi-tools.

author: Hydron
author_rank: Super Contributor
timestamp: February 03, 2018, 12:23:02 pm
content: Looks great, will have a play with my RTB2004 when i get time.

author: lundmar
author_rank: Frequent Contributor
timestamp: February 03, 2018, 03:16:43 pm
content: Quote from: Hydron on February 03, 2018, 12:23:02 pmLet me know when you do you, then we can create a screenshot plugin and get it working with lxi-toolsUpdate: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.

author: Jester
author_rank: Frequent Contributor
timestamp: February 03, 2018, 03:53:48 pm
content: I can't wait for a Windows version.

author: lundmar
author_rank: Frequent Contributor
timestamp: February 03, 2018, 03:54:23 pm
content: Quote from: HoracioDos on February 03, 2018, 11:37:42 amThanks for your encouragement. I hope to create more videos in the future

author: lundmar
author_rank: Frequent Contributor
timestamp: February 03, 2018, 04:04:09 pm
content: Quote from: Jester on February 03, 2018, 03:53:48 pmOne of two things might happen:* snaps will magically become supported on Windows via clever virtualization* someone ports lxi-tools to WindowsFor 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.

author: Gabri74
author_rank: Regular Contributor
timestamp: February 05, 2018, 09:52:47 am
content: Quote from: lundmar on February 01, 2018, 08:44:29 pmReally 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 ?

author: lundmar
author_rank: Frequent Contributor
timestamp: February 05, 2018, 02:10:28 pm
content: Quote from: Gabri74 on February 05, 2018, 09:52:47 amThanks. 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.

author: lundmar
author_rank: Frequent Contributor
timestamp: February 05, 2018, 05:08:03 pm
content: A big thank you and shout-out to Kikusui Electronics Corporation who has sponsored one of their latest generation compact DC power supplies, thePMX35-3A, to support the continued development of the open source lxi-tools projectI 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:https://youtu.be/QPgAGEImD0UNotice 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

author: lundmar
author_rank: Frequent Contributor
timestamp: February 05, 2018, 11:37:30 pm
content: New releases available:https://github.com/lxi-tools/lxi-tools/releases/download/v1.18/lxi-tools-1.18.tar.xzhttps://github.com/lxi-tools/liblxi/releases/download/v1.11/liblxi-1.11.tar.xzDetailed list of changes can be found here:https://github.com/lxi-tools/lxi-tools/releases/tag/v1.18https://github.com/lxi-tools/liblxi/releases/tag/v1.11Update:New stable snap is available.

author: HoracioDos
author_rank: Frequent Contributor
timestamp: February 06, 2018, 02:11:02 pm
content: Quote from: lundmar on February 05, 2018, 05:08:03 pmNice!! 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.

author: lundmar
author_rank: Frequent Contributor
timestamp: February 06, 2018, 02:52:39 pm
content: Quote from: HoracioDos on February 06, 2018, 02:11:02 pmIt 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.

author: Hydron
author_rank: Super Contributor
timestamp: February 07, 2018, 11:19:39 am
content: 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:lxi benchmark -a 192.168.0.47 -c 1000Benchmarking by sending 1000 ID requests. Please wait...Result: 74.9 requests/secondlxi benchmark -a 192.168.0.47 -c 1000 -rBenchmarking by sending 1000 ID requests. Please wait...Result: 140.9 requests/secondI haven't tried logging anything yet, or the GUI.Thanks for the work on this tool - I look forward to it's continued development!

author: lundmar
author_rank: Frequent Contributor
timestamp: February 07, 2018, 02:01:15 pm
content: Quote from: Hydron on February 07, 2018, 11:19:39 amGreat. 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.

author: Hydron
author_rank: Super Contributor
timestamp: February 07, 2018, 05:58:22 pm
content: 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.

author: lundmar
author_rank: Frequent Contributor
timestamp: February 07, 2018, 06:14:12 pm
content: Quote from: Hydron on February 07, 2018, 05:58:22 pmThat 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

author: Hydron
author_rank: Super Contributor
timestamp: February 07, 2018, 06:38:58 pm
content: 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.

author: lundmar
author_rank: Frequent Contributor
timestamp: February 07, 2018, 07:05:12 pm
content: Quote from: Hydron on February 07, 2018, 06:38:58 pmAhh, 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

author: Hydron
author_rank: Super Contributor
timestamp: February 07, 2018, 07:42:22 pm
content: 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?

author: lundmar
author_rank: Frequent Contributor
timestamp: February 07, 2018, 07:51:02 pm
content: Quote from: Hydron on February 07, 2018, 07:42:22 pmIt'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.snapcraftI expect they will build soon.Update:Snaps with the updated R&S plugin are now built and released (edge channel).

author: Hydron
author_rank: Super Contributor
timestamp: February 07, 2018, 10:23:34 pm
content: No change in time for BMP, so the live screen view must be doing something different...

author: lundmar
author_rank: Frequent Contributor
timestamp: February 07, 2018, 10:29:33 pm
content: Quote from: Hydron on February 07, 2018, 10:23:34 pmOk, well - it was worth a shot.

author: lundmar
author_rank: Frequent Contributor
timestamp: February 11, 2018, 02:00:02 pm
content: 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.

author: N0NB
author_rank: Contributor
timestamp: February 11, 2018, 06:21:47 pm
content: 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.

author: awallin
author_rank: Frequent Contributor
timestamp: February 17, 2018, 08:53:01 am
content: 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

author: N0NB
author_rank: Contributor
timestamp: February 17, 2018, 01:38:59 pm
content: 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.

author: lundmar
author_rank: Frequent Contributor
timestamp: February 17, 2018, 04:45:46 pm
content: Quote from: awallin on February 17, 2018, 08:53:01 amA 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.rpcland 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.

author: awallin
author_rank: Frequent Contributor
timestamp: February 18, 2018, 08:05:10 am
content: Quote from: lundmar on February 17, 2018, 04:45:46 pmThanks 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/colortestkitmeterI 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

author: lundmar
author_rank: Frequent Contributor
timestamp: February 18, 2018, 02:01:37 pm
content: Quote from: awallin on February 18, 2018, 08:05:10 amInteresting implementation. Though, it's a shame it is GPLv3.Good luck.

author: Karel
author_rank: Super Contributor
timestamp: February 18, 2018, 02:13:57 pm
content: Quote from: lundmar on February 18, 2018, 02:01:37 pm?

author: lundmar
author_rank: Frequent Contributor
timestamp: February 18, 2018, 02:22:53 pm
content: Quote from: Karel on February 18, 2018, 02:13:57 pmI would prefer a more permissive license. If you include GPLv3 code in your firmware you are forced to make all your firmware GPLv3.

author: Karel
author_rank: Super Contributor
timestamp: February 18, 2018, 02:29:07 pm
content: Quote from: lundmar on February 18, 2018, 02:22:53 pmAnd 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.

author: lundmar
author_rank: Frequent Contributor
timestamp: February 18, 2018, 02:35:12 pm
content: Quote from: Karel on February 18, 2018, 02:29:07 pmI 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.

author: Karel
author_rank: Super Contributor
timestamp: February 18, 2018, 02:41:56 pm
content: Quote from: lundmar on February 18, 2018, 02:35:12 pmWhy 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?

author: lundmar
author_rank: Frequent Contributor
timestamp: February 18, 2018, 03:07:18 pm
content: Quote from: Karel on February 18, 2018, 02:41:56 pmThats 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.

author: Karel
author_rank: Super Contributor
timestamp: February 18, 2018, 03:16:01 pm
content: Quote from: lundmar on February 18, 2018, 03:07:18 pmYou said: "it's a shame it is GPLv3"

author: lundmar
author_rank: Frequent Contributor
timestamp: February 18, 2018, 03:39:24 pm
content: Quote from: Karel on February 18, 2018, 03:16:01 pmYes, exactly. For the reasons I stated.

author: Karel
author_rank: Super Contributor
timestamp: February 18, 2018, 04:25:28 pm
content: Quote from: lundmar on February 18, 2018, 03:39:24 pmSo, 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...

author: dpenev
author_rank: Regular Contributor
timestamp: February 18, 2018, 05:40:55 pm
content: Karel,Why we should be so literal?Lets thank lundmar for his great workAnd let everyone of us has its own opinion about the open source licenses

author: Karel
author_rank: Super Contributor
timestamp: February 18, 2018, 05:48:40 pm
content: Quote from: dpenev on February 18, 2018, 05:40:55 pmAgreed.

author: lundmar
author_rank: Frequent Contributor
timestamp: February 18, 2018, 09:17:38 pm
content: Quote from: Karel on February 18, 2018, 04:25:28 pmKarel, 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.

author: lundmar
author_rank: Frequent Contributor
timestamp: February 19, 2018, 11:51:45 pm
content: 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

author: Hydron
author_rank: Super Contributor
timestamp: February 20, 2018, 10:19:23 am
content: 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!)

author: lundmar
author_rank: Frequent Contributor
timestamp: February 20, 2018, 04:57:41 pm
content: Quote from: Hydron on February 20, 2018, 10:19:23 amThats 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.

author: ralphrmartin
author_rank: Frequent Contributor
timestamp: February 20, 2018, 06:48:07 pm
content: 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 thisFor V = 0 to 3.3 step 0.1Set the power supply output to VTell the meter to read the current ISave V, I to fileEnd forSurely such automation is the real use of LXI, not just having a remote front panel?

author: lundmar
author_rank: Frequent Contributor
timestamp: February 20, 2018, 08:02:14 pm
content: Quote from: ralphrmartin on February 20, 2018, 06:48:07 pmI 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

author: lundmar
author_rank: Frequent Contributor
timestamp: February 23, 2018, 03:10:01 pm
content: 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.

author: gsocker
author_rank: Contributor
timestamp: March 04, 2018, 08:01:12 pm
content: 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.

author: lundmar
author_rank: Frequent Contributor
timestamp: March 04, 2018, 08:20:42 pm
content: Quote from: gsocker on March 04, 2018, 08:01:12 pmGreat, thanks for testingI'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?

author: gsocker
author_rank: Contributor
timestamp: March 04, 2018, 09:09:10 pm
content: 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.

author: lundmar
author_rank: Frequent Contributor
timestamp: March 04, 2018, 09:28:02 pm
content: Quote from: gsocker on March 04, 2018, 09:09:10 pmOk.I've updated the list of tested instruments and added you to our list of contributors as a thank you for testing.

author: tautech
author_rank: Super Contributor
timestamp: March 04, 2018, 09:34:58 pm
content: lundmarI'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.

author: lundmar
author_rank: Frequent Contributor
timestamp: March 04, 2018, 10:27:34 pm
content: Quote from: tautech on March 04, 2018, 09:34:58 pmtautech, thank you very muchSiglent has been very helpful making it possible for me to add full support for their LXI compatible instrumentsI'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.

author: gsocker
author_rank: Contributor
timestamp: March 04, 2018, 10:34:41 pm
content: Quote from: lundmar on March 04, 2018, 09:28:02 pmOne 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.

author: tautech
author_rank: Super Contributor
timestamp: March 04, 2018, 10:53:43 pm
content: Quote from: lundmar on March 04, 2018, 10:27:34 pmI know some in Siglent are very aware of your great work and those I speak of are not Hamburg based which I guess is your point of contact. I think you can safely assume further support from Siglent when new products are rolled out.

author: lundmar
author_rank: Frequent Contributor
timestamp: March 05, 2018, 05:03:54 pm
content: Quote from: gsocker on March 04, 2018, 10:34:41 pmOk, I've removed the discover feature from the instrument list for HMO 3054.Are you sure that VXI-11 scpi commands does not work with the HMO 3054?If the HMO 3054 works with the screenshot plugin that implies that VXI-11 is working since all plugins use VXI-11 to retrieve screenshots at this point.

author: gsocker
author_rank: Contributor
timestamp: March 06, 2018, 01:26:24 am
content: Quote from: lundmar on March 05, 2018, 05:03:54 pmJust checked - apparently it does. Using strace confirms lxi is connecting to port 1024 sucessfully. Interestingly, there is no mention of VXI-11 anywhere in the programming manual. It explicitly says to use raw sockets on port 5025. I guess the VXI-11 support is intended for VISA since the VISA address shown in the device info dialog uses ::INSTR.Oh well, at least it works...

author: lundmar
author_rank: Frequent Contributor
timestamp: March 06, 2018, 07:02:07 am
content: Quote from: gsocker on March 06, 2018, 01:26:24 amGreat.Well, I guess they don't think they need to advertise such features he heFYI - here you can find a nice overview of ports that LXI compatible/certified instruments should support:http://www.lxistandard.org/About/LXI-Protocols.aspx

author: lundmar
author_rank: Frequent Contributor
timestamp: March 10, 2018, 10:45:55 pm
content: Quote from: ralphrmartin on February 20, 2018, 06:48:07 pmI've finally added the Lua scripting feature to support advanced instrument automation.A "run" command is introduced which can be used to run Lua scripts like so:Code:$ lxi run test.luaFor example, writing a Lua script which prints out the instrument ID is as simple as:Code:device = connect("192.168.0.110")id = scpi(device, "*IDN?")print("Instrument ID = " .. id)disconnect(device)An example of a more advanced Lua script can be found here:https://github.com/lxi-tools/lxi-tools/blob/master/test/test.luaLua offers a clean cut language which allows for writing very concise automation scripts. It is also considered the fastest scripting language around which makes it excellent for automation.Check it out, it's pretty cool. It's available in the snap edge channel.For those not familiar with Lua, see this tutorial:https://www.tutorialspoint.com/lua/index.htmI'm pretty happy about how it works right now but I might change the Lua interface so that it becomes object oriented in the future.

author: ralphrmartin
author_rank: Frequent Contributor
timestamp: March 12, 2018, 06:30:25 pm
content: Excellent - is there some documentation?butsnap refresh lxi-tools --edgesnap "lxi-tools" has no updates available

author: lundmar
author_rank: Frequent Contributor
timestamp: March 12, 2018, 07:24:28 pm
content: Quote from: ralphrmartin on March 12, 2018, 06:30:25 pmThe snap system automatically updates your snaps when new updates are available. So your snap is likely up-to-date.If you want to make sure you can see the list of latest lxi-tools snap versions here:https://dashboard.snapcraft.io/snaps/lxi-toolsAnd compare it with the information retrieved from the "snap info lxi-tools" command.Documentation is work in progress. I will try to soon expand with more documentation in the man page.To run the script named myscript.lua, simply do e.g.:Code:$ lxi run myscript.luaIn the script file you add regular Lua script code which can use any of the available Lua script libraries for math, file I/O, etc.. See more here:https://www.tutorialspoint.com/lua/index.htmThere is also a Lua quick guide here:https://www.tutorialspoint.com/lua/lua_quick_guide.htmIn addition, lxi-tools provides the following Lua functions for managing instruments:Code:-- Connect to instrument ip and return device handledevice = connect(ip)-- Send SCPI command to device and return response if ? commandresponse = scpi(device, command)-- Send SCPI command to device and return raw response if ? commandresponse = scpi_raw(device, command)-- Sleep msmsleep(milliseconds)-- Sleep secondssleep(seconds)-- Disconnect devicedisconnect(device)Most of the interfaces are demonstrated inhttps://github.com/lxi-tools/lxi-tools/blob/master/test/test.luaAs you can see you simply connect to your instrument using the connect function which give you a device handle upon which the scpi function can operate. This allows to connect to multiple instruments in the same session.In case of a question command, the scpi command returns a sanitized response string (removes newlines and carriage returns from the received response string).Likewise, the scpi_raw command returns the original non sanitized response from the instrument, useful if receiving e.g. image or trace binary data.Notice that the example script uses the Lua function tonumber() Lua to convert the received scientific notation number string (e.g. "+5.000E-2", notation returned by most instruments) to a float number.Thats pretty much all there is to it. You simply connect to instruments, send scpi commands, and use Lua to do comparison, loops, data manipulation, wait delays, conditional delays, write stuff to disk, etc.. The possibilities are almost endless.If you have any questions regarding how to do specific things in Lua feel free to ask here, I will try help best I can.

author: lundmar
author_rank: Frequent Contributor
timestamp: March 13, 2018, 08:48:27 pm
content: Take a look here, Siglent wrote a post about LXI Toolshttps://www.siglentamerica.com/application-note/lxi-toolsThere is also a short video demonstrating how to use LXI Tools with Siglent instruments:

author: lundmar
author_rank: Frequent Contributor
timestamp: March 15, 2018, 12:22:17 am
content: New releases available:https://github.com/lxi-tools/lxi-tools/releases/tag/v1.19https://github.com/lxi-tools/liblxi/releases/tag/v1.12This release includes bug fixes and adds support for Lua scripting which is very useful for instrument automation.It is ready to install via the snap stable channel:Code:$ snap install lxi-tools

author: Dwaine
author_rank: Frequent Contributor
timestamp: March 15, 2018, 01:08:17 am
content: Nice work... Using it now...

author: lundmar
author_rank: Frequent Contributor
timestamp: March 15, 2018, 06:37:18 pm
content: Quote from: Dwaine on March 15, 2018, 01:08:17 amThanksFor those who might start to play with the new lxi Lua scripting feature here are a few example scripts:https://github.com/lxi-tools/lxi-tools/blob/master/test/test.luahttps://github.com/lxi-tools/lxi-tools/blob/master/test/basic-tests.luaAnd of course, to run a script simply do e.g.:Code:$ lxi run basic-tests.lua

author: lundmar
author_rank: Frequent Contributor
timestamp: March 17, 2018, 11:29:58 am
content: I've found some interesting lxi-tools snap statistics:More statistics are available here:https://dashboard.snapcraft.io/snaps/lxi-tools/statsOf course, the statistics only include snap users and not those who use it via other package managers or manual install.I think it is a solid start for this type of project, especially considering it is currently only available for *nix platforms.

author: N0NB
author_rank: Contributor
timestamp: March 18, 2018, 11:28:49 am
content: Arghh!I'm getting tripped up by Lua in updating my SlackBuild script for lxi-tools 1.19. The configure script halts as Lua5.2 is not found and the SlackBuilds.org site has version 5.1.5 available. I presume this version is too old for various and sundry reasons?I've never used Lua knowingly, but I found when writing a SlackBuild script for Hamlib (someone else contributed Swig Lua bindings). The impression I got is that Lua seems to be rather incompatible between minor versions. I hope I am wrong about that.I suppose I can try installing Lua 5.1.5 and see if lxi-tools will build and run against it.

author: N0NB
author_rank: Contributor
timestamp: March 18, 2018, 12:29:11 pm
content: Well, I did get lxt-tools to compile with Lua 5.1.5. No telling if it works or not!I had to patch configure.ac as follows:Code:$ diff -u /tmp/SBo/lxi-tools-1.19/configure.ac ./configure.ac--- /tmp/SBo/lxi-tools-1.19/configure.ac 2018-03-10 18:54:41.000000000 -0600+++ ./configure.ac 2018-03-18 07:21:43.825850367 -0500@@ -14,8 +14,8 @@AC_CHECK_LIB(, , [], [AC_MSG_ERROR(libreadline not found)])AC_CHECK_LIB(, , [], [AC_MSG_ERROR(liblxi not found)])-# Check for Lua 5.2-PKG_CHECK_MODULES(, [lua5.2])+# Check for Lua 5.1 or newer+PKG_CHECK_MODULES(, [lua >= 5.1])# Handle bash completionAC_ARG_WITH([bash-completion-dir],and runautoreconf --force -v --installto rebuildconfigure.It built fine but with the following warnings:Code:CC libapp_a-lxilua.olxilua.c: In function ‘connect’:lxilua.c:51:26: warning: passing argument 1 of ‘lxi_connect’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]device = lxi_connect(address, 0, NULL, option.timeout, VXI11);^In file included from lxilua.c:36:0:/usr/include/lxi.h:63:5: note: expected ‘char *’ but argument is of type ‘const char *’int lxi_connect(char *address, int port, char *name, int timeout, lxi_protocol_t protocol);^lxilua.c: In function ‘scpi’:lxilua.c:83:31: warning: passing argument 2 of ‘lxi_send’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]length = lxi_send(device, command, strlen(command), option.timeout);^In file included from lxilua.c:36:0:/usr/include/lxi.h:64:5: note: expected ‘char *’ but argument is of type ‘const char *’int lxi_send(int device, char *message, int length, int timeout);^lxilua.c:92:18: warning: passing argument 1 of ‘question’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]if (question(command))^lxilua.c:42:12: note: expected ‘char *’ but argument is of type ‘const char *’extern int question(char *string);^lxilua.c: In function ‘scpi_raw’:lxilua.c:132:31: warning: passing argument 2 of ‘lxi_send’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]length = lxi_send(device, command, strlen(command), option.timeout);^In file included from lxilua.c:36:0:/usr/include/lxi.h:64:5: note: expected ‘char *’ but argument is of type ‘const char *’int lxi_send(int device, char *message, int length, int timeout);^lxilua.c:141:18: warning: passing argument 1 of ‘question’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]if (question(command))^lxilua.c:42:12: note: expected ‘char *’ but argument is of type ‘const char *’extern int question(char *string);^I don't know if those warnings are simply due to the older version of Lua I'm compiling against or what. As the compiler didn't error out, I'm inclined to think that Lua support will probably work.

author: lundmar
author_rank: Frequent Contributor
timestamp: March 18, 2018, 02:04:53 pm
content: Quote from: N0NB on March 18, 2018, 12:29:11 pmPerfectly fine patchI simply had it fixed at Lua 5.2 but I assume it will work fine with all 5.x. If you feel like it I invite you to create a github pull request to push your change upstream. Or I can apply the patch on your behalf.Quote from: N0NB on March 18, 2018, 12:29:11 pmFYI - for convenience, same as running ./autogen.shQuote from: N0NB on March 18, 2018, 12:29:11 pmThose are warnings that are yet to be fixed. You can ignore them for now. To test you could start by running the basic Lua test script:Code:lxi run test/basic-tests.lua

author: lundmar
author_rank: Frequent Contributor
timestamp: March 18, 2018, 02:13:32 pm
content: Quote from: N0NB on March 18, 2018, 11:28:49 amThere is an overview of Lua 5.x version changes here:https://www.lua.org/versions.htmlFor now I think it will work to require minimum 5.1. Sure there are some nice features added in 5.2 and 5.3 but I think most can do without them. In case a script needs e.g. Lua 5.3 it can add a check and opt out in case it is not available.

author: N0NB
author_rank: Contributor
timestamp: March 18, 2018, 05:05:08 pm
content: Quote from: lundmar on March 18, 2018, 02:04:53 pmGo ahead and apply it, Martin.Quote from: lundmar on March 18, 2018, 02:04:53 pmAs I'm working from your release tarballs, that script is not included, but it's no more complicated to simply call autoreconf from the SlackBuild script.Quote from: lundmar on March 18, 2018, 02:04:53 pmI see that is in the Git repository but not in the 1.19 release tarball. It would be useful to include the test script in the 1.20 release tarball.Edit:The basic-test.lua script ran without error using Lua 5.1.5, so it will likely work just fine.

author: lundmar
author_rank: Frequent Contributor
timestamp: March 18, 2018, 05:57:07 pm
content: Quote from: N0NB on March 18, 2018, 05:05:08 pmI tested the change on Ubuntu/Debian and unfortunately it fails so a bit more rework is required. Debian/Ubuntu supports parallel lua installations which introduces separate named pkgconfig lookup names, not "lua" but "lua5.2", "lua5.3" etc. basically invalidating any possibility for a single version check.EDIT:Fixed inhttps://github.com/lxi-tools/lxi-tools/commit/beddd9316a3e0cc46ad9023013a31ae94b3c4f33Quote from: N0NB on March 18, 2018, 05:05:08 pmOh, I've forgot to include them.EDIT:FixedQuote from: N0NB on March 18, 2018, 05:05:08 pmGreat - lets assume it works.

author: N0NB
author_rank: Contributor
timestamp: March 20, 2018, 12:26:44 pm
content: An interesting issue I am seeing has to do with my main Slackware 14.2 desktop which is running the avahi daemon cannot discover the 'scope. However, in a Slackware 14.2 VM where I have avahi installed for building lxi-tools, but not running, I can access the 'scope just fine.I know that avahi is working as I am using it to play audio over to my MythTV box using PulseAudio. Also the avahi browser utility shows a bunch of mDNS stuff from the network.I have to admit that I am far from knowledgeable regarding mDNS and even less so in beginning to troubleshoot it.

author: lundmar
author_rank: Frequent Contributor
timestamp: March 20, 2018, 04:18:49 pm
content: Quote from: N0NB on March 20, 2018, 12:26:44 pmI assume your have built lxi-tools on each machine in which case you have to make sure that libavahi-core-dev libavahi-common-dev libavahi-client-dev or similar is installed so that the configure script enables the mDNS feature.For some unknown reason I decided to make mDNS an optional feature. I think I will likely change it to a mandatory feature in the future.

author: N0NB
author_rank: Contributor
timestamp: March 20, 2018, 05:23:18 pm
content: I double checked and the configure script is properly finding the avahi headers and that liblxi and lxi are linked to the avahi libraries on both the desktop and the VM. As both the desktop and VM have the same version of avahi and other libraries installed, the only difference is that the avahi daemon is running on the desktop and not running in the VM.Here is the output fromlxi discoveron the desktop:Code:$ lxi discoverSearching for LXI devices - please wait...Broadcasting on interface loBroadcasting on interface eth0No devices foundCode:$ lxi discover -mSearching for LXI devices - please wait...No services foundAnd the same as run in the VM:Code:$ lxi discoverSearching for LXI devices - please wait...Broadcasting on interface loBroadcasting on interface eth0Found "Siglent Technologies,SDS1202X-E,SDS1EBBXXXXXXX,5.1.3.13" on address 192.168.X.XFound 1 deviceCode:$ lxi discover -mSearching for LXI devices - please wait...Error: Failed to create client: Daemon not runningNo services foundObviously lxi does not find the avahi daemon in the VM but raises no such complaint on the desktop.I am puzzled that even when the-mis not used, lxi cannot discover the 'scope.I need to do some more studying of Wireshark to try and isolate any network traffic from lxi as my network interface is too busy to catch any lxi traffic just by watching it scroll by.

author: lundmar
author_rank: Frequent Contributor
timestamp: March 20, 2018, 05:31:16 pm
content: Quote from: N0NB on March 20, 2018, 05:23:18 pmHave you tried starting/restarting the avahi daemon manually before calling lxi?

author: N0NB
author_rank: Contributor
timestamp: March 20, 2018, 06:25:11 pm
content: False alarm. It looks like a firewall rule is blocking the reply from the 'scope.I thought I had looked in the logs a few days ago but Slackware logs a bit differently than Debian.As I use Shorewall, I added the following rule to allow the 'scope's traffic to pass through:Code:ACCEPT net:192.168.X.0/24 $FW udp - 111All is well now:Code:$ lxi discoverSearching for LXI devices - please wait...Broadcasting on interface loBroadcasting on interface eth0Found "Siglent Technologies,SDS1202X-E,SDS1EBBXXXXXXX,5.1.3.13" on address 192.168.X.XFound 1 deviceThe key for me figuring this out was working through the liblxi source and seeing that the network braodcast address is obtained and used for the polling. The 'scope replies but since there is no tracking from a SYN packet, the response was blocked (at least that's how I understand it). I found the firewall logging is placed in/var/log/messagesand then found the firewall had blocked the 'scope's address. On Slackwaredmesgalso includes this output.Carry on!

author: lundmar
author_rank: Frequent Contributor
timestamp: March 20, 2018, 07:19:46 pm
content: Quote from: N0NB on March 20, 2018, 06:25:11 pmOk. Different distributions different problems

author: lundmar
author_rank: Frequent Contributor
timestamp: May 05, 2018, 02:34:46 pm
content: Hi guys,Just announcing new releases of lxi-tools and liblxi:https://github.com/lxi-tools/lxi-tools/releases/tag/v1.20https://github.com/lxi-tools/liblxi/releases/tag/v1.13These releases mostly include various bug fixes. Perhaps the most noticeable fix is that now bash auto completion is working with the lxi snap command.Also, for those new to lua, I've addedhttps://github.com/lxi-tools/lxi-tools/blob/master/test/basic-tests.luawhich details concisely how to do basic stuff in Lua. Using this as inspiration you can create some very clean cut and powerful instrument control scripts for whatever purpose you need.Recently I've been busy with other stuff and haven't had much time to continue the development on lxi-tools. However, during my absence I see that there have been a steady increase in snap users which is great.Also, rumors are that there is someone out there who have ported lxi-tools to macOS!Hopefully they will contribute their changes back to the lxi-tools project to benefit everyone. Code contributions are welcome.

author: crispus
author_rank: Regular Contributor
timestamp: June 11, 2018, 07:39:00 am
content: Quote from: lundmar on March 13, 2018, 08:48:27 pmCongrats! Keep up the good work

author: lundmar
author_rank: Frequent Contributor
timestamp: June 11, 2018, 01:24:34 pm
content: Quote from: crispus on June 11, 2018, 07:39:00 amThanksThe next thing on the TODO list is improving the mDNS feature. I expect to add a new discover interface to liblxi which will make it possible for the lxi command line tool to select which network interface is broadcasted on. For example:Code:$ lxi discover --interface wlan0This way we can avoid broadcasting on all networks available. It will also speed up the discovery step.The mDNS feature in lxi-gui also needs some TLC.

author: crispus
author_rank: Regular Contributor
timestamp: June 26, 2018, 10:58:32 am
content: Did anyone tried to use measure item function on a DS1000z?Code::MEASure:ITEM OVERshoot,CHANnel2 /* Enable the overshoot measurement of CH2 */:MEASure:ITEM? OVERshoot,CHANnel2 /* The query returns 8.888889e-03 */I was trying to measure VPP on channel 1, but all it does is to show on the scope's screen the measurement...The query does not return anything...

author: lundmar
author_rank: Frequent Contributor
timestamp: June 30, 2018, 08:09:14 am
content: Quote from: crispus on June 26, 2018, 10:58:32 amI tried firing your commands and I get this:Code:$ lxi scpi --address 192.168.1.112 ":MEASure:ITEM OVERshoot,CHANnel2"$ lxi scpi --address 192.168.1.112 ":MEASure:ITEM? OVERshoot,CHANnel2"9.9E37

author: crispus
author_rank: Regular Contributor
timestamp: July 01, 2018, 09:26:34 am
content: Thanks for reply.As standalone commands it works. I was trying in interactive mode and it doesn't. (build from sources, v1.20)Code:$ src/lxi --versionlxi v1.20$ src/lxi scpi -a 192.168.1.149 -iConnected to 192.168.1.149Entering interactive mode (ctrl-d to quit)lxi> *IDN?RIGOL TECHNOLOGIES,MSO1104Z,DS1ZDxxxxxxxx,00.04.04.SP3lxi> :MEASure:ITEM? OVERshoot,CHANnel2lxi>$ src/lxi scpi -a 192.168.1.149 ":MEASure:ITEM? OVERshoot,CHANnel2"2.306453e-02

author: lundmar
author_rank: Frequent Contributor
timestamp: July 01, 2018, 11:53:16 am
content: Quote from: crispus on July 01, 2018, 09:26:34 amThanks for reporting the bug. Luckily it was a simple fix:https://github.com/lxi-tools/lxi-tools/commit/c244dbe573d191f8bd2513f0f61638209bc528dcI haven't tested it but it should do the trick

author: crispus
author_rank: Regular Contributor
timestamp: July 01, 2018, 12:17:50 pm
content: So quick. It works. Thanks.

author: lundmar
author_rank: Frequent Contributor
timestamp: July 08, 2018, 09:43:56 am
content: FYI - I've just pushed a new release of lxi-tools:https://github.com/lxi-tools/lxi-tools/releases/tag/v1.21It basically only includes the latest change to fix interactive mode when firing question SCPI commands. The main reason I'm pushing a new stable release is to update the lxi-tools snap on the stable release channel because some users have reported issues with missing fonts - an issue which is automagically fixed by an update because of some updated snapcraft infrastructure.

author: HoracioDos
author_rank: Frequent Contributor
timestamp: July 10, 2018, 12:57:21 pm
content: Quote from: lundmar on July 08, 2018, 09:43:56 amThis has been my preferred word for years. I see that's universal. Why everyone loves automagic solutions?

author: lundmar
author_rank: Frequent Contributor
timestamp: July 10, 2018, 02:53:12 pm
content: Quote from: HoracioDos on July 10, 2018, 12:57:21 pmEasy, everyone loves magic

author: lundmar
author_rank: Frequent Contributor
timestamp: August 17, 2018, 07:50:54 am
content: Here is a shout out and big thank you to Siglent for supporting the open source lxi-tools project!They have recently decided that we can keep the SDS1204X-E which was lent to us to support the ongoing development of lxi-tools. Seehttps://www.eevblog.com/forum/testgear/open-source-lxi-tools-and-liblxi-v1-0-released-for-gnulinux/msg1394796/#msg1394796The device has been very helpful for the development and testing of lxi-tools. It will now become a permanent part of a regression test setup to make sure lxi-tools will continue to work with Siglent devices.Personally I'm happy to finally see instrument manufacturers be serious about supporting open source - this way we will all get better tools for our instruments. It is also worth noticing that Siglent is very responsive to feedback from the EEVBlog forum users and I'm sure that has helped make their instruments better and more desirable. I wish more manufacturers would do the same. It's the new way of doing business. Good job Siglenthttps://www.siglentamerica.com/application-note/lxi-tools/https://www.siglentamerica.com/video/lxi-tools/List of lxi-tools sponsors:https://github.com/lxi-tools/lxi-tools#9-sponsors

author: lundmar
author_rank: Frequent Contributor
timestamp: August 17, 2018, 10:21:32 am
content: Just some interesting statistics retrieved from the snap system:This statistics only count snap installs, not lxi-tools installations installed via native distro packages.

author: cnkz
author_rank: Contributor
timestamp: September 12, 2018, 05:48:31 pm
content: I tried to compile the tools....First the install steps description in the readmes are not correct, they say:Code:./configure; make; make installBut there are no configure scripts...I think i need to use the autogen.sh scripts to generate the configure scripts but they do give errors:a) for liblxiCode:./autogen.shautoreconf: Entering directory `.'autoreconf: configure.ac: not using Gettextautoreconf: running: aclocal --forceautoreconf: configure.ac: tracingautoreconf: configure.ac: not using Libtoolautoreconf: running: /usr/bin/autoconf --forceconfigure.ac:22: error: possibly undefined macro: AC_ENABLE_SHAREDIf this token and others are legitimate, please use m4_pattern_allow.See the Autoconf documentation.configure.ac:23: error: possibly undefined macro: AC_ENABLE_STATICautoreconf: /usr/bin/autoconf failed with exit status: 1b) for lxitoolsCode:./autogen.shautoreconf: Entering directory `.'autoreconf: configure.ac: not using Gettextautoreconf: running: aclocal --forceautoreconf: configure.ac: tracingautoreconf: configure.ac: not using Libtoolautoreconf: running: /usr/bin/autoconf --forceautoreconf: running: /usr/bin/autoheader --forceautoreconf: running: automake --add-missing --copy --force-missingconfigure.ac:6: installing './ar-lib'configure.ac:6: installing './compile'configure.ac:4: installing './install-sh'configure.ac:4: installing './missing'src/Makefile.am:2: error: library used but 'RANLIB' is undefinedsrc/Makefile.am:2: The usual way to define 'RANLIB' is to add 'AC_PROG_RANLIB'src/Makefile.am:2: to 'configure.ac' and run 'autoconf' again.src/Makefile.am: installing './depcomp'autoreconf: automake failed with exit status: 1Any idea how to fix that?

author: lundmar
author_rank: Frequent Contributor
timestamp: September 13, 2018, 08:13:01 am
content: Quote from: cnkz on September 12, 2018, 05:48:31 pmIt's because you pulled the git development code. What you want to do is download and use the release tarballs - only they include the configure script etc..If you don't want to bother with autotools I recommend simply installing lxi-tools via snap to get latest version:Code:$ snap install lxi-toolsIf you do insist on building from git source please see the top post in this thread where you will find a description of how to build from git source.

author: cnkz
author_rank: Contributor
timestamp: September 14, 2018, 08:25:15 pm
content: Thanks, i tried (first time) snap and it works.

author: lundmar
author_rank: Frequent Contributor
timestamp: September 15, 2018, 09:19:33 am
content: Quote from: cnkz on September 14, 2018, 08:25:15 pmGreatSnap is pretty cool - it is working on the most popular gnu/linux platforms and it makes it very easy for me to push updates to end users.

author: awallin
author_rank: Frequent Contributor
timestamp: September 24, 2018, 07:27:04 pm
content: There's now a quick hack at python bindings for liblxi over here:https://github.com/lxi-tools/python-liblxiif you are brave and want to test then:- checkout that repo- git submodule init&update- autogen and configure in the liblxi-dir- out of source cmake-build for the python moduleI did not have time to test with real hardware yet - may or may not work...do post issues and pull-requests on github if you find bugs or fix them!thanks, Anders.

author: lundmar
author_rank: Frequent Contributor
timestamp: April 13, 2019, 08:03:00 pm
content: For a while, the screenshot feature in the snap version of lxi-gui has been broken because of a bug revealed by an updated snap toolchain.This issue has now been solved and an updated lxi-tools snap is available.

author: lundmar
author_rank: Frequent Contributor
timestamp: May 01, 2019, 11:10:57 pm
content: Quote from: shodan@micron on April 26, 2019, 07:07:54 amGood stuffI'm glad liblxi seems to perform well for your data logger application. Using the rpi for a low cost data logger is an excellent idea.

author: enz
author_rank: Regular Contributor
timestamp: May 07, 2019, 07:48:15 am
content: Today I cloned the lxi-tools git repository.I tried to compile the lxi-gui under windows with QT-Creator.But I got an error about a missing include file "lxi.h".It is included from main.cpp and mainwindow.cpp.I couldn't find it in the project directory tree.Maybe it is missing in the project?Best regards,Martin

author: lundmar
author_rank: Frequent Contributor
timestamp: May 07, 2019, 08:27:45 pm
content: Quote from: enz on May 07, 2019, 07:48:15 amHi enz,The applications in lxi-tools depend on liblxi so you need to go install liblxi first which provides lxi.h.

author: enz
author_rank: Regular Contributor
timestamp: May 08, 2019, 11:19:59 am
content: Quote from: lundmar on May 07, 2019, 08:27:45 pmOf course, thanks for the hint.

author: lundmar
author_rank: Frequent Contributor
timestamp: May 22, 2019, 08:22:59 pm
content: Quote from: shodan@micron on May 19, 2019, 06:07:20 amCool - I'm curious, what kind of sampling rates are you getting using liblxi on the pi to query the temperatures from your instruments?

author: ralphrmartin
author_rank: Frequent Contributor
timestamp: October 07, 2020, 04:19:27 pm
content: Hi Lundmarthree things, if you are still there and listening:(1) Discover and SCPI commands seem to work for Rigol RSA3000 series spectrum analyzersbut screen shot does not.(2) If you have a 4K display, the GUI is too small to read comfortably - is there any chance of scaling it up for high dpi displays?(3) While lxi-tools reads output fine with from the RSA3000, if I simply telnet to its LXI port, the output is garbled: it seems I just get the first character repeated, rather than the expected string, so for example, if I do *IDN? the output is RRRRRRRRRRRRRRRRRRRRRRRR some large number of times rather than the correct string saying Rigol... whatever. Can you enlighten me as to what the issue is here? Is there anything I can do to make simple telnet output the correct strings instead?Thanks.

author: tv84
author_rank: Super Contributor
timestamp: October 07, 2020, 04:29:46 pm
content: Quote from: ralphrmartin on October 07, 2020, 04:19:27 pmThis must be a bug. Which renders the SCPI output useless... If you can't even do the standard *IDN?...

author: ralphrmartin
author_rank: Frequent Contributor
timestamp: October 07, 2020, 05:45:27 pm
content: But the interesting thing is that lxi-tools gets the correct output from the device, e.g. showing the correct identification presumably in response to an *IDN?Rigol's own ultra sigma also gives the correct output too.It's only a direct telnet connection that returns this garbled output (verified from a Mac (telnet), a PC (putty) and a Linux box (telnet) - all the same).Input is clearly going into the device OK, e.g. I can send commands from telnet to turn things on and off and see the expected responses.Other commands which generate output seem to do the same, sending strings with the correct first character which is then repeated. E.g. If I query the impedance, I get 55, not 50.How can lxi-tools be getting the correct output, if telnet is not?

author: lundmar
author_rank: Frequent Contributor
timestamp: December 26, 2021, 04:44:51 am
content: Quote from: ralphrmartin on October 07, 2020, 04:19:27 pmI'm back - I've been busy IRL and neglecting the lxi-tools project for a long time but now I'm back and some interesting changes are comingQuoteI'm sure we can figure that one out - just takes a little digging in the RSA 3000 programmers guide and an update to one of the existing rigol screenshot plugins or maybe a new one. Feel free to create a bug report / feature request in the github issue tracker:https://github.com/lxi-tools/lxi-tools/issuesQuoteYes, hi-dpi scaling support is coming. One of the big changes coming is actually a total rewrite of the lxi-gui application. I've kicked out the old QT based lxi-gui application in favour of a much more modern looking GTK4 based application and that also implies hi-dpi support. You can take a peak at some screenshots of the new lxi-gui application here:https://github.com/lxi-tools/lxi-toolsPart of the move to the new lxi-gui is also to make it easy to install lxi-gui on Windows with the new WSL2/wayland feature.QuoteYeah, that wont work. LXI compatible instruments uses either VXI11 or raw/TCP for communicating commands - you likely telnetted into the VXI11 port and so you get gobbledygook.

author: RoGeorge
author_rank: Super Contributor
timestamp: December 26, 2021, 10:14:15 am
content: Thank you for the new additions, I'm eager to try them (probably next year, my desktop install just died 2 days ago).So far the new lxi/GUI looks good by the github pics!As a feature request, will it be possible to have the LXI GUI as a native install in the repositories, too, same as the lxi-tools, please?I mean, in the latest Ubuntu 20.04.3 LTS repositories, the lxi-tools can be installed with "sudo apt install lxi-tools", while the GUI can only be installed as a "snap" install. Some users are trying to avoid snap install for various reasons, I don't like snaps mostly because snap installed programs, when launched, are starting visible slower than a native install.

author: lundmar
author_rank: Frequent Contributor
timestamp: December 26, 2021, 01:54:23 pm
content: Quote from: RoGeorge on December 26, 2021, 10:14:15 amThanks, I think it is looking pretty good. Writing it in GTK4 has been a nice experience - modern GUI toolkits have improved a lot. The application is really fast now because it renders in OpenGL/GLES/Vulkan and the modern toolkit has many cool subtle features never seen in any classic GUI.QuoteYes, once I make an official release the package maintainers will pick them up when they have time and eventually you will see lxi-tools as native packages in various distributions. Snap is just a way to distribute a release quickly but I am aware of the performance hit that snaps take but for this type of application it matters less.

author: N0NB
author_rank: Contributor
timestamp: December 27, 2021, 07:24:21 pm
content: Going from Qt to GTK is definitely not a path well traveled that I've seen. Regardless, good to see you're back to coding again.

author: lundmar
author_rank: Frequent Contributor
timestamp: December 27, 2021, 09:49:53 pm
content: Quote from: N0NB on December 27, 2021, 07:24:21 pmI would normally agree, but GTK4 is changing things up and is becoming a very solid alternative to QT. Much improved API, performance, and debug features. Also, I feel GTK4 is doing stuff more intuitively, the Linux way.Let me put it this way. I would never have considered porting anything to GTK3.

author: lundmar
author_rank: Frequent Contributor
timestamp: January 04, 2022, 03:38:42 am
content: Hi guys,Happy new year 2022!If you feel brave you are welcome to try out the newly rewritten lxi-gui application via the snap edge channel:Code:$ snap install lxi-tools --edge$ snap connect lxi-tools:avahi-controlIt is work in progress and as long as it is on the snap edge channel it will be subject to changes and bugs. Try on your own risk.Basic features are working and I am currently working on the script feature.Here are a few updated screenshots to provide a quick look at the new GUI interface:FYI: The old application is still available on the snap stable channel./Martin

author: N0NB
author_rank: Contributor
timestamp: January 09, 2022, 01:57:54 am
content: Well, it finds my Siglent SDS1202X-E DSO but nothing else seems to work. I tried the :VERSion? button followed by the Send button and get a "Error: Read error (timeout)" in the terminal from where I started lxi-gui (I've not restarted to allow the snap system to integrate with Gnome).I am using Debian 11.

author: lundmar
author_rank: Frequent Contributor
timestamp: January 09, 2022, 02:08:59 am
content: Quote from: N0NB on January 09, 2022, 01:57:54 amThat means you should be able to send "*IDN?" command to your instrument successfully using the SCPI interface.Most of the SCPI 1999.0 commands must be used in some combination. Try send ":system:version?" like you see in the screenshots.":version?" alone is not supported by the standards AFAIK.

author: lundmar
author_rank: Frequent Contributor
timestamp: January 09, 2022, 04:31:59 am
content: The new lxi-gui scripting feature is coming along nicely:The new scripting feature is going to become very powerful for such a simple tool. It will be great for quickly managing many network attached instruments and do all sorts of data processing and presentation.

author: RoGeorge
author_rank: Super Contributor
timestamp: January 10, 2022, 05:49:58 pm
content: Happy New Year to you, too!I was ready to kindly ask for a new feature request: Python support, only to discover today you already have this on github, wow!Thank you very much for the new python module "lxi.py":https://github.com/lxi-tools/python-liblxiSince I didn't repair my damaged Ubuntu install yet, I'm still running on a FreeBSD pendrive, so I thought I'll test if lxi-tools can work in FreeBSD, too. So far, good news:- liblxi is already in the official binary repository of "FreeBSD 13.0-RELEASE-p4". In FreeBSD, lxitools can now be installed online with:Quote- and it's WORKING in FreeBSD, tested it from Python, with "import lxi", and it could "*IDN?" my Rigol DS1054z. Python support is a great feature, thank you!(also made a pull request to python-liblxi, my first pull-request ever, so please don't whack me if I did something stupid there)

author: N0NB
author_rank: Contributor
timestamp: January 10, 2022, 06:43:28 pm
content: Quote from: lundmar on January 09, 2022, 02:08:59 amI am not familiar at all with the SCPI commands, etc. However, there does seem to be a bit working now as shown by this screenshot:I was also able to capture this shot from the 'scope via the program:

author: tautech
author_rank: Super Contributor
timestamp: January 10, 2022, 08:14:31 pm
content: Quote from: N0NB on January 10, 2022, 06:43:28 pmYes I struggle with this stuff a bit too however we have someone here to thank for your SDS1202X-E definition to use with lundmar's cool program.Here's the latest programming manual for your scope:https://int.siglent.com/u_file/document/SDS1000%20Series&SDS2000X&SDS2000X-E_ProgrammingGuide_PG01-E02D.pdfHowever it does include commands for all the other Siglent models but also tables of command compatibility and responses.

author: lundmar
author_rank: Frequent Contributor
timestamp: January 10, 2022, 09:04:47 pm
content: Quote from: RoGeorge on January 10, 2022, 05:49:58 pmHa ha - yes, I forced myself to sit down and write the python bindings on request from a good engineer friend of mine to make it usable in his work environment. It is no secret that I am no fan of python (slow, horrible syntax) but it is what some people want, so here it finally is!All I'm missing is to implement the discover feature for the bindings - I will eventually add that binding unless contributors beat me to itQuoteYou're welcome. Now that liblxi is available on most platforms, the python bindings should work on most systems.QuoteYes, I see it. Already merged. Thank you!Perfect first github PR - keep em coming

author: lundmar
author_rank: Frequent Contributor
timestamp: January 10, 2022, 09:18:58 pm
content: Quote from: N0NB on January 10, 2022, 06:43:28 pmGoodQuoteGreat, I just fixed the screenshot feature for people using the snap. It works fine on my local system but when built in the older snap environment it failed because some GTK image loaders failed to load. With the help of werwaswarum from Github, who reported the issue, we got it sorted out.Now, we just need more testers and more equipment so we can broaden the lxi-tools instrument support.

author: N0NB
author_rank: Contributor
timestamp: January 12, 2022, 02:17:54 pm
content: A bit off-topic, but as I am using the Snap (only app so far) does it update automatically or is there a command I need to issue to pull an update?

author: lundmar
author_rank: Frequent Contributor
timestamp: January 12, 2022, 03:03:03 pm
content: Quote from: N0NB on January 12, 2022, 02:17:54 pmIt updates automatically but you can force an update using the following command:Code:$ snap refreshIf you want to know which version you have installed you can do:Code:$ snap info lxi-tools

author: lundmar
author_rank: Frequent Contributor
timestamp: January 12, 2022, 06:24:15 pm
content: I just got approval of auto-connection of avahi-control for the lxi-tools snap. This means that if you want to try out the development version of lxi-tools you can now install it with a single command like so:Code:$ snap install lxi-tools --edgeNo more need for the "snap connect ..." command.The new lxi-gui is in good shape. I'm currently working on refining the script feature before the upcoming v2.0 release.

author: lundmar
author_rank: Frequent Contributor
timestamp: January 16, 2022, 06:13:58 pm
content: I've just added a new feature to lxi-gui which allows scripts to sample data from instruments and plot it in a nice graphical chart. The chart is updated live as the data comes in.This feature is leaps better than the old rigid lxi-gui "Data Recorder" feature that was inflexible and didn't really work well. This new way of scripting a data logger / recorder is the right way to do it. It's a little more complex because it is scripted but I think the way I've made the interface with lua makes it really simple! I think most people with little to no scripting experience will still understand.Here are a couple of examples of the new feature in action:

author: N0NB
author_rank: Contributor
timestamp: January 16, 2022, 06:34:26 pm
content: Looks good.I think you're said the script language is Python, but what I see doesn't look like the Python I know. I was guessing it to be LUA which seems to be popular for embedded scripting these days.Please correct me and explain the syntax.

author: lundmar
author_rank: Frequent Contributor
timestamp: January 16, 2022, 07:33:18 pm
content: Quote from: N0NB on January 16, 2022, 06:34:26 pmCorrect, it is Lua.If you are not familiar with Lua you can a find this quick guidehttps://github.com/lxi-tools/lxi-tools/blob/master/test/basics.luawhich explains the basic primitives - it's very easy and elegant and offers very fast execution. The new lxi-gui script functions such as clock_new(), chart_new(), connect() etc. will be documented before the upcoming v2.0 release. For now, more examples can be found here:https://github.com/lxi-tools/lxi-tools/tree/master/testThere really is no limit to what kind of GUI elements we can attach to the scripting language to aid what we want to do with our instruments. At first I expect more chart types to be added.

author: lundmar
author_rank: Frequent Contributor
timestamp: January 16, 2022, 10:57:01 pm
content: Quote from: N0NB on January 16, 2022, 06:34:26 pmFYI - the lxi-tools specific lua API is now documented here:https://github.com/lxi-tools/lxi-tools/blob/master/doc/lua-api.txt

author: lundmar
author_rank: Frequent Contributor
timestamp: January 25, 2022, 08:28:12 pm
content: I've implemented a few different chart types - should be good for representing various data types.So now you can retrieve data from your instrument and represent it live in e.g. a linear gauge for quick monitoring.If anyone can think of other useful chart types to add for your instrument feel free to come with suggestions.

author: lundmar
author_rank: Frequent Contributor
timestamp: January 27, 2022, 06:10:41 pm
content: So, I have finally arrived at the point where I have implemented the required features to produce the perfect example on how to use the lxi-gui script feature as I envision it.The following screenshot shows how one can easily create a script that retrieves voltage samples from a DC power supply for 100 seconds while drawing a live chart of the incoming data and finally save the sampled data to CSV and PNG files!I do not believe it can be done much simpler than this! It is a very clean cut environment that even novice script writers can use. However, it also allows for experienced programmers to make some pretty cool and complex scripts to fit their needs.

author: lundmar
author_rank: Frequent Contributor
timestamp: February 02, 2022, 12:38:20 am
content: Now that lxi-tools v2.0 is released I think it is time to retire this v1.0 thread.I suggest moving tohttps://www.eevblog.com/forum/testgear/open-source-lxi-tools-v2-0-released/for future lxi-tools discussions.Thanks!

author: RoGeorge
author_rank: Super Contributor
timestamp: February 02, 2022, 08:39:07 am
content: The drawback is that everybody who posted here, won't stay updated with the new thread unless they write something there, in the new thread, a drawback of SMF Forums platform, there is no "subscribe to thread" button.Just FYI, alternatives to making a new thread by changing the title, could be:- any OP title can be edited by the OP, either to change it only in the OP message, or to make it change along all the existing replies, along the whole thread.- at any reply, anybody replying can change the "Subject:" textbox during a reply, for example I've made this post to say v2.0, to bamboozle everyone.Thank you for lxi 2.0, see you there!

author: lundmar
author_rank: Frequent Contributor
timestamp: February 05, 2022, 06:43:43 pm
content: Quote from: RoGeorge on February 02, 2022, 08:39:07 amRight, oh well. We'll do that next time. I'm fine with letting this one RIP.Moving tohttps://www.eevblog.com/forum/testgear/open-source-lxi-tools-v2-0-released/

author: MikeLemon1
author_rank: Newbie
timestamp: May 01, 2024, 11:05:42 am
content: does it work with MDO34 / MDO3000?

author: lundmar
author_rank: Frequent Contributor
timestamp: May 25, 2024, 08:16:13 pm
content: Quote from: MikeLemon1 on May 01, 2024, 11:05:42 amYes, lxi-tools should work fine with both as they are LXI certified instruments, at least for discover and scpi.