Manage StarTech Industrial USB Hubs from Python API, a CLI, and a web GUI. Unofficial.
Project description
st-uhubm
Manage StarTech Managed Industrial USB Hubs on Linux from Python, a CLI, or an optional web GUI.
Unofficial. Not affiliated with, endorsed by, or supported by StarTech.com. "StarTech" is a trademark of its respective owner. This package wraps StarTech's proprietary
cusbi/cusbacontrol binary, which user must obtain separately and which is not redistributed here.
Supported hardware: 5G7AINDRM-USB-A-HUB (7-port) and 5G4AINDRM-USB-A-HUB
(4-port), firmware v04+. These hubs expose a serial control channel (enumerating
as /dev/ttyUSBn); this is not uhubctl or PPPS.
Install
pip install st-uhubm # library + CLI
pip install "st-uhubm[gui]" # also the web GUI
Then install StarTech's binary separately (from the product's 'Drivers & Downloads'
page) and put cusbi (x86) or cusba (ARM) on PATH. See the
user manual for details.
Quick start
stuhubm health # check the binary is found, list hubs
stuhubm list # discover hubs
stuhubm status /dev/ttyUSB0 # show port states
stuhubm off /dev/ttyUSB0 3,4 # turn ports 3 and 4 off
stuhubm on /dev/ttyUSB0 3 # turn port 3 on
stuhubm save /dev/ttyUSB0 # persist current states to flash
Python:
from st_uhubm import discover
hub = discover()[0]
hub.set_port(4, on=False) # power-cycle a device under test
hub.set_port(4, on=True)
GUI:
stuhubm-gui # http://localhost:8080
Why
Built for embedded testing / CI use: power-cycling DUT from a pipeline. The parsing (hub discovery output, the little-endian port bitmap) lives in pure text processing functions, so behavior is predictable and the logic is easy to test without hardware.
Project layout
src/st_uhubm/
__init__.py # public API
errors.py # exception hierarchy
cli_backend.py # parsers + HubManager/Hub + subprocess wrapper
cli.py # `stuhubm` Click CLI
gui.py # `stuhubm-gui` NiceGUI app (optional [gui] extra)
docs/ # Sphinx docs
Development
pip install -e ".[gui,docs]"
python -m sphinx -b html docs docs/_build/html # build the docs locally
Documentation
Full manual and auto-generated API reference: Read the Docs (source: docs/USER_MANUAL.rst).
License
This code is licensed under the GNU General Public License, version 2 or later
(GPL-2.0-or-later). StarTech's cusbi/cusba binary is not included and
remains the property of StarTech.com under its own terms.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file st_uhubm-0.1.0.tar.gz.
File metadata
- Download URL: st_uhubm-0.1.0.tar.gz
- Upload date:
- Size: 26.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f0bbf96f31034de954b56cf75fdd52afb4fd7e34bac874c949ad8b9bbb60c36
|
|
| MD5 |
e17478816b34888ec58adc71eeadf9d5
|
|
| BLAKE2b-256 |
223d1a017c4c1a1db0ff52f896d62b89ec1a41645ca35675b0f9da0c9df37d58
|
Provenance
The following attestation bundles were made for st_uhubm-0.1.0.tar.gz:
Publisher:
release.yml on anderlee-nordic/st-uhubm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
st_uhubm-0.1.0.tar.gz -
Subject digest:
9f0bbf96f31034de954b56cf75fdd52afb4fd7e34bac874c949ad8b9bbb60c36 - Sigstore transparency entry: 1819692993
- Sigstore integration time:
-
Permalink:
anderlee-nordic/st-uhubm@9d11202a08e5bf72c673ebb0532cf7ed25bbdde2 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/anderlee-nordic
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@9d11202a08e5bf72c673ebb0532cf7ed25bbdde2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file st_uhubm-0.1.0-py3-none-any.whl.
File metadata
- Download URL: st_uhubm-0.1.0-py3-none-any.whl
- Upload date:
- Size: 21.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0e47a5b1e4737267211682a0960a3c8079303d93cbe51febb91140f36fa13b4
|
|
| MD5 |
e520ba2badbf56fc7c02d7378bbdcf0e
|
|
| BLAKE2b-256 |
4d041cebe576e05aa78ca4a784213cdda0e663865cf1159b4c3e746e6f81ff3c
|
Provenance
The following attestation bundles were made for st_uhubm-0.1.0-py3-none-any.whl:
Publisher:
release.yml on anderlee-nordic/st-uhubm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
st_uhubm-0.1.0-py3-none-any.whl -
Subject digest:
f0e47a5b1e4737267211682a0960a3c8079303d93cbe51febb91140f36fa13b4 - Sigstore transparency entry: 1819693015
- Sigstore integration time:
-
Permalink:
anderlee-nordic/st-uhubm@9d11202a08e5bf72c673ebb0532cf7ed25bbdde2 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/anderlee-nordic
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@9d11202a08e5bf72c673ebb0532cf7ed25bbdde2 -
Trigger Event:
push
-
Statement type: