Giter Site home page Giter Site logo

hhornbacher / idso1070-protocol Goto Github PK

View Code? Open in Web Editor NEW
15.0 4.0 1.0 978 KB

This is a reverse engineered implementation of the protocol used to communicate with the mixed signal oscilloscope IDSO1070 from Hantek. It's possible to communicate with the device over WiFi (TCP) as well as USB.

License: MIT License

CMake 6.67% Shell 0.12% C++ 91.10% C 2.12%
protocol cmake oscilloscope signal-analysis signal-processing hantek idso1070

idso1070-protocol's Introduction

IDSO1070 Protocol Library (for Linux)

This is a reverse engineered implementation of the protocol used to communicate with the 2 channel digital storage oscilloscope IDSO1070 from Hantek. It's possible to communicate with the device over WiFi (TCP) as well as USB.

USB ID: 0483:5740 [STMicroelectronics STM32F407]

Current state of development

Attention: This is not a production ready version, there's still a lot of stuff to do. If you're interested to support this library, just contact me.

Features

  • Connection to device with WiFi (TCP) or USB
  • Send command packets (Packet Format)
  • Receive and parse command response and sample data packets (Packet Format)

Next steps

Library

  • Handling for interrupted connections
  • Better overall exception handling

GUI

  • Implement sample streaming and visualization
  • Add controls for device settings
  • Add controls to display device infos

Dependencies

On Ubuntu/Mint you can run apt install libboost-all-dev libgtkmm-3.0-dev cmake gcc to install the dependencies. You have to compile and install liquid-dsp manually, for instructions follow the link above.

Build instructions

Just run the build.sh or execute following commands in your shell:

mkdir build
cd build
cmake ..
make
sudo make install

To run the GUI without installing, you can execute the run.sh

There is also a pre configured task for building (CTRL-SHIFT-B) in vscode and a launch.json to debug(F5).

Directories

  • gui: Simple Gtk GUI
  • lib: Implementation of the protocol itself
  • include: Library headers
  • cmake: Helper scripts for cmake

Links

idso1070-protocol's People

Contributors

hhornbacher avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

polluks

idso1070-protocol's Issues

Build on MacOs

Hi, I have been trying to build on macos, but without success so far. Here is where I am currently:

• installed all dependencies successfully with brew
• cloned code
• cmake .. output:

-- The C compiler identification is AppleClang 9.1.0.9020039
-- The CXX compiler identification is AppleClang 9.1.0.9020039
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Boost version: 1.67.0
-- Found pthread: /usr/lib/libpthread.dylib  
-- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.29.2") 
-- Checking for module 'gtkmm-3.0'
--   Found gtkmm-3.0, version 3.22.2
-- Found liquiddsp: /usr/local/lib/libliquid.dylib  
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/user/temp/idso1070-protocol/build

Then I issued make.
Got this error:

/idso1070-protocol/include/IDSO1070.h:30:12: error: implicit instantiation of undefined
      template 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >'
    string armFirmwareVersion;
           ^

which I fixed by adding #include <string> in the /idso1070-protocol/include/base.h file

Then I got this:

/idso1070-protocol/lib/connection/USBConnector.cxx:1:
/Users/cprinoth/temp/idso1070-protocol/include/connection/USBConnector.h:18:37: error: use of undeclared
      identifier 'B4000000'
  static const int USBSerialSpeed = B4000000;
                                    ^

which I fixed by just adding #define B4000000 0010017 to idso1070-protocol/include/connection/USBConnector.h

But now I get:

/bin/sh: objcopy: command not found
make[2]: *** [gui-resources] Error 127
make[1]: *** [gui/resources/CMakeFiles/gui-resources.dir/all] Error 2
make: *** [all] Error 2

Not sure how to fix this.

Any help is appreciated.

Roll Mode

Could you make the Roll Mode work? More info about the flow once activated the Roll Mode:
-> AA 02 00 00
<- (byte 8 (maybe also 9) contain how many samples next scan) like 05 00, use this number as next progressive
-> AA 02 05 00
<- (byte 8,9: 07 00), jump of 2
-> AA 02 05 00
<- (byte 8,9: 0A 00), jump of 3 confirm the total samples: 2+3=5, acquire samples...
-> AA 04 0A 00 (0A = 10 samples totally, 5 each channel or 10 on one channel)
<- (data in, just first 10 data bytes are valid)
-> AA 02 0A 00
<- (byte 8,9: 0F 00 -> jump of 5, also next acquisition is 5 samples)
-> AA 04 0A 00
<- (data in)
-> AA 02 0F 00
<- (byte 8,9: 15 00 -> jump of 6, next acquisition has 6 samples)
-> AA 04 0C 00
<- (data in, 6 samples, 12 bytes)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.