-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
107 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
*.pyc | ||
*.swp | ||
.venv | ||
|
||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
VERSION="0.0.1" | ||
|
||
help: | ||
@echo "The following make targets are available:\n" | ||
@echo " dep install dependencies (requirements)" | ||
@echo " dep-dev install dependencies for packaging" | ||
@echo " build build python package" | ||
@echo " install install python package" | ||
@echo " pypi upload package to pypi" | ||
@echo " clean clean up package and cruft" | ||
.PHONEY: help | ||
|
||
|
||
dep: | ||
python -m pip install -r requirements.txt | ||
.PHONEY: dep | ||
|
||
dep-dev: | ||
python -m pip install -r requirements-dev.txt --upgrade | ||
.PHONEY: dep-dev | ||
|
||
build: | ||
python -m build | ||
.PHONEY: build | ||
|
||
install: | ||
python -m pip install dist/ut8803e-$(VERSION).tar.gz | ||
.PHONEY: install | ||
|
||
clean: | ||
rm -rf dist | ||
rm -rf src/ut8803e.egg-info | ||
rm -rf src/ut8803e/__pycache__ | ||
.PHONEY: clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Protocol | ||
|
||
To my knowledge, there is no official protocoll documentation published by the | ||
manufacturer. So the protocol and data formats described below were reverse | ||
engineered. By sniffing the communication between the instrument and the | ||
original vendor software. | ||
|
||
If you are interested in the revering process you can read about it in my | ||
[blog](https://techbotch.org/blog/ut8803e-bench-meter/) (sorry, German only). | ||
|
||
The instrument speaks USB-HID via the integrated CP2110 USB UART bridge. | ||
Commands and data records are binary. | ||
|
||
|
||
## Data logging | ||
|
||
The instrument continuously streams measurement data at a rate of about 3 | ||
readings per second. This happens automatically – no specific polling command | ||
is required. | ||
|
||
## Commands | ||
|
||
The following commands (given in hex) are supported and do exactly what the | ||
corresponding press of a physical button would do: | ||
|
||
abcd04460001c2 # Hold | ||
abcd04470001c3 # Back light | ||
abcd04480001c4 # Select | ||
abcd04490001c5 # Manual Range | ||
abcd044a0001c6 # Auto Range | ||
abcd044b0001c7 # Min/Max | ||
abcd044c0001c8 # Exit Min/max | ||
abcd044d0001c9 # Rel | ||
abcd044e0001ca # D Value | ||
abcd044f0001cb # Q Value | ||
abcd04500001cc # Exit DQR | ||
abcd04510001cd # R value | ||
abcd04580001d4 # request device-ID | ||
|
||
The original vendor software (Windows only) always sends some kind of | ||
confirmation package after each command package (`abcd045a0001d6`). However, it | ||
is unclear what this really does because all command packages I tested seem to | ||
work fine without the extra package. | ||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
[build-system] | ||
requires = ["setuptools", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
[project] | ||
name = "ut8803e" | ||
version = "0.0.1" | ||
description = "Talking to a UNI-T UT8803/UT8803E bench multimeter" | ||
readme = "README.md" | ||
requires-python = ">=3.8" | ||
authors = [ | ||
{name="Philipp Pagel", email="[email protected]" }, | ||
] | ||
license = {text="BSD 3-Clause License"} | ||
dependencies = [ | ||
"click", | ||
"pycp2110", | ||
"construct", | ||
] | ||
[project.scripts] | ||
ut8803e = "ut8803e.ut8803e:main" |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from .ut8803e import * | ||
|
||
if __name__ == '__main__': | ||
main() |
File renamed without changes.