EEVblog Electronics Community Forum

Electronics => Projects, Designs, and Technical Stuff => Topic started by: l1q1d on May 23, 2012, 08:54:28 am

Title: Easy scope for *nix systems
Post by: l1q1d on May 23, 2012, 08:54:28 am
Hi to all, i have a SDS1102CM but i'm really pissed off for the lack of *nix support.
I'm a gentoo and mac user and i like to start to port Easy Scope to linux/Mac but i need some help.
I started a new project on sourceforge (http://sourceforge.net/projects/dsoscope/) and i'm looking for:
- developers
- beta-testers
Title: Re: Easy scope for *nix systems
Post by: typeglob on May 23, 2012, 11:57:01 am
The Rigol DS1102E implements USB TMC as far as I know and and the Siglent SDS1102CM looks like a rebadged Rigol with a slightly different button and menu layout.

If the Siglent does indeed support USB TMC, that might make interfacing with the scope a lot easier.

http://www.home.agilent.com/upload/cmc_upload/All/usbtmc.htm?&cc=NL&lc=dut (http://www.home.agilent.com/upload/cmc_upload/All/usbtmc.htm?&cc=NL&lc=dut)

Edit: if you look at page 112 of the manual (http://www.saelig.com/supplier/siglent/SDS1000_manual.pdf (http://www.saelig.com/supplier/siglent/SDS1000_manual.pdf)) it seems the Siglent scope mentions 'WaveAce Series' in the online help  :P

Btw. what do you mean with 'port'? Do you intend to run a Windows binary with something like Wine, or do you mean reimplementing/developing software with functionality similar to EasyScope?
Title: Re: Easy scope for *nix systems
Post by: EEVblog on May 23, 2012, 12:45:57 pm
The Rigol DS1102E implements USB TMC as far as I know and and the Siglent SDS1102CM looks like a rebadged Rigol with a slightly different button and menu layout.

As far as I know, Rigol and Siglent are bitter rivals. Siglent re-badge and make derivatives for a lot of companies.
Rigol used to, but are now mostly (or entirely) selling under their own name?

Dave.
Title: Re: Easy scope for *nix systems
Post by: Bored@Work on May 23, 2012, 02:45:41 pm
Siglent is an Atten (cover) operation.
Title: Re: Easy scope for *nix systems
Post by: gtsili on May 23, 2012, 05:38:33 pm
There is also this small python program that uses usbtmc under Linux to plot data captured from a Rigol DS1052E scope.

http://www.cibomahto.com/2010/04/controlling-a-rigol-oscilloscope-using-linux-and-python/ (http://www.cibomahto.com/2010/04/controlling-a-rigol-oscilloscope-using-linux-and-python/)
Title: Re: Easy scope for *nix systems
Post by: bxs on May 24, 2012, 03:43:36 am
Hi, when I had the scope I also decided to put some use on a usb sniffer and use something like libusb to help me to bring it to linux/win/mac, but I came to the conclusion that I simple don't need it, I just used the soft to test it, I never felt again the need for it...

But don't be like me, start it now, before you quit  :D
Title: Re: Easy scope for *nix systems
Post by: typeglob on May 24, 2012, 11:09:28 am
Getting some dumps of USB data while using the scope with the Windows software might be a good starting point. Analyzing the protocol used is hardly the most time-consuming part; writing stable and usable software to make use of this knowledge will cost way more time.
Title: Re: Easy scope for *nix systems
Post by: l1q1d on May 25, 2012, 07:30:06 am
Thank you for all replays but:
- siglent/atten doesn't create a utbtmc device (probably for firmware implementation)
- all calls for button are created in the same way (64 char message + id_of_call) and i already map them

i'd like to write a native linux/mac app in qt using libusb.

is there an libusb expert?
Title: Re: Easy scope for *nix systems
Post by: l1q1d on May 25, 2012, 09:56:33 am
The request is quite simple:
first
Code: [Select]
43 6F 6D 6D 07 00 40 00 14 00 00 00 00 00 00 00 (Comm..@.........)
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 (................)
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 (................)
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 (................)
then
Code: [Select]
44 53 4F 50 50 56 32 30 00 00 00 04 00 04 00 00 (DSOPPV20........)
TT 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 (................)
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 (................)
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 (................)
where TT is:
 
Code: [Select]
HorizontalMenuButton -> Hex(16)
 MeasureButton -> Hex(50)
 AcquireButton -> Hex(10)
 DisplayButton -> Hex(39)
 SavercalButton -> Hex(25)
 UtilityButton -> Hex(36)
 TrigMenuButton -> Hex(28)
 DefaultSetupButton -> Hex(30)
 AutoButton -> Hex(20)
 Setto50Button -> Hex(46)
 ForceButton -> Hex(15)
 SingleButton -> Hex(35)
 Ch1Button -> Hex(14)
 Ch2Button -> Hex(9)
 RefButton -> Hex(24)
 MathButton -> Hex(29)
  MenuButton1 -> Hex(38)
 MenuButton2 -> Hex(26)
 MenuButton3 -> Hex(13)
 MenuButton4 -> Hex(23)
 MenuButton5 -> Hex(43)
 ScopeButton -> Hex(51)
 MeterButton -> Hex(53)
 RecorderButton -> Hex(57)
 ForUperButton -> Hex(52)
 ForLeftButton -> Hex(54)
 ForDownButton -> Hex(58)
 ForRightButton -> Hex(56)
 Ch1VButton -> Hex(59)
 Ch1mvButton -> Hex(65)
 TimeSButton -> Hex(61)
 TimensButton -> Hex(62)
 Ch2VButton -> Hex(64)
 Ch2mvButton -> Hex(70)
 CursorsButton -> Hex(45)
 RunstopButton -> Hex(40)
 MenuoffButton -> Hex(8)
 HorizontalLargeSpinClickDown -> Hex(21)
 Ch1VerLargeSpinClickDown -> Hex(17)
 Ch2VerLargeSpinClickDown -> Hex(27)
Title: Re: Easy scope for *nix systems
Post by: Ed.Kloonk on May 25, 2012, 01:13:24 pm
I have a few questions.

Have you contacted the manufacturer and asked them if there is any reason why they cant help you develop non-windows versions? There may be problems with their hardware agreements conflicting with the GPL.

If that is the case, could I suggest you concentrate on just a usb-scope library. The GUI should be on another modular layer, the lib-usb-scope can be freed up to attract devs from numerous scopes. The GUI then only has to deal with the output and control which is what a hardware scope does anyhow funnily enough.

I know you want a get running a QT interface with basic functionality for your scope, but if you have a nice lib with a few other brand's scopes up and running, it gives us a bit more leverage to shame the one maker who wont help by providing the technical info needed to write the driver.

Haven't had much to do with libusb btw.

 :)
Title: Re: Easy scope for *nix systems
Post by: l1q1d on May 25, 2012, 01:33:05 pm
I contacted Siglent but i received no answer at all.
I will create a protocol-lib and a gui (as i stated before) also because real problem isn't the gui but the reverse engineering of the protocol. I have already designed the protocol lib structure but it's a lot work for one developer only.
Title: Re: Easy scope for *nix systems
Post by: Ed.Kloonk on May 25, 2012, 01:37:05 pm
I contacted Siglent but i received no answer at all.
I will create a protocol-lib and a gui (as i stated before) also because real problem isn't the gui but the reverse engineering of the protocol. I have already designed the protocol lib structure but it's a lot work for one developer only.

Indeed. Esp when the company is waiting for you to do all the heavy lifting and then use your code in the "now supports linux" version. Be careful.

Title: Re: Easy scope for *nix systems
Post by: l1q1d on May 25, 2012, 01:39:19 pm
Probably but do you think that i could release a commercial software?
Title: Re: Easy scope for *nix systems
Post by: Ed.Kloonk on May 25, 2012, 01:59:31 pm
Probably but do you think that i could release a commercial software?

Well, commercial is an interesting territory. You'd need to confirm that any code that you develop doesn't violate the scope's terms of use. This might mean any reverse engieneering and after the fact software that offends any clause in your user agreement if you have one.

The whole point is I don't know what you are capable of. I am sure you could, if you wanted to, make a perfectly good platform agnostic interface (like they should have done). My problem is the company should have the foresight to at least help you.

Going by what you've told me, the company has, IMO, a problem of being stuck in a time warp. I mean releasing a windows-only client for such a device is so nineteen nineties. With open source devices around so much now with Android everywhere and gadgets such as the Raspberry PI, it's short sighted to think that windows is the only platform in which developers would use such a scope.

If it's true that your email to them was ignored without so much of even a patronising "Linux, we aren't interested" response, suggests the company is fully head in the sand. The person responsible for answering emails should not only be reprimanded but sacked. As should be the whole upper manageable for being locked brain dead into Microsoft for the immediate future.

JMO.


edit: typo
Title: Re: Easy scope for *nix systems
Post by: Bored@Work on May 25, 2012, 08:34:19 pm
Well, commercial is an interesting territory. You'd need to confirm that any code that you develop doesn't violate the scope's terms of use. This might mean any reverse engieneering and after the fact software that offends any clause in your user agreement if you have one.

First the typical disclaimer: Of course one needs to check with a local lawyer for legal advice.

In general, the the EU has this computer program copyright directive, which has buried inside such nice statements (and some not so nice ones) like

Quote
Article 5

Exceptions to the restricted acts

...

3. The person having a right to use a copy of a computer program shall be entitled, without the authorisation of the rightholder, to observe, study or test the functioning of the program in order to determine the ideas and principles which underlie any element of the program if he does so while performing any of the acts of loading, displaying, running, transmitting or storing the program which he is entitled to do.

Quote
Article 6

Decompilation

1. The authorisation of the rightholder shall not be required where reproduction of the code and translation of its form within the meaning of points (a) and (b) of Article 4(1) are indispensable to obtain the information necessary to achieve the interoperability of an independently created computer program with other programs, provided that the following conditions are met:

(a) those acts are performed by the licensee or by another person having a right to use a copy of a program, or on their behalf by a person authorised to do so;

(b) the information necessary to achieve interoperability has not previously been readily available to the persons referred to in point (a); and

(c) those acts are confined to the parts of the original program which are necessary in order to achieve interoperability.

2. The provisions of paragraph 1 shall not permit the information obtained through its application:

(a) to be used for goals other than to achieve the interoperability of the independently created computer program;

(b) to be given to others, except when necessary for the interoperability of the independently created computer program; or

(c) to be used for the development, production or marketing of a computer program substantially similar in its expression, or for any other act which infringes copyright.

3. In accordance with the provisions of the Berne Convention for the protection of Literary and Artistic Works, the provisions of this Article may not be interpreted in such a way as to allow its application to be used in a manner which unreasonably prejudices the rightholder's legitimate interests or conflicts with a normal exploitation of the computer program.


We are not in the US here, we are allowed to reverse engineer software by studying it and even decompiling it within certain limits, for the purpose of achieving interoperability. Without going to jail.


Regarding a commercial program, there is simply no market for it. Atten/Siglent provide cheap throw-away products. People who need certain communication functions know why they buy brand names instead, stick with Windows, and pay $$$ for LabView. Because they need working stuff. Although Windows and LabView are awfull.

People who buy cheap oscilloscopes buy them because they are cheap and they don't want to or can't spend more. Among the few that would spend extra there are even fewer using Linux.

If you want to write such a software do it for the love of it or because you badly need it. But don't expect to make any money.
Title: Re: Easy scope for *nix systems
Post by: typeglob on May 25, 2012, 11:33:35 pm
The request is quite simple:
first
Code: [Select]
43 6F 6D 6D 07 00 40 00 14 00 00 00 00 00 00 00 (Comm..@.........)
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 (................)
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 (................)
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 (................)
This is all for controlling the scope from a PC via USB, right? Not sending measurement data from the scope to the PC.
Title: Re: Easy scope for *nix systems
Post by: l1q1d on May 26, 2012, 05:29:50 am
That is the request from the program to the scope, then there is the answer os the scope 8x512 char, i can send the logs to you.
Title: Good news
Post by: l1q1d on June 17, 2012, 08:02:21 am
Due to the similarity between waveace and siglent/atten i found on national instrument forum the implementation of the ethernet communication. The data algorithm is quite complicated, but it's very helpful.



Any labview guru?
Title: Update Easy scope for *nix systems
Post by: l1q1d on October 02, 2012, 07:53:17 am
I was finally contacted by the siglent customer service. After two month while they monkeys me with vain promises of usbtmc support they stop all development on the old sds1000CM series for a new product. I suggest all siglent users to send a complain e-mail to the sales director Jelin Wei jelin.wei_at_siglent.com.