文档Documentation

快速上手 SmartUSBHubGet started with SmartUSBHub

几分钟内点亮第一个端口 — 安装、连接、控制,一步到位。Light up your first port in minutes — install, connect, control.

安装 Python 库Install the library

需要 Python 3.7+,通过 pip 安装:Requires Python 3.7+. Install via pip:

pip install smartusbhub

连接设备Connect the device

将 SmartUSBHub 通过 USB 连接到主机。无需安装驱动,系统会自动识别为 USB CDC 设备。Connect SmartUSBHub via USB — no driver needed, the OS detects it as a USB CDC device.

扫描并连接Scan and connect

调用 scan_and_connect() 自动找到并连接设备:Call scan_and_connect() to find and connect automatically:

from smartusbhub import SmartUSBHub hub = SmartUSBHub.scan_and_connect() channels = hub.get_channels()

控制通道Control channels

控制电源、数据线并读取测量值:Control power, data lines and read measurements:

# 开第 1 路电源 hub.set_channel_power(1, True) # 断开数据线(保持供电) hub.set_channel_usb2_dataline(1, False) # 读电压 / 电流 m = hub.get_channel_measurements(1)
需要帮助?Need help?

完整 API 参考与示例见 SDK 页,或直接联系我们。Full API reference and examples on the SDK page, or reach out.

Python SDK技术支持Support



功能Capability SmartUSBHub Pro 4CH SmartUSBHub Pro 7CH
电源控制Power control
USB 2.0 数据线控制USB2 data-line control
普通 / 互锁模式Normal / interlock
断电状态恢复Power-loss recovery
电压/电流感测V/I sensing标配standardADV 版ADV only
过流监控(软件上报)Overcurrent monitoring保险丝(硬件)fuse (hardware)ADV 版ADV only