Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mfg92/hantek1008py
A driver for the Hantek 1008 (c?) USB-oscilloscope
https://github.com/mfg92/hantek1008py
api csv driver hantek hantek1008c linux oscilloscope python
Last synced: 18 days ago
JSON representation
A driver for the Hantek 1008 (c?) USB-oscilloscope
- Host: GitHub
- URL: https://github.com/mfg92/hantek1008py
- Owner: mfg92
- License: apache-2.0
- Created: 2017-07-02T12:39:22.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-07-19T20:32:28.000Z (4 months ago)
- Last Synced: 2024-10-12T22:30:00.135Z (about 1 month ago)
- Topics: api, csv, driver, hantek, hantek1008c, linux, oscilloscope, python
- Language: Python
- Size: 122 KB
- Stars: 18
- Watchers: 5
- Forks: 13
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Hantek1008Driver
This project provides tooling for using Hantek 1008 USB-oscilloscopes
without proprietary software on Linux and Windows (not tested).
You can include the Hantek1008 class from 'hantek1008.py' in your project
to get access to the features of the device.
Alternatively use the csvexport.py Python application to gain data and save it to a file.This project is based on careful reverse engineering of the device's USB protocol.
The reverse engineering was only done to the extent necessary to obtain data for my master's thesis and
does not cover all the features and configuration options of the device.
Therefore, no guarantees can be made as to the reliability or accuracy of the data collected.### Usageexample of csvexport.py:
`python3 csvexport.py mydata.csv -s 1 2`
This will write the measured data of channel 1 and 2 to 'mydata.csv' until you press CTRL+C to stop the measurement.### Help Options:
`python3 csvexport.py --help`
This will show you all the available options/parameters and explains them in-depth.### Notes:
* Requires Python >= 3.6
* Requires *pyusb* and *overrides* (install it using pip: `pip3 install pyusb overrides`)
* If the software can not access the usb device because of lacking accessright, do the following (tested on linux/fedora):
1. Create file "/etc/udev/rules.d/99-hantek1008.rules" with content:
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="0783", ATTR{idProduct}=="5725", MODE="0666"
2. Then `sudo udevadm control -R`
3. Replug the device
* The code contains many assert statements.
They exist because I noticed at the time that the respective responses on my device were always the same.
I was not able (nor was there any need) to find out what these responses meant,
but I wanted to be notified if the response changed for any reason, hence the assert statements.
With a different copy of the device, you might get different answers. So some asserts may fail.
Therefore, it might be necessary to remove or adapt these assert statements.### Contribution
This project is open for contributions.
Unfortunately, I have no longer access to a Hantek 1008 device,
so I cannot test contributions.
Also giving support in case of a problem is difficult under these
circumstances, but I will try my best.