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

0 Members and 1 Guest are viewing this topic.

Online nctnico

  • Super Contributor
  • ***
  • Posts: 30424
  • Country: nl
    • NCT Developments
After spending two days searching for an error because the program crashed when I activated a channel while it was running, the analog channels now work correctly.
As long as no measurements are activated, the CPU is at 3% utilization and the GPU is always at ~28% utilization on the Raspberry Pi 500.
Since I'm struggling quite a bit with C++, I don't know how long it will take me to be able to read the digital channels.

Does anyone know if the bus decoders such as SPI work? I can't use a decoder with the analog channels. Do the decoders only work with the digital channels?
No. Digital decoders only work with digital data though. So for an analog channel as input, you need to use a level detector in series with the data so the analog domain is converted to 0 or 1. Use the threshold filter for this.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 
The following users thanked this post: Fenstergucker

Offline Fenstergucker

  • Regular Contributor
  • *
  • Posts: 115
  • Country: at
Thank you, that worked!

Peter
« Last Edit: December 27, 2025, 08:39:41 pm by Fenstergucker »
 

Offline Fenstergucker

  • Regular Contributor
  • *
  • Posts: 115
  • Country: at
The digital channels now work with the R&S RTB2000. Unfortunately, rendering with the GPU on the Raspberry Pi is unusable.

Peter
 
The following users thanked this post: Hydron, hotze

Offline Fenstergucker

  • Regular Contributor
  • *
  • Posts: 115
  • Country: at
I discovered that you can expand the dialogs for the triggers for new parameters. The edge trigger now displays the additional parameters when an RTB2000 is used.

What I haven't managed to do is create a fork on GitHub to upload the changes for the RTB2000. I can't get to grips with the submodules.
I have a local clone of ‘scopehal-apps’ and a branch with my changes. I just don't know how to share these changes yet.

Peter
 

Offline fredo_Topic starter

  • Regular Contributor
  • *
  • Posts: 207
  • Country: fr
Hi Peter,
You need to fork all the repos you want to change on your Github, you'll need at least :
- scopehal-apps (main repo containing ngscopeclient code + Gitub actions for CI)
- scopehal (there goes your driver)
- scopehal-docs (you'll need to update the doc with your driver's information to have your PR merged)
Then have your scopehal-apps fork point to your scopehal fork via git submodules.
Fredo_
 
The following users thanked this post: Fenstergucker

Online nctnico

  • Super Contributor
  • ***
  • Posts: 30424
  • Country: nl
    • NCT Developments
Hi Peter,
You need to fork all the repos you want to change on your Github, you'll need at least :
- scopehal-apps (main repo containing ngscopeclient code + Gitub actions for CI)
- scopehal (there goes your driver)
- scopehal-docs (you'll need to update the doc with your driver's information to have your PR merged)
Then have your scopehal-apps fork point to your scopehal fork via git submodules.
Fredo_
I don't know if you are the maintainer, but if so: I strongly recommend turning the project into a single git repository instead of a bunch or modules. You need all the modules anyway so having modules adds nothing. It only causes confusion and difficulties. Take the Linux kernel for example. Having a single repository makes it so much easier to work on and supply patches (especially for irregular contributors). Keep in mind most people likely contributing to ngscopeclient are electronics engineers. Not software engineers. And they won't be working on ngscopeclient for a long time. Just add/fix a driver or add (to) a filter and move on. If the choice is between working on an electronics project versus messing with git the electronics project is always going to win. I also tried to contribute to ngscopeclient in the past but my time really is too precious to mess with git modules. In short: I think ngscopeclient is a fantastic piece of software but the way it is organised as git modules makes it too hard to contribute to.
« Last Edit: January 03, 2026, 07:31:28 pm by nctnico »
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 
The following users thanked this post: jjoonathan

Offline fredo_Topic starter

  • Regular Contributor
  • *
  • Posts: 207
  • Country: fr
I don't know if you are the maintainer
I'm not, I'm just a contributor.
 
The following users thanked this post: nctnico

Offline Fenstergucker

  • Regular Contributor
  • *
  • Posts: 115
  • Country: at
I have now made a new attempt to fork, clone, modify, and republish ngscopeclient. I have documented all the steps.

Now the file ‘scopehal-apps/CMakeLists.txt’ has been changed for a new version number. This causes an error during compilation.
I have restored the old status, and compilation is now working again.

Peter

Raspberry Pi OS (Debian 13, arm64)
Code: [Select]
pedre@p500:~/Projekte/ngscopeclient/scopehal-apps/build $ cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF
-- The C compiler identification is GNU 14.2.0
-- The CXX compiler identification is GNU 14.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: /usr/bin/git (found version "2.47.3")
Git reports scopehal-apps version 9d627765
CMake Error at CMakeLists.txt:82 (message):
  Unrecognized version tag 9d627765 / 9d627765, can't create a VERSIONINFO
  from it.  Must be of format v1.2, v1.2.3, v1.2-rc3, v1.2.3-rc4
 

Offline fredo_Topic starter

  • Regular Contributor
  • *
  • Posts: 207
  • Country: fr
Now the file ‘scopehal-apps/CMakeLists.txt’ has been changed for a new version number. This causes an error during compilation.
I have restored the old status, and compilation is now working again.
You need to add a version tag on your schopehal-apps fork to solve that (like v0.1.1).
 
The following users thanked this post: Fenstergucker

Offline Fenstergucker

  • Regular Contributor
  • *
  • Posts: 115
  • Country: at
I have published my changes on GitHub ‘github.com/dreisiebner’, in ‘scopehal-apps’ and ‘scopehal’ in the branch ‘rtb2k’ for the R&S RTB2000 Oscilloscope.
Attached is my description and checklist. I will probably have to do this again, as I don't think it's right.

Peter
« Last Edit: January 04, 2026, 03:35:58 pm by Fenstergucker »
 
The following users thanked this post: fredo_

Offline fredo_Topic starter

  • Regular Contributor
  • *
  • Posts: 207
  • Country: fr
Good job @Fenstergucker !
When you feel ready hit the "This branch is 1 commit ahead" link on your repo and then hit the "Create Pull Request" button.
Do that for your scopehal fork first, and the for your scopehal-apps fork.
Use the Create Pull Request page to explain to Andrew what you did and the purpose of your PR.
Andrew will probably ask you to create a scopehal-doc PR too to add your driver to the documentation (see section-scope-drivers.tex file).
If you need more direct interaction with Andrew, contact him on the dedicated Discord/IRC channel, he's very responsive : https://www.ngscopeclient.org/getinvolved.
 
The following users thanked this post: Fenstergucker

Offline Xyphro

  • Frequent Contributor
  • **
  • Posts: 274
  • Country: de
    • www.gpibee.com

Hi!

Just want to say thank you for NgScope client and the Magnova scope support.
I just used it successfully to debug a CH32V317 / CH182 Ethernet auto negotiation issue.

NgScopeClient itself is not super stable on my PC - even without online connection to the instrument. STILL: It is very acceptable considering of how much it helped me: No need to write specific decoder plugins for logic analyzer or whatsoever to readout the link status words.
It is like an early version of Saleae logic. It was also not stable and crashed every now and then, but still: The value it added made it very acceptable :-)

Even a scope without backend (i.e. no screen, no buttons, etc), but a very quick waveform download support would be very acceptable with a tool like ngscope client.

Best regards,

Kai

Looking for a unique, cheap versatile USB to GPIB adapter with standard USBTMC interface? Build it yourself :-) https://github.com/xyphro/UsbGpib
Or get the more "pro" version: https://www.gpibee.com
Interested in I3C protocol? Check this out: https://github.com/I3CBlaster
 
The following users thanked this post: nctnico, fredo_

Offline Fenstergucker

  • Regular Contributor
  • *
  • Posts: 115
  • Country: at
Parameters marked as hidden are displayed in the trigger dialogs. For example, in the SlewRate or Window trigger ‘m_width.MarkHidden();’. I think someone forgot to hide the parameters. I copied the corresponding code from ‘FilterPropertiesDialog::DoRender()’ to ‘TriggerPropertiesDialog::Render()’ and the parameters are now hidden.

Perhaps someone can check whether this is correct.

Peter

Code: [Select]
TriggerProbertiesDialog.cpp
Line 219

if(StartSection("Parameters", graphEditorMode))
{
for(auto it = trig->GetParamBegin(); it != trig->GetParamEnd(); it++)
{
//Skip trigger level as that's redundant
if(it->first == "Level")
continue;

++ //Skip hidden parameters
++ if(it->second.IsHidden())
++ continue;

if(FilterPropertiesDialog::DoParameter(it->second, it->first, m_paramTempValues))
updated = true;
}

EndSection(graphEditorMode);
}
 

Offline Fenstergucker

  • Regular Contributor
  • *
  • Posts: 115
  • Country: at
I don't quite understand the triggers. Why are they so simple and have so few parameters? Are these triggers not customized for the instruments? Or does nobody use them?

Then the trigger level is always displayed as ‘Lower Level’. I see that this is specified in ‘Trigger.cpp’.
The Runt trigger inherits from TwoLevelTrigger, but there is also a parameter called ‘Lower Level’ created there. However, the parameter is not displayed, probably because of the same name. Only when I change the name in ‘TwoLevelTrigger.cpp’ does the parameter appear in the dialog.

Is there any way to overwrite these parameters or names? I haven't been able to do so.
Attached is a screenshot with the renamed ‘TwoLevelTrigger’ as ‘Lower Level 2’.

Peter
 

Offline fredo_Topic starter

  • Regular Contributor
  • *
  • Posts: 207
  • Country: fr
@Fenstergucker this thread is not the best place to discuss developer issues.
You should contact Andrew on IRC (see here: https://www.ngscopeclient.org/getinvolved ).
Other option, file an issue on Github : https://github.com/ngscopeclient/scopehal-apps/issues
 
The following users thanked this post: Fenstergucker

Offline Fenstergucker

  • Regular Contributor
  • *
  • Posts: 115
  • Country: at
I made a pull request for the R&S RTB2000.

Peter
 
The following users thanked this post: Hydron, fredo_

Offline fredo_Topic starter

  • Regular Contributor
  • *
  • Posts: 207
  • Country: fr
I made a pull request for the R&S RTB2000.
Good job Peter!  :-+
 

Offline Hydron

  • Super Contributor
  • ***
  • Posts: 1647
  • Country: gb
Much appreciated - will give it a shot when I'm back in the same country as my RTB2k.
 

Offline Fenstergucker

  • Regular Contributor
  • *
  • Posts: 115
  • Country: at
It would be very nice and helpful if someone could describe how to update a clone of ngscopeclient with its submodules using the upstream commits. This would ensure that the new commits are also available in my own branches and submodules.
I haven't been able to do this. Currently, I always clone everything again and maintain my changes. I only use the terminal with git and no other software.
I also read what I consider to be a very good book, ‘Beej's Guide to Git’: https://beej.us/guide/bggit/
But it doesn't seem to have helped much.

Peter
 

Offline fredo_Topic starter

  • Regular Contributor
  • *
  • Posts: 207
  • Country: fr
It would be very nice and helpful if someone could describe how to update a clone of ngscopeclient with its submodules using the upstream commits. This would ensure that the new commits are also available in my own branches and submodules.
@Peter Github does that for you: got to your fork of the repo you want to synchronize and click on "Sync Fork" button and then "Update branch":
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->