Author Topic: Free DS1052E/DS1102E Software for Linux  (Read 38168 times)

0 Members and 1 Guest are viewing this topic.

Offline wd5gnrTopic starter

  • Regular Contributor
  • *
  • Posts: 179
Free DS1052E/DS1102E Software for Linux
« on: May 31, 2015, 10:58:54 pm »
Maybe others too.

Work in progress, so a little rough around the edges at the moment:


https://github.com/wd5gnr/qrigol

From the readme:
Features:
* Uses USB communications with Scope
* Allows keyboard to be unlocked so you can use both the panel and the software
* Allows easy reading of all measurements as well as logging of all measurements
* Control of common scope functions
* Saves waveforms in CSV format
* Integrates with external plot software like gnuplot to qtiplot
* Diagnostic mode to send raw commands to scope

Screenshots:





Feedback welcome. Contributions (in the form of source code to GitHub) even more so ;-)

The funny part is, I just bought a DS1054z which should be in later this week, so I'm not sure why I'm writing this now. But I do intend to keep polishing the rough edges off of it.



« Last Edit: June 05, 2015, 12:55:24 am by wd5gnr »
 

Offline wd5gnrTopic starter

  • Regular Contributor
  • *
  • Posts: 179
Re: Free DS1052E/DS1102E Software for Linux
« Reply #1 on: June 02, 2015, 12:39:25 pm »
Perhaps I should try a Windows port. Is there any interest? I assume VISA provides some usbtmc-like interface.
 

Offline Grapsus

  • Regular Contributor
  • *
  • Posts: 242
  • Country: fr
Re: Free DS1052E/DS1102E Software for Linux
« Reply #2 on: June 02, 2015, 03:37:31 pm »
Hi,

Your app looks very nice! I will give it a try. Having the measurements on a PC screen is a killer feature because they occupy a lot of space on the scope LCD.

I'm Linux user so I don't care a lot about a Windows port, but if you're after a larger audience it may be a good idea.
 

Offline wd5gnrTopic starter

  • Regular Contributor
  • *
  • Posts: 179
Re: Free DS1052E/DS1102E Software for Linux
« Reply #3 on: June 02, 2015, 05:07:14 pm »
If you have ideas for features, post them here.

Things I would like to do:

1) Windows port + serial port option to connect
2) Ability to send CSV file to external filter program to decode (for example) RS232, I2C, SPI, etc.  Done
3) Ability to save off waveforms on a schedule and/or on a trigger
4) Ability to save off measurements after a set trigger (e.g., after scope triggers in normal mode or after Vpp>5V)
5) Save off scope configurations and reload

Not sure if I will get to any or all of these, but you never know.
« Last Edit: June 06, 2015, 10:22:54 pm by wd5gnr »
 

Offline BloodyCactus

  • Frequent Contributor
  • **
  • Posts: 482
  • Country: us
    • Kråketær
Re: Free DS1052E/DS1102E Software for Linux
« Reply #4 on: June 02, 2015, 05:16:18 pm »
very nice :) great to see some more linux software.

I would be curious to see how hard it would be to adapt to DS2k.
-- Aussie living in the USA --
 

Offline wd5gnrTopic starter

  • Regular Contributor
  • *
  • Posts: 179
Re: Free DS1052E/DS1102E Software for Linux
« Reply #5 on: June 02, 2015, 05:20:21 pm »
I think the command set is pretty similar. I may experiment with the DS1104z when mine arrives. Grab QtCreator, build it, and try the DS2K. I would guess some of it will work and if you report what's working/not working I'd try to help.
 

Offline dom0

  • Super Contributor
  • ***
  • Posts: 1483
  • Country: 00
Re: Free DS1052E/DS1102E Software for Linux
« Reply #6 on: June 02, 2015, 05:46:25 pm »
2.) -> sigrok has a ton of decoders. They operate on digital input data, so you'd need to convert the waveform to digital first (schmitt trigger, window centered on waveform average or something like that).

There's also PulseView around.
,
 

Offline wd5gnrTopic starter

  • Regular Contributor
  • *
  • Posts: 179
Re: Free DS1052E/DS1102E Software for Linux
« Reply #7 on: June 02, 2015, 05:49:10 pm »
Yes I had thought about sigrok. It also can read right off the Rigol. In fact, I wrote about it awhile back: http://www.drdobbs.com/embedded-systems/non-pavlovian-triggers/240147899

The way it works now, you might be able to script it to go right to pulseview on a plot.

Here's the file format, so it would take a script to zip it up and treat it as a plot program. http://sigrok.org/wiki/File_format:Sigrok/v2
« Last Edit: June 02, 2015, 08:01:11 pm by wd5gnr »
 

Offline wd5gnrTopic starter

  • Regular Contributor
  • *
  • Posts: 179
Re: Free DS1052E/DS1102E Software for Linux
« Reply #8 on: June 03, 2015, 01:44:11 am »
Ok that got me thinking (always dangerous).

I haven't pushed it to github yet because I have a few bugs and issues plus clean up. BUT.... I now have an "export to OLS" button. This writes an Open Logic Sniffer file (Java program; Google it). I can read UART data off the scope.

Other analyzers are 1-wire, SPI, I2C, DMX512, Manchester and NRZ line, and a few others that probably don't mean anything with a 2 channel input device ;-)





One more... here's the I2C decoder:





Will get this spruced up and on github. I am having some trouble on the acquisition stopping the scope without messing up the buffer. Best bet for now is to stop the scope yourself and then acquire the data.
« Last Edit: June 03, 2015, 02:29:01 am by wd5gnr »
 

Offline wd5gnrTopic starter

  • Regular Contributor
  • *
  • Posts: 179
Re: Free DS1052E/DS1102E Software for Linux
« Reply #9 on: June 04, 2015, 02:09:49 am »
For those of you keeping score, I just pushed a new version to GitHub.

You can now export to Sigrok .sr files (requires sigrok-cli on your PATH). You can then open files with PulseView. I need to make it allow for analog samples too, I suppose but right now just digital.

I have a lot of clean up to do on the code but it seems to work ok.

Figure below is a Pulseview window with some RS232 traffic captured and decoded as hex and ASCII.


 

Offline codeboy2k

  • Super Contributor
  • ***
  • Posts: 1836
  • Country: ca
Re: Free DS1052E/DS1102E Software for Linux
« Reply #10 on: June 04, 2015, 10:34:21 am »
The software looks great,good job!

Here's a suggestion, about your screenshots.  Stop using JPEG for screenshots, it's just no good, because of the compression artefacts. JPEG compression will make lines blurry and text unreadable, until you go to almost 95 quality, and then it makes the image too large, while still showing compression artefacts.  JPEG compression is much better at photos with complex colour information.

Instead, use a PNG compression for screenshots, it will do much better with large areas of the same colour.

 

Offline wd5gnrTopic starter

  • Regular Contributor
  • *
  • Posts: 179
Re: Free DS1052E/DS1102E Software for Linux
« Reply #11 on: June 04, 2015, 12:23:03 pm »
Yeah my tool was using PNG and isn't suddenly. I need to go look for why.
 

Offline wd5gnrTopic starter

  • Regular Contributor
  • *
  • Posts: 179
Re: Free DS1052E/DS1102E Software for Linux
« Reply #12 on: June 07, 2015, 12:04:45 am »
I just posted up a 64-bit deb and 64-bit rpm for the binaries to install. Not sure if they are workable or not (I'm not much of a packager) but if you get them to install ok, I'd appreciate hearing about it (at least the first few). If you run into problems, I'd like to hear about that too.

https://github.com/wd5gnr/qrigol/tree/master/packages

If anyone asks for 32-bit packages I'll see what I can do.
 

Offline Bigman

  • Regular Contributor
  • *
  • Posts: 80
Re: Free DS1052E/DS1102E Software for Linux
« Reply #13 on: June 07, 2015, 08:06:24 am »
First comment: GREAT!
I own a Rigol DS1102E and on my PCs I am running Arch-Linux. Downloaded the files from https://github.com/wd5gnr/qrigol, opend it with QtCreator and compiled it succussfully. I used the USB-port at the back of the DS1102E and checked on the Linux-PC the available USBs in the /dev/ folder with "ls -alh | grep usb". Indeed there was now "usbtmc2", hence in wd5gnr, I typed for the device "/dev/usbtmc2". Well, but after pressing "connect" I am getting the message "Can't open device".
Any ideas, where to look for the problem (e.g. do I have to consider some settings at the Rigol)?

Thanks in advance & cheers
 

Offline RoTTe

  • Contributor
  • Posts: 17
Re: Free DS1052E/DS1102E Software for Linux
« Reply #14 on: June 07, 2015, 01:14:41 pm »
Hi there,

Fantastic job man! Thank you.

Sadly I wrote you for bad news. The program crashes all times when I tried to export the waveforms (no plot, csv, neither OLS nor Sigrok). When I clik the export button just BOOM Segmentantion Fault.

I tried the code (qtcreator 3.0.1 and Qt 5.2.1), and the package (worked fine on ubuntu 14.04).

Binary:

Code: [Select]
qrigol # qrigol
QMetaObject::connectSlotsByName: No matching signal for on_uiUpdate()
Segmentation fault (core dumped)

Qtcreator (Debug mode)



Thank you, good work!
 

Offline wd5gnrTopic starter

  • Regular Contributor
  • *
  • Posts: 179
Re: Free DS1052E/DS1102E Software for Linux
« Reply #15 on: June 07, 2015, 01:41:37 pm »
but after pressing "connect" I am getting the message "Can't open device".
Any ideas, where to look for the problem (e.g. do I have to consider some settings at the Rigol)?

My guess is you don't have permissions to use the device. My scope is usbtmc4 (I have a lot of scopes ;-) ). Here's an ls -l of /dev/usbtmc4:

crw-rw-r-- 1 root plugdev 180, 4 Jun  7 08:32 /dev/usbtmc4


Note that root owns it but the group is plugdev and I'm a member of the plugdev group (type groups from a prompt to see).

On Kubuntu and similar this is handled by udev. I have a feeling I have sigrok installed and it sets that up properly, so my bad!

If you can test this, I will add it to the .deb file at least.

As root, make a file in /etc/udev/rules.d   name the file 40-rigol.rules

It contains:


ACTION!="add|change", GOTO="rigol_rules_end"
SUBSYSTEM!="usb|usbmisc|usb_device", GOTO="rigol_rules_end"

# Rigol DS1000 series
ATTRS{idVendor}=="1ab1", ATTRS{idProduct}=="0588", MODE="664", GROUP="plugdev"

# Rigol DS2000 series
ATTRS{idVendor}=="1ab1", ATTRS{idProduct}=="04b0", MODE="664", GROUP="plugdev"

# Rigol DG4000 series
ATTRS{idVendor}=="1ab1", ATTRS{idProduct}=="0641", MODE="664", GROUP="plugdev"

LABEL="rigol_rules_end"



-OR- install sigrok which you want anyway (sudo apt-get install sigrok).

After a restart (or restart udev and replug the scope) I bet it works.

Let me know, please and thanks for the report.
 

Offline RoTTe

  • Contributor
  • Posts: 17
Re: Free DS1052E/DS1102E Software for Linux
« Reply #16 on: June 07, 2015, 01:42:18 pm »
I updated the firmware of the Rigol to something ..... more "update" (2.04 -> 4.01.07) and worked fine.

Thanks!

Edit: I'm running this with root user, the permissions are ok ,D
 

Offline wd5gnrTopic starter

  • Regular Contributor
  • *
  • Posts: 179
Re: Free DS1052E/DS1102E Software for Linux
« Reply #17 on: June 07, 2015, 01:45:00 pm »
I was just about to ask you about that. I had the old firmware too and the return data is different. I _TRIED_ to make the code work either way (since it originally worked with old format only). But I apparently messed something up!

Hmm... I'll look at it, but then I have to find someone with a non-upgraded box to test on ;-)  Of course, my 1054z comes in tomorrow ( :clap:) so maybe I'll be willing to downgrade to test some more.

Sorry about that! I tried to accommodate the old format.
 

Offline Bigman

  • Regular Contributor
  • *
  • Posts: 80
Re: Free DS1052E/DS1102E Software for Linux
« Reply #18 on: June 07, 2015, 02:23:25 pm »
but after pressing "connect" I am getting the message "Can't open device".
Any ideas, where to look for the problem (e.g. do I have to consider some settings at the Rigol)?

My guess is you don't have permissions to use the device. My scope is usbtmc4 (I have a lot of scopes ;-) ). Here's an ls -l of /dev/usbtmc4:

crw-rw-r-- 1 root plugdev 180, 4 Jun  7 08:32 /dev/usbtmc4


Note that root owns it but the group is plugdev and I'm a member of the plugdev group (type groups from a prompt to see).

On Kubuntu and similar this is handled by udev. I have a feeling I have sigrok installed and it sets that up properly, so my bad!

If you can test this, I will add it to the .deb file at least.

As root, make a file in /etc/udev/rules.d   name the file 40-rigol.rules

It contains:
[...]

I will test your recommendation, which I appreciate. Before I do that:
1) I also checked out "ls -l of /dev/usbtmc2" --> crw------- 1 root root 180, 2  7. Jun 15:58 /dev/usbtmc2
(but there was also a message-line: ls: access not possible: couldn't find file or folder. this message was in German language, which is the language of my arch-linux version).

2) "$ groups" --> uucp lock users ... hence, I am not in the group plugdev.
3) "$ cat /etc/groups" --> ... well, I there is no group plugdev at all. And this is the point, which goes beyond my linux skills, but I am wondering if your recommedation to create the file 40-rigol.rules will work, since I can see there a lot of "Group="plugdev".
 

Offline RoTTe

  • Contributor
  • Posts: 17
Re: Free DS1052E/DS1102E Software for Linux
« Reply #19 on: June 07, 2015, 02:25:00 pm »
I was just about to ask you about that. I had the old firmware too and the return data is different. I _TRIED_ to make the code work either way (since it originally worked with old format only). But I apparently messed something up!

Hmm... I'll look at it, but then I have to find someone with a non-upgraded box to test on ;-)  Of course, my 1054z comes in tomorrow ( :clap:) so maybe I'll be willing to downgrade to test some more.

Sorry about that! I tried to accommodate the old format.

I've got one 1054z too -but this puppy works fine-. With the update works like a charm. Maybe some dialog to warn the user about its "old"-version ?

 

Offline wd5gnrTopic starter

  • Regular Contributor
  • *
  • Posts: 179
Re: Free DS1052E/DS1102E Software for Linux
« Reply #20 on: June 07, 2015, 02:28:33 pm »

I will test your recommendation, which I appreciate. Before I do that:
1) I also checked out "ls -l of /dev/usbtmc2" --> crw------- 1 root root 180, 2  7. Jun 15:58 /dev/usbtmc2
(but there was also a message-line: ls: access not possible: couldn't find file or folder. this message was in German language, which is the language of my arch-linux version).

2) "$ groups" --> uucp lock users ... hence, I am not in the group plugdev.
3) "$ cat /etc/groups" --> ... well, I there is no group plugdev at all. And this is the point, which goes beyond my linux skills, but I am wondering if your recommedation to create the file 40-rigol.rules will work, since I can see there a lot of "Group="plugdev".

Well one easy thing to try would be to issue the following command:

sudo chmod 666 /dev/usbtmc2

Now it SHOULD work until the next reboot. If that's true, you could just add that to some autostart location (e.g., rc.local without the sudo). But that will at least prove/disprove that it is worth doing the effort to fix udev or if we need to figure something else out.

The other thing is that installing sigrok ought to install an appropriate udev rule so you could use your package manager to do that and I bet that would work too.
 

Offline Bigman

  • Regular Contributor
  • *
  • Posts: 80
Re: Free DS1052E/DS1102E Software for Linux
« Reply #21 on: June 07, 2015, 02:32:36 pm »

Well one easy thing to try would be to issue the following command:

sudo chmod 666 /dev/usbtmc2

Now it SHOULD work until the next reboot. If that's true, you could just add that to some autostart location (e.g., rc.local without the sudo). But that will at least prove/disprove that it is worth doing the effort to fix udev or if we need to figure something else out.

The other thing is that installing sigrok ought to install an appropriate udev rule so you could use your package manager to do that and I bet that would work too.

Great. It works! Thanks for that!!!
 

Offline wd5gnrTopic starter

  • Regular Contributor
  • *
  • Posts: 179
Re: Free DS1052E/DS1102E Software for Linux
« Reply #22 on: June 07, 2015, 02:34:37 pm »
I added notes to the README based on both discussions this morning. Really great to have more eyes and boxes testing ;-)

If you report other issues or feature requests, I'd be glad to hear them.
 

Offline Bigman

  • Regular Contributor
  • *
  • Posts: 80
Re: Free DS1052E/DS1102E Software for Linux
« Reply #23 on: June 07, 2015, 02:51:19 pm »
Quick info/remark/hint:
On the Rigol DS110E, the probe's attenuation is set to x10.
When I do "Read Scope" on the tap "Vertical" the attenuation is set to x1. I manually correct this to x10, but after clicking on "update" in the measurement tap, the attenuation in QRigal switchs back to x1 (but x10 is still the setting on the Rigol).

My Rigol's software is 00.03.01
Model: 1102E
 

Offline wd5gnrTopic starter

  • Regular Contributor
  • *
  • Posts: 179
Re: Free DS1052E/DS1102E Software for Linux
« Reply #24 on: June 07, 2015, 02:52:00 pm »
I'll look at it. Is it both channels or just one?
 

Offline Bigman

  • Regular Contributor
  • *
  • Posts: 80
Re: Free DS1052E/DS1102E Software for Linux
« Reply #25 on: June 07, 2015, 02:59:43 pm »
I'll look at it. Is it both channels or just one?

This issue is on both channels.
BTW: after connecting, in the Rigol's display the letters "Rmt" are popping up on the top-right corner (very fast and short, almost hard to see).
 

Offline wd5gnrTopic starter

  • Regular Contributor
  • *
  • Posts: 179
Re: Free DS1052E/DS1102E Software for Linux
« Reply #26 on: June 07, 2015, 03:05:26 pm »
The Rmt is normal. There is an unlock button on the front tab. If you uncheck it, the scope keyboard will STAY locked until you shutdown qrigol. I didn't like that, so if you click unlock, qrigol unlocks the keyboard as soon as it is done using it so you can still push the knobs.

I can't reproduce the X10 issue -- I suspect it is some locale formatting of floating point numbers (do you use "," for a decimal point?) I am going to try to send you a test copy that may or may not fix it.
 

Offline Bigman

  • Regular Contributor
  • *
  • Posts: 80
Re: Free DS1052E/DS1102E Software for Linux
« Reply #27 on: June 07, 2015, 03:09:36 pm »
The Rmt is normal. There is an unlock button on the front tab. If you uncheck it, the scope keyboard will STAY locked until you shutdown qrigol. I didn't like that, so if you click unlock, qrigol unlocks the keyboard as soon as it is done using it so you can still push the knobs.

I can't reproduce the X10 issue -- I suspect it is some locale formatting of floating point numbers (do you use "," for a decimal point?) I am going to try to send you a test copy that may or may not fix it.

I am living in Germany, and yes, you are right. Here we use the use the comma instead of the dot. E.g. 1/2 is in Germany 0,5 and NOT 0.5.
 

Offline wd5gnrTopic starter

  • Regular Contributor
  • *
  • Posts: 179
Re: Free DS1052E/DS1102E Software for Linux
« Reply #28 on: June 07, 2015, 03:14:28 pm »
The test version I provided may help. What I think is happening is the scope is returning something using a "." separator and the Qt libraries are sensitive to your locale and are thus using a "," separator and that's confusing things. The bad news is that's going to confuse a lot of things. The good news is I have all the floating point pieces in one place, so maybe if my theory is right it won't be that hard to fix. Let me know if that test case fixes it.

And yes, I have been to beautiful Germany before as a side trip from the Netherlands. Last time I drove to Koln to see the big church there. So impressive.
« Last Edit: June 07, 2015, 03:16:00 pm by wd5gnr »
 

Offline Bigman

  • Regular Contributor
  • *
  • Posts: 80
Re: Free DS1052E/DS1102E Software for Linux
« Reply #29 on: June 07, 2015, 03:23:16 pm »
The test version I provided may help. [...]

And yes, I have been to beautiful Germany before as a side trip from the Netherlands. Last time I drove to Koln to see the big church there. So impressive.

I checked out the test-version. Unfortunately, it doesn't fix the problem (still the same issue).
Nice you have been in Germany (and the Netherlands, which I like also).  :-+
 

Offline wd5gnrTopic starter

  • Regular Contributor
  • *
  • Posts: 179
Re: Free DS1052E/DS1102E Software for Linux
« Reply #30 on: June 07, 2015, 03:25:35 pm »
That is a poser then. I may post another test version that would output some data on your terminal (you'd have to start it from the terminal) if you don't mind.

Just to be sure. You need to run the new version directly (e.g., click it in your file manager or specify a whole path like ./qrigol on the terminal). Otherwise the one in /usr/bin installed by the package manager will run.

I'm about to post another debugging version. If you have it in, say, ~/Downloads you could open a terminal and say

~/Downloads/qrigol 

to execute it.

The terminal should have messages like:

DEBUG: cmd=:CHAN1:PROB?
DEBUG: 10.000000 10
DEBUG: 10X
DEBUG: cmd=:CHAN2:PROB?
DEBUG: 10.000000 10
DEBUG: 10X

Once you connect. Also when you press the read scope button. I would like to see those DEBUG: statements if you have time to do that. Thanks!

« Last Edit: June 07, 2015, 03:33:21 pm by wd5gnr »
 

Offline wd5gnrTopic starter

  • Regular Contributor
  • *
  • Posts: 179
Re: Free DS1052E/DS1102E Software for Linux
« Reply #31 on: June 07, 2015, 03:46:32 pm »
Ok it is the , separator and I guess Qt isn't as locale sensitive as I thought it would be.

I am about to be on the motorcycle for a few hours, but when I get back I'll devise a fix. My guess is lots of floating point conversions are going to be a problem so you will probably find other places where this is the case.

Thank you for taking the time to troubleshoot this.
 

Offline Bigman

  • Regular Contributor
  • *
  • Posts: 80
Re: Free DS1052E/DS1102E Software for Linux
« Reply #32 on: June 07, 2015, 03:51:41 pm »
Ok it is the , separator and I guess Qt isn't as locale sensitive as I thought it would be.

I am about to be on the motorcycle for a few hours, but when I get back I'll devise a fix. My guess is lots of floating point conversions are going to be a problem so you will probably find other places where this is the case.

Thank you for taking the time to troubleshoot this.

hey take your time ... and ... it's up to us, who are using your software, to say "thank you".
Enjoy riding your motorcycle (but ride safe  :) )
 

Offline wd5gnrTopic starter

  • Regular Contributor
  • *
  • Posts: 179
Re: Free DS1052E/DS1102E Software for Linux
« Reply #33 on: June 07, 2015, 08:27:54 pm »
OK if Bigman says the new test version solves the problem I will update github and release 0.2 which has a few other minor fixes.
 

Offline wd5gnrTopic starter

  • Regular Contributor
  • *
  • Posts: 179
Re: Free DS1052E/DS1102E Software for Linux
« Reply #34 on: June 07, 2015, 09:50:05 pm »
Well no joy with the last version.

I set my scope up to use German, just to see, but it still outputs 10X as 1.000e+01

On my machine, converting that to a float with sscanf gives me 10.0 (as it should). But with the locale set to somewhere where , is the decimal point, it gives 1. That makes sense.

My test code tried to get the current idea of the decimal point and (unless it is '.') replaces floating point output '.' -> whatever the dp character is.  Then it does the conversion. The only thing that might upset that is if Qt is using a correct locale and C++ is using the "C" locale. Maybe that's the problem.

Due to the time difference, I think it will be tomorrow before we test anymore.
 

Offline dom0

  • Super Contributor
  • ***
  • Posts: 1483
  • Country: 00
Re: Free DS1052E/DS1102E Software for Linux
« Reply #35 on: June 07, 2015, 10:03:38 pm »
How do you convert? QString::toFloat always uses the C locale (i.e. '.' is the decimal point).

edit: https://github.com/wd5gnr/qrigol/blob/27de1b8221b150a499dd0cbff92a5614af878af8/rigolcomm.cpp#L111

Well yes, that will always give you trouble, sscanf always operates on the set locale. If you don't want to use QString, it's possible with C++ stdlib, too. About like this:

std::stringstream ss;
float f;
ss.imbue(std::locale("C"));
ss << "12.345"; // string in
ss >> f; // float out
« Last Edit: June 07, 2015, 10:07:01 pm by dom0 »
,
 

Offline wd5gnrTopic starter

  • Regular Contributor
  • *
  • Posts: 179
Re: Free DS1052E/DS1102E Software for Linux
« Reply #36 on: June 07, 2015, 10:14:02 pm »
I was trying to keep the low-level code Qt agnostic, so I avoided QString. I had attempted... oh wait... I got the money punct instead of the number punct. I wonder if that's why? You'd think they were the same, but maybe not. Don't know why I did that though. One more try...
 

Offline wd5gnrTopic starter

  • Regular Contributor
  • *
  • Posts: 179
Re: Free DS1052E/DS1102E Software for Linux
« Reply #37 on: June 07, 2015, 10:35:43 pm »
I set up a new branch (dp-test) should anyone want to try it.

https://github.com/wd5gnr/qrigol/tree/dptest/packages/binary-debug -- executable is here.
 

Offline wd5gnrTopic starter

  • Regular Contributor
  • *
  • Posts: 179
Re: Free DS1052E/DS1102E Software for Linux
« Reply #38 on: June 09, 2015, 09:32:07 pm »
I went ahead and posted v0.2 in both deb,rpm, and binary formats. This attempts to fix the locale issue (reports to confirm or the contrary are welcome) and adds a nice help system. Minor bug fixes etc.
 

Offline alsetalokin4017

  • Super Contributor
  • ***
  • Posts: 2055
  • Country: us
Re: Free DS1052E/DS1102E Software for Linux
« Reply #39 on: June 09, 2015, 11:55:20 pm »
Thank you for all your work on this! If there's a DS1054Z version coming, and 32 bit .deb, I'd like to try it out.
« Last Edit: June 09, 2015, 11:57:05 pm by alsetalokin4017 »
The easiest person to fool is yourself. -- Richard Feynman
 

Offline wd5gnrTopic starter

  • Regular Contributor
  • *
  • Posts: 179
Re: Free DS1052E/DS1102E Software for Linux
« Reply #40 on: June 10, 2015, 12:07:28 am »
I was just playing with the 1054Z... going over the network is essentially the same, so this isn't very far fetched. Would just have to adjust for the difference in commands and channels. As for 32 bit deb, that's a little work, but not too much. However, if you don't care to wait try this:

1) Download the ZIP file from Github (right hand side of the screen).
2) sudo apt-get install qtcreator
3) Unzip zip file
4) Open up .pro file. Select qt kit of your choice
5) Build or run from qtcreator at your option

 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: Free DS1052E/DS1102E Software for Linux
« Reply #41 on: June 10, 2015, 02:11:51 am »
Thank you for all your work on this! If there's a DS1054Z version coming, and 32 bit .deb, I'd like to try it out.

You always have marmad's RUU, I believe v 3.00.a05 supports the DS1000z:

https://www.eevblog.com/forum/projects/software-tips-and-tricks-for-rigol-ds200040006000-ultravision-dsos/


Edit: this one and mine only does screen captures btw.
Also there is a version found by bingo that doesn't require VISA and it's pure Python:

https://www.eevblog.com/forum/testgear/new-rigol-ds1054z-oscilloscope/msg675845/#msg675845

That uses telnet, I did modify it to work on my DS2000 that doesn't support telnet using forum member alex.forencich vxi11, note that mine captures the screen in 4 seconds over ethernet, but you need to modify it to get support back for the DS1000z

https://www.eevblog.com/forum/testgear/python-based-instrument-control/msg676772/#msg676772

Also there is this, edit: looks promising but have not played with it, BTW it comes with full source:
https://www.eevblog.com/forum/testgear/free-ds6000ds1000z-software/

Plenty of options :)

One more (screen capture only):
https://www.eevblog.com/forum/testgear/ds1000z-series-display-on-android/msg636183/#msg636183


« Last Edit: June 10, 2015, 02:30:38 am by miguelvp »
 

Offline wd5gnrTopic starter

  • Regular Contributor
  • *
  • Posts: 179
Re: Free DS1052E/DS1102E Software for Linux
« Reply #42 on: June 10, 2015, 02:51:30 pm »
I threw my version of a 1000z screencapture into the mix this morning: https://www.eevblog.com/forum/testgear/shell-script-to-take-screen-caps-from-ds1000z/
 

Offline briselec

  • Regular Contributor
  • *
  • Posts: 94
  • Country: au
Re: Free DS1052E/DS1102E Software for Linux
« Reply #43 on: October 02, 2015, 04:45:45 am »
..
2) sudo apt-get install qtcreator
..

When I read you need to install qtcreator I'm thinking "has the developers of QT gone completely nuts"? No they haven't , do the following -

$ qmake qrigol.pro
$ make

Done!
Will try it tonight as I don't have a rigol at work.
 

Offline wd5gnrTopic starter

  • Regular Contributor
  • *
  • Posts: 179
Re: Free DS1052E/DS1102E Software for Linux
« Reply #44 on: October 02, 2015, 04:56:23 am »
Yeah, I figure if you have the Qt tools you probably know that. If not, you might as well get the package.

I just let go my 1052E (too many scopes) so probably how it is is how it is going to stay unless someone wants to adopt it ;)
 

Offline gojimmypi

  • Regular Contributor
  • *
  • Posts: 54
  • Country: us
Re: Free DS1052E/DS1102E Software for Linux
« Reply #45 on: October 26, 2015, 01:35:31 am »
First comment: GREAT!
I own a Rigol DS1102E and on my PCs I am running Arch-Linux. Downloaded the files from https://github.com/wd5gnr/qrigol, opend it with QtCreator and compiled it succussfully. I used the USB-port at the back of the DS1102E and checked on the Linux-PC the available USBs in the /dev/ folder with "ls -alh | grep usb". Indeed there was now "usbtmc2", hence in wd5gnr, I typed for the device "/dev/usbtmc2". Well, but after pressing "connect" I am getting the message "Can't open device".
Any ideas, where to look for the problem (e.g. do I have to consider some settings at the Rigol)?

Thanks in advance & cheers

I agree: GREAT! Thanks for posting the source on github. I'm very interested in getting this to work.

I've compiled qrigol for the Raspberry Pi (raspbian)... and I was hoping to get it talking to my DS1054z.... however I don't see any usbtmc ports. I've rebooted, and still no joy. Does the usb driver get installed automatically?

Code: [Select]
pi@raspberrypi ~ $ sudo ls /dev -alh | grep usb
drwxr-xr-x  2 root root          60 Dec 31  1969 usb

and tips on getting the RPi to see the Rigol USB device?

thanks!
 

Offline wd5gnrTopic starter

  • Regular Contributor
  • *
  • Posts: 179
 

Offline gojimmypi

  • Regular Contributor
  • *
  • Posts: 54
  • Country: us
Re: Free DS1052E/DS1102E Software for Linux
« Reply #47 on: October 26, 2015, 02:13:22 am »
See if this helps you: http://scruss.com/blog/2013/12/15/my-raspberry-pi-talks-to-my-oscilloscope/
some good suggestions on that link, thanks... but the RPi does not even see a Rigol device:
Code: [Select]
pi@raspberrypi ~ $ lsusb
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 04f2:0833 Chicony Electronics Co., Ltd
Bus 001 Device 005: ID 04f2:0939 Chicony Electronics Co., Ltd
pi@raspberrypi ~ $ sudo apt-get install libusb-1.0-0
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libusb-1.0-0 is already the newest version.
libusb-1.0-0 set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
 

Offline wd5gnrTopic starter

  • Regular Contributor
  • *
  • Posts: 179
Re: Free DS1052E/DS1102E Software for Linux
« Reply #48 on: October 26, 2015, 02:25:17 am »
It would appear you will have to rebuild the kernel: http://ziemann.web.cern.ch/ziemann/gadget/usbtmc/raspi-usbtmc.html
 

Offline gojimmypi

  • Regular Contributor
  • *
  • Posts: 54
  • Country: us
Re: Free DS1052E/DS1102E Software for Linux
« Reply #49 on: October 26, 2015, 11:09:10 am »
It would appear you will have to rebuild the kernel: http://ziemann.web.cern.ch/ziemann/gadget/usbtmc/raspi-usbtmc.html
yes, it appears the RPi does not natively support usbtmc. bummer.

I did find this python driver, as building my own kernel can be quite an undertaking (fortunately I do have a cross-compiler on a VM, but still...) anyhow, I installed this, still no joy:

http://alexforencich.com/wiki/en/python-usbtmc/start

any chance you have an Ethernet interface in the works? ;)
 

Offline gojimmypi

  • Regular Contributor
  • *
  • Posts: 54
  • Country: us
Re: Free DS1052E/DS1102E Software for Linux
« Reply #50 on: October 26, 2015, 11:17:59 am »
perhaps the python driver might actually work.... after some RTFM of the README I found a note regarding manual specification of hardware like this:

Quote
If you cannot access your device without running your script as root, then you
may need to create a udev rule to properly set the permissions of the device.
First, connect your device and run lsusb.  Find the vendor and product IDs.
Then, create a file /etc/udev/rules.d/usbtmc.rules with the following content:

    # USBTMC instruments

    # Agilent MSO7104
    SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="0957", ATTRS{idProduct}=="1755", GROUP="usbtmc", MODE="0660"

substituting the correct idVendor and idProduct from lsusb.  You will also need
to create the usbtmc group and add yourself to it or substitute another group
of your choosing.  It seems that udev does not allow 0666 rules, usually
overriding the mode to 0664, so you will need to be a member of the associated
group to use the device.

but "substituting the correct idVendor and idProduct from lsusb" doesn't help, as lsusb does not show my device.
 

Offline wd5gnrTopic starter

  • Regular Contributor
  • *
  • Posts: 179
Re: Free DS1052E/DS1102E Software for Linux
« Reply #51 on: October 26, 2015, 12:36:33 pm »
Which scope do you have? it should be the same for all scopes of a certain type.

I think you said you have a 1054z (although note this software works with 1052E and the commands are different enough that it would take work to port).

I let my 1052E go and have done a little software development on the 1054z but not for this software. (see https://github.com/wd5gnr/scopesnap)
 

Offline smithnerd

  • Regular Contributor
  • *
  • Posts: 120
  • Country: gb
Re: Free DS1052E/DS1102E Software for Linux
« Reply #52 on: October 26, 2015, 01:11:20 pm »
I just plugged my ds1054z into an early raspberry pi:

Code: [Select]
[    0.000000] Machine model: Raspberry Pi Model B Rev 1
Even though the kernel does not have the usbtmc driver built in, the device is detected; dmesg reports:

Code: [Select]
[  153.865942] usb 1-1.3: new high-speed USB device number 4 using dwc_otg
[  153.967580] usb 1-1.3: New USB device found, idVendor=1ab1, idProduct=04ce
[  153.967620] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  153.967640] usb 1-1.3: Product: DS1000Z Series
[  153.967658] usb 1-1.3: Manufacturer: Rigol Technologies.
[  153.967675] usb 1-1.3: SerialNumber: ...

lsusb shows:
Code: [Select]
# lsusb
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 1ab1:04ce Rigol Technologies

It is the only device connected to the physical USB ports, and I am logged in via ssh. "lsusb -v" reports MaxPower as 100mA for that device. Have you tried connecting via a self-powered USB hub?
 

Offline gojimmypi

  • Regular Contributor
  • *
  • Posts: 54
  • Country: us
Re: Free DS1052E/DS1102E Software for Linux
« Reply #53 on: October 26, 2015, 02:04:18 pm »
I think you said you have a 1054z (although note this software works with 1052E and the commands are different enough that it would take work to port).
yes, I have the ds1054z... and no... I didn't know they were so different. I'm completely new to tmc, and had hoped/assumed/wished that the commands would be somewhat standard, certainly within a manufacturer. well, lessons learned.

I just plugged my ds1054z into an early raspberry pi:

Code: [Select]
[    0.000000] Machine model: Raspberry Pi Model B Rev 1
Even though the kernel does not have the usbtmc driver built in, the device is detected; dmesg reports:

It is the only device connected to the physical USB ports, and I am logged in via ssh. "lsusb -v" reports MaxPower as 100mA for that device. Have you tried connecting via a self-powered USB hub?

good suggestions, but yes - plugged into hub with keyboard and mouse. no go.
Code: [Select]
pi@raspberrypi ~ $ lsusb -v | grep idVendor
Couldn't open device, some information will be missing
Couldn't open device, some information will be missing
Couldn't open device, some information will be missing
Couldn't open device, some information will be missing
Couldn't open device, some information will be missing
Couldn't open device, some information will be missing
Couldn't open device, some information will be missing
  idVendor           0x0424 Standard Microsystems Corp.
  idVendor           0x1d6b Linux Foundation
  idVendor           0x04f2 Chicony Electronics Co., Ltd
  idVendor           0x04f2 Chicony Electronics Co., Ltd
  idVendor           0x0424 Standard Microsystems Corp.
  idVendor           0x1a40 Terminus Technology Inc.
  idVendor           0x1a40 Terminus Technology Inc.

Code: [Select]
[    0.000000] Booting Linux on physical CPU 0xf00
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 4.1.7-v7+ (dc4@dc4-XPS13-9333) (gcc version 4.8.3 20140303 (prerelease) (crosstool-NG linaro-1.13.1+bzr2650 - Linaro GCC 2014.03)
) #817 SMP PREEMPT Sat Sep 19 15:32:00 BST 2015
[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine model: Raspberry Pi 2 Model B Rev 1.1

so I'm curious how your RPi detected the Rigol?

Even my Rigol: IO settings - Remote IO - has TMC "Off" and greyed out, even thought the USB is plugged into a hub.

I also was not able to get the usb to work in a debian vm. perhaps time to fire up a real one. Any other suggestions for Rpi would be apprecaited.

thanks!

the USB port is indeed working on Windows... as I was able to get the Ultrasigma stuff to see and talk with my DS1054z. So the problem definitely seems to be with my Rpi.
 

Offline ortegahernandes

  • Newbie
  • Posts: 5
Re: Free DS1052E/DS1102E Software for Linux
« Reply #54 on: December 29, 2015, 03:50:57 pm »
Congratulations for software :-+, I use Linux , Here the software works.
But my knowledge in this area are few and can not help you  :(


Kubuntu 15.10
DS1052E
Firmware: 00.04.02.01.00
HardVersion: 58
With hack 100MHZ

Hugs, Rodrigo Hernandes
Brazil
« Last Edit: December 29, 2015, 04:02:17 pm by ortegahernandes »
 

Offline Bzzz

  • Contributor
  • Posts: 37
  • Country: de
  • shoving atoms
    • Wan Hung Lo Electronics Blog :)
Re: Free DS1052E/DS1102E Software for Linux
« Reply #55 on: January 28, 2018, 03:17:33 pm »
Project's dead? Just tried it with a DS1054Z (product ID 04ce, just duplicated the udev lines), and it's quite laggy. Furthermore, now the package management complains about not having libqt4-core and libqt4-gui installed, which isn't really shipped with Ubuntu 16.04 LTS (or newer, I guess) anymore.

Still looking for a tool to either capture waveforms directly from the device or convert wfm to something that gnuplot does understand.
 

Offline Karel

  • Super Contributor
  • ***
  • Posts: 2218
  • Country: 00
Re: Free DS1052E/DS1102E Software for Linux
« Reply #56 on: January 28, 2018, 04:41:46 pm »
Project's dead? Just tried it with a DS1054Z (product ID 04ce, just duplicated the udev lines), and it's quite laggy. Furthermore, now the package management complains about not having libqt4-core and libqt4-gui installed, which isn't really shipped with Ubuntu 16.04 LTS (or newer, I guess) anymore.

Here's how you install the Qt4 libraries necessary to compile a Qt program:

Code: [Select]
sudo apt-get install git-core g++ make libqt4-dev libqt4-core
Still looking for a tool to either capture waveforms directly from the device or convert wfm to something that gnuplot does understand.

Try this one:

https://www.teuniz.net/DSRemote/
 

Offline Bzzz

  • Contributor
  • Posts: 37
  • Country: de
  • shoving atoms
    • Wan Hung Lo Electronics Blog :)
Re: Free DS1052E/DS1102E Software for Linux
« Reply #57 on: January 30, 2018, 08:20:49 pm »
Well, as I said, it's no longer included in Ubuntu 16.04 as it is replaced by other packages. Running your command yields

Code: [Select]
sudo apt-get install git-core g++ make libqt4-dev libqt4-core
E: Package 'libqt4-core' has no installation candidate

There are instructions how to provide these outdated packages, but to me it's not worth the hassle.
DSRemote does have similar requirements, but it works fine without workarounds. I captured my data with reduced memory length (120k samples) to CSV and replaced the commas with spaces so that gnuplot does see proper data columns. Thanks for the suggestion, tho :)
 

Offline Karel

  • Super Contributor
  • ***
  • Posts: 2218
  • Country: 00
Re: Free DS1052E/DS1102E Software for Linux
« Reply #58 on: January 31, 2018, 07:39:45 am »
Well, as I said, it's no longer included in Ubuntu 16.04 as it is replaced by other packages.

Not true. Too many programs depend on Qt4. The instructions I wrote were for Linux Mint which is based on Ubuntu.
Apparently there are some differences. I tried with Ubuntu 17.10 and everything works fine if you omit the "libqt4-core".
No hassle at all.

Code: [Select]
~$ qmake --version
QMake version 2.01a
Using Qt version 4.8.7 in /usr/lib/x86_64-linux-gnu
~$ cat /etc/os-release
NAME="Ubuntu"
VERSION="17.10 (Artful Aardvark)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 17.10"
VERSION_ID="17.10"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=artful
UBUNTU_CODENAME=artful
« Last Edit: January 31, 2018, 11:49:38 am by Karel »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf