Author Topic: ngscopeclient - Ultimate acquisition software / protocol decoder / debug tool ?  (Read 31921 times)

0 Members and 1 Guest are viewing this topic.

Offline fredo_Topic starter

  • Regular Contributor
  • *
  • Posts: 207
  • Country: fr
I have build some projects in the past, but since that is quite a task, i would not consider doing it again, unless it had the properties said above ;-).
Well no need to build it from scratch, just join the dev team on Discord!: https://discord.com/channels/613131135903596547/776941750291267595
Everyone is very helpful and reactive there, so I'm sure you can contribute on DSlabs driver enhancements!  :-+
 
The following users thanked this post: egonotto

Online nctnico

  • Super Contributor
  • ***
  • Posts: 30421
  • Country: nl
    • NCT Developments
Just want to add that I just tried ngoscopeclient to decode 1Gbit ethernet and it works quite well in combination with my Lecroy 7300A (after I had added support which wasn't difficult given the similarity to oscilloscopes which where already supported). I'm impressed! This is definitely a good piece of software to have around.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 
The following users thanked this post: egonotto, 2N3055, Protegimus, Furna, fredo_

Offline Evi

  • Regular Contributor
  • *
  • Posts: 172
  • Country: ru
DHO804



 

Offline ignilux

  • Supporter
  • ****
  • Posts: 109
  • Country: us
I built this about 6 months ago without issues, but ended up uninstalling it due to lack of free time to tinker with such things. Saw it mentioned by Reps in his last Patreon video, so I thought I'd try it again. However, I seem to be unable to get past a deprecation warning in vulcan_hpp that throws an error due to -Werror=cpp:

Code: [Select]
[ 13%] Building CXX object lib/scopehal/CMakeFiles/scopehal.dir/cmake_pch.hxx.gch
In file included from /usr/include/vulkan/vulkan_hpp_macros.hpp:35,
                 from /usr/include/vulkan/vulkan.hpp:11,
                 from /usr/include/vulkan/vulkan_raii.hpp:11,
                 from /var/tmp/makepkg/scopehal-apps-git/src/build/lib/scopehal/CMakeFiles/scopehal.dir/cmake_pch.hxx:6,
                 from <command-line>:
/usr/include/c++/15.1.1/ciso646:46:4: error: #warning "<ciso646> is deprecated in C++17, use <version> to detect implementation-specific macros" [-Werror=cpp]
   46 | #  warning "<ciso646> is deprecated in C++17, use <version> to detect implementation-specific macros"
      |    ^~~~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [lib/scopehal/CMakeFiles/scopehal.dir/build.make:80: lib/scopehal/CMakeFiles/scopehal.dir/cmake_pch.hxx.gch] Error 1
make[1]: *** [CMakeFiles/Makefile2:1428: lib/scopehal/CMakeFiles/scopehal.dir/all] Error 2
make: *** [Makefile:166: all] Error 2

I've tried adding -DCMAKE_CXX_STANDARD=20 and -DCMAKE_CXX_STANDARD_REQUIRED=TRUE to force C++20 per this vulcan_hpp issue, but it appears to be using C++17 anyway. Also tried building with -Wno-error=cpp and/or -Wno-error, but that also fails. Any ideas?

Edit:
Building on Linux with Cmake 4.0.2 and GCC 15.1.1
 

Offline Furna

  • Frequent Contributor
  • **
  • Posts: 386
  • Country: it
  • I still don't know
I built this about 6 months ago without issues, but ended up uninstalling it due to lack of free time to tinker with such things. Saw it mentioned by Reps in his last Patreon video, so I thought I'd try it again. However, I seem to be unable to get past a deprecation warning in vulcan_hpp that throws an error due to -Werror=cpp:

Code: [Select]
[ 13%] Building CXX object lib/scopehal/CMakeFiles/scopehal.dir/cmake_pch.hxx.gch
In file included from /usr/include/vulkan/vulkan_hpp_macros.hpp:35,
                 from /usr/include/vulkan/vulkan.hpp:11,
                 from /usr/include/vulkan/vulkan_raii.hpp:11,
                 from /var/tmp/makepkg/scopehal-apps-git/src/build/lib/scopehal/CMakeFiles/scopehal.dir/cmake_pch.hxx:6,
                 from <command-line>:
/usr/include/c++/15.1.1/ciso646:46:4: error: #warning "<ciso646> is deprecated in C++17, use <version> to detect implementation-specific macros" [-Werror=cpp]
   46 | #  warning "<ciso646> is deprecated in C++17, use <version> to detect implementation-specific macros"
      |    ^~~~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [lib/scopehal/CMakeFiles/scopehal.dir/build.make:80: lib/scopehal/CMakeFiles/scopehal.dir/cmake_pch.hxx.gch] Error 1
make[1]: *** [CMakeFiles/Makefile2:1428: lib/scopehal/CMakeFiles/scopehal.dir/all] Error 2
make: *** [Makefile:166: all] Error 2

I've tried adding -DCMAKE_CXX_STANDARD=20 and -DCMAKE_CXX_STANDARD_REQUIRED=TRUE to force C++20 per this vulcan_hpp issue, but it appears to be using C++17 anyway. Also tried building with -Wno-error=cpp and/or -Wno-error, but that also fails. Any ideas?

Edit:
Building on Linux with Cmake 4.0.2 and GCC 15.1.1

I had the same error using GCC-15.1.0 ... it seems ngoscopeclient is explicitely avoiding C++20 since it is still targetting some platforms which only support C++17
I think GCC-15 doesn't support anymore C++17 and defaults to C++20

You can do one of the following:
- You can install an older GCC if your Linux distro permits and pass -DCMAKE_CXX_COMPILER=/bin/compiler/path
- Edit the code and make it compatible with C++20
- Use an alternative compiler i.e. CLANG and pass -DCMAKE_CXX_COMPILER=/bin/compiler/path

Indeed I am using MSYS2 on Windows and I am not very familiar with multiple GCC versions on the same installation (if it is possible at all).
So I tried sucesfully with CLANG version 20.1.3 (I obviously had to install all the lib dependencies for the MSYS CLANG environment.

Best
« Last Edit: May 10, 2025, 04:17:19 pm by Furna »
The sky above the port was the color of television, tuned to a dead channel.
 

Offline ignilux

  • Supporter
  • ****
  • Posts: 109
  • Country: us
Thanks for the suggestion, but it also fails with clang 19.1.7 for the same reason.
 

Offline ignilux

  • Supporter
  • ****
  • Posts: 109
  • Country: us
Aaand GCC 14.2.1 makes it past the original issue, but mold starts throwing linker errors for undefined symbols towards the end of the build. Starting when linking "curvetrace".
 

Offline Furna

  • Frequent Contributor
  • **
  • Posts: 386
  • Country: it
  • I still don't know
Aaand GCC 14.2.1 makes it past the original issue, but mold starts throwing linker errors for undefined symbols towards the end of the build. Starting when linking "curvetrace".

Undefined symbols smell as libraries version mismatch ... what Linux distro and what version?
The sky above the port was the color of television, tuned to a dead channel.
 

Offline ignilux

  • Supporter
  • ****
  • Posts: 109
  • Country: us
Archlinux with Linux 6.14.5. Fully up to date.
gcc14 and gcc14-libs both 14.2.1. Mold 2.39.0.

Edit: Versions for all dependencies:
Code: [Select]
ffts-git: r800.b22d839b61c-1
glew: 2.2.0-7
glfw: 3.4-2
gtkmm3: 3.24.10-1
libsigc++: 2.12.2-1
libsigc++-3.0: 3.6.0-1
openmp: 19.1.7-1
yaml-cpp: 0.8.0-2
catch2: 3.8.1-1
cmake: 4.0.2-1
git: 2.49.0-1
vulkan-headers: 1:1.4.313.0-1
liblxi: r224.b14716b-1
vulkan-icd-loader: 1.4.313.0-1
linux-gpib-dkms: 4.3.6-4
shaderc: 2025.2-2
spirv-tools: 1:1.4.313.0-1
« Last Edit: May 10, 2025, 08:08:16 pm by ignilux »
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 30421
  • Country: nl
    • NCT Developments
Note this line:

cc1plus: all warnings being treated as errors

The easiest way it is probably turning off the option -Werror=cpp
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline ignilux

  • Supporter
  • ****
  • Posts: 109
  • Country: us
The easiest way it is probably turning off the option -Werror=cpp

Yes, as mentioned I tried passing both "-Wno-error" and "-Wno-error=cpp" to cmake. Seemed to be ignored.
 

Offline Furna

  • Frequent Contributor
  • **
  • Posts: 386
  • Country: it
  • I still don't know
The easiest way it is probably turning off the option -Werror=cpp

Yes, as mentioned I tried passing both "-Wno-error" and "-Wno-error=cpp" to cmake. Seemed to be ignored.

Line 65 of the CMakeLists.txt add "-Wno-error=cpp" ...

Code: [Select]
- add_compile_options(-Werror -Wno-error=deprecated-declarations -Wno-error=unused-parameter -Wno-error=unused-variable -Wno-error=unused-result -Wno-error=shadow)
+ add_compile_options(-Werror -Wno-error=deprecated-declarations -Wno-error=unused-parameter -Wno-error=unused-variable -Wno-error=unused-result -Wno-error=shadow -Wno-error=cpp)


I just compiled it sucessfully with GCC.
Sorry if I didn't spot this before.
« Last Edit: May 10, 2025, 08:50:32 pm by Furna »
The sky above the port was the color of television, tuned to a dead channel.
 
The following users thanked this post: ignilux

Online nctnico

  • Super Contributor
  • ***
  • Posts: 30421
  • Country: nl
    • NCT Developments
No problem  ;D I had to hack around a bit to get it to compile on a slightly older Linux distribution. In my case the compiler didn't like ;; (double semicolons) at line endings but that was easy to edit out. Treating all warnings as errors might not be a really good idea for code which is supposed to be portable due to the wide variety of libraries out there.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline ignilux

  • Supporter
  • ****
  • Posts: 109
  • Country: us
Aha, I guess I understand cmake even less than I thought I did... And I didn't think I understood much!

One line of `sed` to modify the add_compile_options() and GCC 15 built successfully. Thanks, Furna!
 

Offline Fenstergucker

  • Regular Contributor
  • *
  • Posts: 115
  • Country: at
I was able to compile ngscopeclient on a Raspberry Pi P500 with the latest Raspberry Pi OS (Debian 13, Trixie, Wayland/labwc).
After modifying 'RohdeSchwarzOscilloscope.cpp', I was able to read data from my RTB2004. However, many functions are missing from the file.

However, there are display problems, see the attached screenshots with the demo oscilloscope. When I set the environment variable and use software rendering, the display is fine: '$ SCOPEHAL_VULKAN_DEVICE_OVERRIDE=1 ./ngscopeclient'.

Can you pass options during compilation to fix the problem, or is it simply due to the Raspberry Pi?

Peter
 

Offline fredo_Topic starter

  • Regular Contributor
  • *
  • Posts: 207
  • Country: fr
Nice job @Fenstergucker !
May I suggest to ask Andrew, the creator of the project, if he can help you?
You can contact him on #ngscopeclient discord channel : https://discord.gg/URuN2BuGwG
 

Offline Fenstergucker

  • Regular Contributor
  • *
  • Posts: 115
  • Country: at
Thanks, but I don't want to sign up for Discord.
I've started writing a new RTB2000 driver. I'm a beginner at C++, but maybe it'll turn out okay. I can learn a lot from your Magnova driver.

Peter
 

Offline fredo_Topic starter

  • Regular Contributor
  • *
  • Posts: 207
  • Country: fr
There is IRC if you prefer :
IRC: #scopehal on irc.libera.chat
 

Offline Fenstergucker

  • Regular Contributor
  • *
  • Posts: 115
  • Country: at
I don't know anything about C++ or the internal structure of ngscopeclient, but it's fun and progressing slowly.

A question about connecting via LXI. Should that work? The program crashes immediately when I try to connect.
I'm currently using the USBTMC connection, which works.

Peter
 
The following users thanked this post: fredo_

Offline fredo_Topic starter

  • Regular Contributor
  • *
  • Posts: 207
  • Country: fr
Maybe try "lan" (<ip>:5025) rather then LXI ?
 

Offline Fenstergucker

  • Regular Contributor
  • *
  • Posts: 115
  • Country: at
Thanks, yes, the LAN connection is working.

Peter
 

Offline Zucca

  • Supporter
  • ****
  • Posts: 5182
  • Country: it
  • EE meid in Itali
Late to the party, just collecting my jaw pieces from the floor.
White gloves luxury project, well done  :-+

Now I have to sell my MSOX3104T because is slow and buy an old 7000B Agilent  :horse:
Can't know what you don't love. St. Augustine
Can't love what you don't know. Zucca
 

Offline voltsandjolts

  • Supporter
  • ****
  • Posts: 3914
  • Country: gb
I'm new to ngscopeclient and I have a question that I hope someone more experienced may be able to answer;

TLDR: Can it make a histogram of pulse heights, like a pulse height analyser? I accept there would be performance limitation compared to real PHA due to increased deadtime from the limits of scope waveforms/sec and data transfer time.

In nuclear physics, a scintillator (which converts gamma radiation to visible light photons) is coupled to photomultiplier tube (which converts the photons to an avalanche of electrons) which then feeds a charge amplifier. The output from the charge amp is a voltage pulse, the amplitude of which is related to the energy of the original gamma particle. Looks like this (not my video);

youtube.com/watch?v=wL6uHwbstT0

A histogram of these pulse amplitudes gives a gamma energy spectrum, such as this;
https://www.gammaspectacular.com/blue/image/catalog/Co60_spectrum.jpg

Has this been done? Or would it be possible without source code changes?
 

Offline Fenstergucker

  • Regular Contributor
  • *
  • Posts: 115
  • Country: at
Quick update on the R&S RTB2000. The timebase, edge triggers, and analog channels are working. Capturing is also working, but no data is being read in yet.
I'm going to finish the digital channels first, and then I'll start having fun programming for data read-in.

Peter
 
The following users thanked this post: fredo_

Offline Wiljan

  • Regular Contributor
  • *
  • Posts: 237
  • Country: dk
Hi,

I just found the ngscopeclient software and it look as a very nice way to "just" use a scope as a frontend for the analysis on a PC , like the idea  :)

I did download the ngscopeclient-windows-x64-v0.1.msi precompiled from https://github.com/ngscopeclient/scopehal-apps/releases/ and installed on win10 and it start fine.

Did run the demo scope, all fine also did try to get some test data from https://github.com/ngscopeclient/scopehal-testdata

I have a Rigol MSO5072 with div options so it run as 4ch 200Mhz

When using it with the ngscopeclient it does connect but I only see 1 ch on the waveform and the Filter Graph show's 2 channels, and an error

How to get around the Error and rre there any way to tell the ngscopeclient that the Rigol MSO5072 actually does have 4 channels?

Txh for a great software



 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->