Poll

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

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

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

0 Members and 1 Guest are viewing this topic.

Offline lundmarTopic starter

  • Frequent Contributor
  • **
  • Posts: 436
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #300 on: May 07, 2019, 08:27:45 pm »
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

Hi enz,

The applications in lxi-tools depend on liblxi so you need to go install liblxi first which provides lxi.h.

https://lxi-tools.github.io - Open source LXI tools
https://tio.github.io - A simple serial device I/O tool
 

Online enz

  • Regular Contributor
  • *
  • Posts: 134
  • Country: de
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #301 on: May 08, 2019, 11:19:59 am »
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

Hi enz,

The applications in lxi-tools depend on liblxi so you need to go install liblxi first which provides lxi.h.

 :palm:
Of course, thanks for the hint.
 

Offline lundmarTopic starter

  • Frequent Contributor
  • **
  • Posts: 436
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #302 on: May 22, 2019, 08:22:59 pm »
I hope share first release on next week, now it testing and debugging stage.

First release is published.
I also add support of high precision TI TMP117 temperature sensor.

Now i have completed data logger solution with environment temperature measurement.

Cool - I'm curious, what kind of sampling rates are you getting using liblxi on the pi to query the temperatures from your instruments?
https://lxi-tools.github.io - Open source LXI tools
https://tio.github.io - A simple serial device I/O tool
 

Offline ralphrmartin

  • Frequent Contributor
  • **
  • Posts: 480
  • Country: gb
    • Me
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #303 on: October 07, 2020, 04:19:27 pm »
Hi Lundmar

three things, if you are still there and listening:

(1) Discover and SCPI commands seem to work for Rigol RSA3000 series spectrum analyzers  :-+ but 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.
 

Online tv84

  • Super Contributor
  • ***
  • Posts: 3218
  • Country: pt
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #304 on: October 07, 2020, 04:29:46 pm »
(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?

This must be a bug. Which renders the SCPI output useless... If you can't even do the standard *IDN?...  :palm:
 

Offline ralphrmartin

  • Frequent Contributor
  • **
  • Posts: 480
  • Country: gb
    • Me
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #305 on: October 07, 2020, 05:45:27 pm »
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?
« Last Edit: October 07, 2020, 05:52:24 pm by ralphrmartin »
 

Offline lundmarTopic starter

  • Frequent Contributor
  • **
  • Posts: 436
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #306 on: December 26, 2021, 04:44:51 am »
Hi Lundmar

three things, if you are still there and listening:

I'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 coming :)

Quote
(1) Discover and SCPI commands seem to work for Rigol RSA3000 series spectrum analyzers  :-+ but screen shot does not.

I'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/issues

Quote
(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?

Yes, 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-tools

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

Quote
(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?

Yeah, 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.
https://lxi-tools.github.io - Open source LXI tools
https://tio.github.io - A simple serial device I/O tool
 

Online RoGeorge

  • Super Contributor
  • ***
  • Posts: 6201
  • Country: ro
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #307 on: December 26, 2021, 10:14:15 am »
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.
 
The following users thanked this post: ralphrmartin

Offline lundmarTopic starter

  • Frequent Contributor
  • **
  • Posts: 436
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #308 on: December 26, 2021, 01:54:23 pm »
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!   :-+

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

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

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

https://lxi-tools.github.io - Open source LXI tools
https://tio.github.io - A simple serial device I/O tool
 

Offline N0NB

  • Contributor
  • Posts: 48
  • Country: us
  • Amateur radio op; electronics dabbler
    • N0NB.us
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #309 on: December 27, 2021, 07:24:21 pm »
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.
- Nate

The optimist proclaims we live in the best of all possible worlds.  The pessimist fears this is true.
 

Offline lundmarTopic starter

  • Frequent Contributor
  • **
  • Posts: 436
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #310 on: December 27, 2021, 09:49:53 pm »
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.

I 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.
https://lxi-tools.github.io - Open source LXI tools
https://tio.github.io - A simple serial device I/O tool
 
The following users thanked this post: N0NB

Offline lundmarTopic starter

  • Frequent Contributor
  • **
  • Posts: 436
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #311 on: January 04, 2022, 03:38:42 am »
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: [Select]
$ snap install lxi-tools --edge
$ snap connect lxi-tools:avahi-control

It 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
https://lxi-tools.github.io - Open source LXI tools
https://tio.github.io - A simple serial device I/O tool
 
The following users thanked this post: tautech, skench, phs

Offline N0NB

  • Contributor
  • Posts: 48
  • Country: us
  • Amateur radio op; electronics dabbler
    • N0NB.us
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #312 on: January 09, 2022, 01:57:54 am »
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.
- Nate

The optimist proclaims we live in the best of all possible worlds.  The pessimist fears this is true.
 

Offline lundmarTopic starter

  • Frequent Contributor
  • **
  • Posts: 436
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #313 on: January 09, 2022, 02:08:59 am »
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).

That 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.
https://lxi-tools.github.io - Open source LXI tools
https://tio.github.io - A simple serial device I/O tool
 

Offline lundmarTopic starter

  • Frequent Contributor
  • **
  • Posts: 436
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #314 on: January 09, 2022, 04:31:59 am »
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.
https://lxi-tools.github.io - Open source LXI tools
https://tio.github.io - A simple serial device I/O tool
 
The following users thanked this post: ralphrmartin, RoGeorge

Online RoGeorge

  • Super Contributor
  • ***
  • Posts: 6201
  • Country: ro
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #315 on: January 10, 2022, 05:49:58 pm »
Happy New Year to you, too!   :D




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

Since 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
pkg install liblxi

- 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  ;D)
« Last Edit: January 10, 2022, 06:03:15 pm by RoGeorge »
 

Offline N0NB

  • Contributor
  • Posts: 48
  • Country: us
  • Amateur radio op; electronics dabbler
    • N0NB.us
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #316 on: January 10, 2022, 06:43:28 pm »

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

I 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:



- Nate

The optimist proclaims we live in the best of all possible worlds.  The pessimist fears this is true.
 

Online tautech

  • Super Contributor
  • ***
  • Posts: 28368
  • Country: nz
  • Taupaki Technologies Ltd. Siglent Distributor NZ.
    • Taupaki Technologies Ltd.
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #317 on: January 10, 2022, 08:14:31 pm »
I 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:
Yes 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.pdf

However it does include commands for all the other Siglent models but also tables of command compatibility and responses.
Avid Rabid Hobbyist
Siglent Youtube channel: https://www.youtube.com/@SiglentVideo/videos
 
The following users thanked this post: N0NB

Offline lundmarTopic starter

  • Frequent Contributor
  • **
  • Posts: 436
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #318 on: January 10, 2022, 09:04:47 pm »
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-liblxi

Ha 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 it ;)

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!

You're welcome. Now that liblxi is available on most platforms, the python bindings should work on most systems.

Quote
(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  ;D)

Yes, I see it. Already merged. Thank you!

Perfect first github PR - keep em coming ;) 
« Last Edit: January 10, 2022, 09:32:02 pm by lundmar »
https://lxi-tools.github.io - Open source LXI tools
https://tio.github.io - A simple serial device I/O tool
 
The following users thanked this post: RoGeorge

Offline lundmarTopic starter

  • Frequent Contributor
  • **
  • Posts: 436
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #319 on: January 10, 2022, 09:18:58 pm »
I 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:

Good :-+

Quote
I was also able to capture this shot from the 'scope via the program:

Great, 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.
« Last Edit: January 10, 2022, 09:29:13 pm by lundmar »
https://lxi-tools.github.io - Open source LXI tools
https://tio.github.io - A simple serial device I/O tool
 

Offline N0NB

  • Contributor
  • Posts: 48
  • Country: us
  • Amateur radio op; electronics dabbler
    • N0NB.us
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #320 on: January 12, 2022, 02:17:54 pm »
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?
- Nate

The optimist proclaims we live in the best of all possible worlds.  The pessimist fears this is true.
 

Offline lundmarTopic starter

  • Frequent Contributor
  • **
  • Posts: 436
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #321 on: January 12, 2022, 03:03:03 pm »
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?

It updates automatically but you can force an update using the following command:

Code: [Select]
$ snap refresh

If you want to know which version you have installed you can do:

Code: [Select]
$ snap info lxi-tools
« Last Edit: January 12, 2022, 03:15:18 pm by lundmar »
https://lxi-tools.github.io - Open source LXI tools
https://tio.github.io - A simple serial device I/O tool
 
The following users thanked this post: N0NB

Offline lundmarTopic starter

  • Frequent Contributor
  • **
  • Posts: 436
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #322 on: January 12, 2022, 06:24:15 pm »
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: [Select]
$ snap install lxi-tools --edge

No 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.
https://lxi-tools.github.io - Open source LXI tools
https://tio.github.io - A simple serial device I/O tool
 

Offline lundmarTopic starter

  • Frequent Contributor
  • **
  • Posts: 436
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #323 on: January 16, 2022, 06:13:58 pm »
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:



« Last Edit: January 16, 2022, 06:16:25 pm by lundmar »
https://lxi-tools.github.io - Open source LXI tools
https://tio.github.io - A simple serial device I/O tool
 
The following users thanked this post: nctnico

Offline N0NB

  • Contributor
  • Posts: 48
  • Country: us
  • Amateur radio op; electronics dabbler
    • N0NB.us
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #324 on: January 16, 2022, 06:34:26 pm »
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.
- Nate

The optimist proclaims we live in the best of all possible worlds.  The pessimist fears this is true.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf