| Products > Test Equipment |
| SainSmart DDS120 & DDS140 USB Oscilloscope |
| << < (24/84) > >> |
| ganzuul:
psynapse, I'm not an expert. Far from it. What I know is that Altera must release a complete JTAG-related description file, on request if needed, for them to be allowed to claim IEEE 1149.1 compliance. This lets you perform a JTAG boundary scan, and enumerate what I presume to be a kind of API. There are a myriad of companies who provide the service of "code extraction". CPLDs are non-volatile, so they don't store their information in an EEPROM. Still, the companies say they can extract the firmware and apparently there have even been complaints that the fuse-blowing mechanism of the MAXII can be circumvented. - I very much doubt that these companies employ Ion Beam Workstations etc. to do the code extraction, but rather they have simply read a lot of product manuals. There are talks, by smooth speakers with pleasant English accents, who do a good job of explaining the RE bits: I'll see if I can find out how to dump MAXII firmwares, and report my findings. psynapse, Mmark, I got scope.cpp to compile and run on Ubuntu 14.01 LTS, but not capture data. I use the proprietary AMD driver. The trick was to save the Makefile that donut6 quoted into a file named "Makefile" in the same directory as scope.cpp, and run 'make scope' from the CLI. I have the DDS120 though, and libusb isn't happy with me simply changing ven/dev ID in scope.cpp. I will have to review the discoveries made about the control codes, and what libusb expects out of udev etc. etc. strace produces a huge amount of information. Perhaps a log analyzer exists for it already... |
| psynapse:
Ganzuul, Many thanks, there is a lot of useful information in your post. I'll dig out the bus pirate and see what I can do. Mmark, I think we are getting the error on execution because (as it says in the glcmn.cpp source) bool wxGLCanvasBase::SetCurrent(const wxGLContext& context) const { // although on MSW it works even if the window is still hidden, it doesn't // work in other ports (notably X11-based ones) and documentation mentions // that SetCurrent() can only be called for a shown window, so check for it wxASSERT_MSG( IsShown(), wxT("can't make hidden GL canvas current") ); My challenge is finding out which window! I also get several (scope:7780): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width -5 and height 17 warnings BTW, I do not know libusb, but note that the eeprom (for both the DDS120 and DDS140) store the following data in their first 8 bytes 0 0xC2 1 Vendor ID (VID) L=47h 2 Vendor ID (VID) H=05h 3 Product ID (PID) L=31h 4 Product ID (PID) H=21h 5 Device ID (DID) L 6 Device ID (DID) H 7 Configuration byte To my mind that means that the USB code should be 0547:2131. I cannot square that with Donut6s code, and when I have fixed my problems I will check this out. Donut6, your code is proving really useful, could you give an idea on the VID/PID issue? |
| donut6:
psynapse, Check out page 53 of the EZ USB TRM PDF - C2 load format. Apparently, the VID/PID/DID here isn't used by most applications. On the assertion error. This line: --- Code: --- glPane->SetCurrent(*m_context); --- End code --- Must be called too early. (I'm using debian/kde) So, delete that line, and move it later on... not sure where! Try here after Layout() is called (later on in the same function): --- Code: --- this->Layout(); glPane->SetCurrent(*m_context); --- End code --- edit: and add Show() and Raise() while we are at it: --- Code: --- this->Layout(); this->Show(); this->Raise(); glPane->SetCurrent(*m_context); --- End code --- good luck! |
| psynapse:
Donut6, yep, those code mods worked a treat. First time I have connected the scope to my linux system, and of course you are right, it enumerates at 8312 8312 A word to the folk like me. running scope as root does not work. I had to change the permissions in dev/bus/usb/XXX/YYY to allow myself access and the application works. Obviously more work to do, but the fundamentals (ie the difficult bit) are done. Well done donut6 EDIT: Started playing with the code and note that the 39khz mode does not acquire. Have added a menu option for the 940A command (which is 240khz), and at first that did not work either. That is simply explained :- the FIFO never shows full (because it is never full!). By the simple expedient of commenting out the line if (w == 0x21) // fifo full the software is forced to get data from the buffer, which it does! And everything works This is clearly not the right coding solution however. In addition, if this is the way the DDS120 normally works, the software as it stands will not handle that device. None of this should be seen as criticism:- I am delighted to get my hands on some code that works, and works under linux . As I have already said, Donut6s work is a really sound foundation on which to build. Bravo. |
| mmark:
Psynapse & Donut6, got the original scope.cpp to work on my real linux box (again, ubuntu 14.04, nvidia X11 server...). Did not try the suggested changes to see if those make it run in the VM as well. I tried for quite a while to get my DDS120 to work with scope.cpp, but I never got any scope data from USB. After installing USBPCap and wireshark I saw that the original software (well, I only tried the Rocktech BM102) does not do any FIFO checking at all with the DDS120. Instead, there is a 0x33:0x0 command from the host and then an interrupt transfer for every frame. So I went ahead and implemented the asynchronous interrupt transfer and got some data, YEAH!! (never die much of USB programming before, so my code my look strange...) Then I also tried just the synchronous transfer without the FIFO check and this works as well. I tried this on Linux and MacOS and it works on both! Funnily enough you don't need any initialization with the DDS120, just polling for data works right away after plugging it into the USB port. I removed all the graphics related code for my test since I mainly develop on MacOSX these days and didn't have wxWidgets installed. If anybody is interested, my code (as well as Donut6's) is attached below. The paths in the Makefile are expecting libusb-1.0 to be installed in /opt/local/lib and /opt/local/include (as it is if you use macports to install libusb-1.0 and didn't change the default path), you need to change those if your libusb-1.0 is installed somewhere else. My plan is use Qt/Qwt to develop a simple scope program for MacOSX and Linux (I am quite familiar with Qt and Qwt, so I prefer that over wxWidgets, but that's just my personal preference). BTW: it's kinda strange that zip attachments are allowed on eevblog, but not tar.gz... Cheers, mmark |
| Navigation |
| Message Index |
| Next page |
| Previous page |