mirror of
https://github.com/mvp/uhubctl.git
synced 2026-05-17 16:36:20 +03:00
Compare commits
196 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4b2c4c211f | ||
|
|
da8a260538 | ||
|
|
a9cd307a4a | ||
|
|
f45034e0d0 | ||
|
|
74ac3e6bc3 | ||
|
|
1117cc7ce2 | ||
|
|
65e3b74e60 | ||
|
|
ceadf4c13a | ||
|
|
ad94660713 | ||
|
|
ca7610ab01 | ||
|
|
c9edaf3da8 | ||
|
|
9a6e6d3a6d | ||
|
|
1af4949ce8 | ||
|
|
5dda8a874b | ||
|
|
786dcb2277 | ||
|
|
fab805bc12 | ||
|
|
a05a250644 | ||
|
|
b3fa9e7e63 | ||
|
|
fbe812bd83 | ||
|
|
d96308569c | ||
|
|
d85f100c98 | ||
|
|
65f6d48cd1 | ||
|
|
14852054e2 | ||
|
|
d00a167ab4 | ||
|
|
16001b090d | ||
|
|
42cdfb0b82 | ||
|
|
c74755be42 | ||
|
|
07abf4cbea | ||
|
|
d483981f95 | ||
|
|
2ca14eb3dd | ||
|
|
40f10578cb | ||
|
|
7604f84c95 | ||
|
|
f4b0d2ad31 | ||
|
|
a7df8f8367 | ||
|
|
a957b21815 | ||
|
|
2dbc6ce2d9 | ||
|
|
302b3c0c77 | ||
|
|
4a233824c4 | ||
|
|
e0d1c34eed | ||
|
|
153c5da267 | ||
|
|
bfc11e6b05 | ||
|
|
c9abed425c | ||
|
|
352f5878e9 | ||
|
|
169842ae97 | ||
|
|
8de8c9487f | ||
|
|
3dbc1d9e41 | ||
|
|
83ce372810 | ||
|
|
f22541cf64 | ||
|
|
2df4681826 | ||
|
|
359d887927 | ||
|
|
1f920f6b15 | ||
|
|
746891d888 | ||
|
|
83f624f3b5 | ||
|
|
61fd83ff10 | ||
|
|
cd99f0de34 | ||
|
|
3d804c1ab7 | ||
|
|
3e86729800 | ||
|
|
d556081fbb | ||
|
|
1199b9ddbc | ||
|
|
f70c2ced96 | ||
|
|
4deae1731c | ||
|
|
5cc9f154e1 | ||
|
|
7a0fbd266f | ||
|
|
e18434cd2e | ||
|
|
a34319a6d4 | ||
|
|
d18db0d2be | ||
|
|
f37dcb5cbf | ||
|
|
5bb7197f51 | ||
|
|
5b2c40db83 | ||
|
|
0d28753bcf | ||
|
|
54ab9e72d4 | ||
|
|
b16ba1b36d | ||
|
|
30372ce59f | ||
|
|
a9f2e7832d | ||
|
|
cec0435144 | ||
|
|
586b424557 | ||
|
|
1d3b841429 | ||
|
|
2f45ac6138 | ||
|
|
4c235868eb | ||
|
|
33f1ecb2dd | ||
|
|
8f355837b7 | ||
|
|
f2d97a3aad | ||
|
|
e847dc461d | ||
|
|
61fd84b0ad | ||
|
|
a54835e0ea | ||
|
|
41e1bacf41 | ||
|
|
2be4125977 | ||
|
|
2ef5f0eb0b | ||
|
|
19dfdad7f6 | ||
|
|
ce2fd9a419 | ||
|
|
20276ad5ce | ||
|
|
914060b4b5 | ||
|
|
5a46019e15 | ||
|
|
b6189d1409 | ||
|
|
554a5c7eb3 | ||
|
|
732ad2d90e | ||
|
|
dd5ff8f79d | ||
|
|
a802fa75aa | ||
|
|
24e1540006 | ||
|
|
aa7fc0a126 | ||
|
|
7099809b24 | ||
|
|
a1bc86824b | ||
|
|
9d66811175 | ||
|
|
9171fc6bad | ||
|
|
d75b10d696 | ||
|
|
88e5641fe1 | ||
|
|
b51b5addee | ||
|
|
a76f45f377 | ||
|
|
941e356c24 | ||
|
|
e1e4d45066 | ||
|
|
9263ab266e | ||
|
|
54248b8f29 | ||
|
|
06e7240db6 | ||
|
|
e1709c7b62 | ||
|
|
38ff03200d | ||
|
|
24e3680c4b | ||
|
|
5418edf9d1 | ||
|
|
a6159d68e7 | ||
|
|
ee98e43a43 | ||
|
|
4f38fde9da | ||
|
|
a022e60112 | ||
|
|
a0f8c87e08 | ||
|
|
6f1c71d5a5 | ||
|
|
7496d53f87 | ||
|
|
56ea37fc46 | ||
|
|
ed27158c11 | ||
|
|
53fd1f39ce | ||
|
|
950fce2325 | ||
|
|
61187d755c | ||
|
|
610e85ff2d | ||
|
|
5779054ccc | ||
|
|
f8cb89f4be | ||
|
|
1a7d34780f | ||
|
|
f6e99bc35d | ||
|
|
db3ae900d8 | ||
|
|
75b1f668f9 | ||
|
|
37f494ff31 | ||
|
|
bc80baa9e9 | ||
|
|
6cd357e150 | ||
|
|
5ba647ee27 | ||
|
|
69c444b75d | ||
|
|
f20007e25e | ||
|
|
46d0de4331 | ||
|
|
23c15ffcf8 | ||
|
|
16f7a6dd23 | ||
|
|
7bafc7ffb3 | ||
|
|
0a42b91382 | ||
|
|
2820f9fa27 | ||
|
|
fb85325629 | ||
|
|
e5ae7b9906 | ||
|
|
bf3971423a | ||
|
|
7757db54ac | ||
|
|
014b55ac5d | ||
|
|
92736a8604 | ||
|
|
9f1de74523 | ||
|
|
9b73c8e314 | ||
|
|
fa449eac0b | ||
|
|
9b5efa0ec0 | ||
|
|
b99a0805bb | ||
|
|
6ac502a07a | ||
|
|
f76dc98653 | ||
|
|
592d60b9ab | ||
|
|
4b663f3d15 | ||
|
|
6a43ea9c5c | ||
|
|
6f136f17fe | ||
|
|
8d8b66c5c6 | ||
|
|
1b52efddbd | ||
|
|
71a4274615 | ||
|
|
d98e6deb6e | ||
|
|
ac5a704449 | ||
|
|
1e65ff9b05 | ||
|
|
77aeb7f30b | ||
|
|
e65d077712 | ||
|
|
0cc09299fe | ||
|
|
44f963d00f | ||
|
|
d3a79ace46 | ||
|
|
0e733b6901 | ||
|
|
50d5501d91 | ||
|
|
9183aef17e | ||
|
|
4b10fdbd24 | ||
|
|
3cc17baae1 | ||
|
|
db8c4a59f3 | ||
|
|
77d8851c34 | ||
|
|
dcb1e611f7 | ||
|
|
a7b5f6b362 | ||
|
|
2a4df4ee6c | ||
|
|
f610598227 | ||
|
|
3bc22e3cd7 | ||
|
|
0f6218dfb8 | ||
|
|
91035987e4 | ||
|
|
c6927085ec | ||
|
|
5b1ae79b05 | ||
|
|
b8a1b808e7 | ||
|
|
f75bda6896 | ||
|
|
e171813596 | ||
|
|
5257d8567d |
7
.gitignore
vendored
7
.gitignore
vendored
@@ -6,3 +6,10 @@ uhubctl
|
||||
|
||||
# Mac symbols
|
||||
*.dSYM
|
||||
|
||||
# Patches
|
||||
*.patch
|
||||
*.diff
|
||||
|
||||
# IDE config dirs
|
||||
.*/
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
class Uhubctl < Formula
|
||||
desc "control USB hubs powering per-port"
|
||||
homepage "https://github.com/mvp/uhubctl"
|
||||
head "https://github.com/mvp/uhubctl.git"
|
||||
|
||||
depends_on "libusb"
|
||||
|
||||
def install
|
||||
system "make"
|
||||
bin.install "uhubctl"
|
||||
end
|
||||
|
||||
test do
|
||||
system "#{bin}/uhubctl", "-v"
|
||||
end
|
||||
end
|
||||
2
LICENSE
2
LICENSE
@@ -1,6 +1,6 @@
|
||||
uhubctl – USB hub per-port power control.
|
||||
|
||||
Copyright (c) 2009-2020, Vadim Mikhailov
|
||||
Copyright (c) 2009-2025, Vadim Mikhailov
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
36
Makefile
36
Makefile
@@ -10,40 +10,38 @@ INSTALL := install
|
||||
INSTALL_DIR := $(INSTALL) -m 755 -d
|
||||
INSTALL_PROGRAM := $(INSTALL) -m 755
|
||||
RM := rm -rf
|
||||
PKG_CONFIG ?= pkg-config
|
||||
|
||||
CC ?= gcc
|
||||
CFLAGS ?= -g -O0
|
||||
CFLAGS += -Wall -Wextra -std=c99 -pedantic
|
||||
GIT_VERSION := $(shell git describe --match "v[0-9]*" --abbrev=8 --dirty --always --tags | cut -c2-)
|
||||
CFLAGS += -Wall -Wextra -Wno-zero-length-array -std=c99 -pedantic
|
||||
GIT_VERSION := $(shell git describe --match "v[0-9]*" --abbrev=8 --dirty --tags | cut -c2-)
|
||||
ifeq ($(GIT_VERSION),)
|
||||
GIT_VERSION := $(shell cat VERSION)
|
||||
GIT_VERSION := $(shell cat VERSION)
|
||||
endif
|
||||
CFLAGS += -DPROGRAM_VERSION=\"$(GIT_VERSION)\"
|
||||
|
||||
# Use hardening options on Linux
|
||||
ifeq ($(UNAME_S),Linux)
|
||||
LDFLAGS += -Wl,-zrelro,-znow -lusb-1.0
|
||||
LDFLAGS += -Wl,-zrelro,-znow
|
||||
endif
|
||||
|
||||
ifeq ($(UNAME_S),Darwin)
|
||||
ifneq ($(wildcard /opt/local/include),)
|
||||
# MacPorts
|
||||
CFLAGS += -I/opt/local/include
|
||||
LDFLAGS += -L/opt/local/lib
|
||||
endif
|
||||
# Use pkg-config if available
|
||||
ifneq (,$(shell which $(PKG_CONFIG)))
|
||||
CFLAGS += $(shell $(PKG_CONFIG) --cflags libusb-1.0)
|
||||
LDFLAGS += $(shell $(PKG_CONFIG) --libs libusb-1.0)
|
||||
else
|
||||
# But it should still build even if pkg-config is not available
|
||||
CFLAGS += -I/usr/include/libusb-1.0
|
||||
LDFLAGS += -lusb-1.0
|
||||
endif
|
||||
|
||||
ifeq ($(UNAME_S),FreeBSD)
|
||||
LDFLAGS += -lusb
|
||||
endif
|
||||
|
||||
ifeq ($(UNAME_S),NetBSD)
|
||||
CFLAGS += $(shell pkg-config --cflags libusb-1.0)
|
||||
LDFLAGS += $(shell pkg-config --libs libusb-1.0)
|
||||
endif
|
||||
|
||||
PROGRAM = uhubctl
|
||||
|
||||
.PHONY: all install clean
|
||||
|
||||
all: $(PROGRAM)
|
||||
|
||||
$(PROGRAM): $(PROGRAM).c
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) $@.c -o $@ $(LDFLAGS)
|
||||
|
||||
|
||||
324
README.md
324
README.md
@@ -11,69 +11,130 @@ https://www.gniibe.org/development/ac-power-control-by-USB-hub
|
||||
Compatible USB hubs
|
||||
===================
|
||||
|
||||
Note that very few hubs actually support per-port power switching.
|
||||
Note that not many USB hubs correctly support per-port power switching.
|
||||
Some of them are no longer manufactured and can be hard to find.
|
||||
|
||||
This is list of known compatible USB hubs:
|
||||
|
||||
| Manufacturer | Product | Ports | USB | VID:PID | Release | EOL |
|
||||
|:-------------------|:-----------------------------------------------------|:------|:----|:----------|:--------|:-----|
|
||||
| Acer | BE270U monitor ([see](https://tinyurl.com/acer550)) | 4 | 3.0 |`2109:2811`| 2016 | |
|
||||
| AmazonBasics | HU3641V1 ([RPi issue](https://goo.gl/CLt46M)) | 4 | 3.0 |`2109:2811`| 2013 | |
|
||||
| AmazonBasics | HU3770V1 ([RPi issue](https://goo.gl/CLt46M)) | 7 | 3.0 |`2109:2811`| 2013 | |
|
||||
| AmazonBasics | HU9002V1SBL ([RPi issue](https://goo.gl/CLt46M)) | 10 | 3.1 |`2109:2817`| 2018 | |
|
||||
| AmazonBasics | HUC9002V1ESL ([RPi issue](https://goo.gl/CLt46M)) | 10 | 3.1 |`2109:2817`| 2018 | |
|
||||
| AmazonBasics | HU9003V1EBL, HUC9003V1EBL | 7 | 3.1 |`2109:2817`| 2018 | |
|
||||
| AmazonBasics | HU9002V1SBL, HU9002V1EBL, HU9002V1ESL ([note](https://tinyurl.com/HU9002)) | 10 | 3.1 |`2109:2817`| 2018 | |
|
||||
| AmazonBasics | HUC9002V1SBL, HUC9002V1EBL, HUC9002V1ESL | 10 | 3.1 |`2109:2817`| 2018 | |
|
||||
| AmazonBasics | U3-7HUB (only works for 1 charge port) | 7 | 3.0 |`2109:2813`| 2020 | |
|
||||
| Anker | AK-68ANHUB-BV7A-0004 ([note](https://git.io/JLnZb)) | 7 | 3.0 |`2109:0812`| 2014 | |
|
||||
| Apple | Mac Mini M4 (2 front ports only) | 2 | 3.2 |`05AC:800B`| 2024 | |
|
||||
| Apple | MacBook Air (Late 2010) | 2 | 2.0 |`1D6B:0002`| 2010 | 2020 |
|
||||
| Apple | Pro Display XDR MWPE2LL/A (internal USB hub) | 4 | 2.0 |`05AC:9139`| 2019 | |
|
||||
| Apple | Thunderbolt Display 27" (internal USB hub) | 6 | 2.0 | | 2011 | 2016 |
|
||||
| Apple | USB Keyboard With Numeric Pad (internal USB hub) | 3 | 2.0 | | 2011 | |
|
||||
| Asus | Z77 Sabertooth Motherboard (onboard USB hub) | 6 | 2.0 | | 2012 | |
|
||||
| Asus | Z87-PLUS Motherboard (onboard USB hub) | 4 | 3.0 | | 2013 | 2016 |
|
||||
| Aukey | CB-C59 | 4 | 3.0 |`2109:2813`| 2017 | |
|
||||
| B+B SmartWorx | UHR204 | 4 | 2.0 |`0856:DB00`| 2013 | |
|
||||
| B+B SmartWorx | USH304 | 4 | 3.0 |`04B4:6506`| 2017 | |
|
||||
| B+B SmartWorx | USH304 | 4 | 3.0 |`04B4:6506`| 2017 | 2019 |
|
||||
| Basler | 2000036234 | 4 | 3.0 |`0451:8046`| 2016 | |
|
||||
| Belkin | F5U101 | 4 | 2.0 |`0451:2046`| 2005 | 2010 |
|
||||
| Belkin | F5U701-BLK | 7 | 2.0 | | 2008 | 2012 |
|
||||
| Buffalo | BSH4A05U3BK | 4 | 3.0 |`05E3:0610`| 2015 | |
|
||||
| Bytecc | BT-UH340 | 4 | 3.0 |`2109:8110`| 2010 | |
|
||||
| Belkin | F5U238UKCRL-MOB | 4 | 2.0 |`0409:0059`| 2004 | 2010 |
|
||||
| BenQ | PD2700U 4K Monitor (works only in USB2 mode) | 4 | 3.0 |`05E3:0610`| 2018 | |
|
||||
| BenQ | PD3220U | 4 | 3.1 |`05E3:0610`| 2019 | |
|
||||
| Bytecc | BT-UH340 ([warning](https://tinyurl.com/BT-UH340-1)) | 4 | 3.0 |`2109:8110`| 2010 | |
|
||||
| Centech | CT-USB4HUB ReTRY HUB ([note](https://github.com/mvp/uhubctl/issues/630)) | 4 | 3.0 |`0424:2744`| 2017 | |
|
||||
| Circuitco | Beagleboard-xM (internal USB hub) | 4 | 2.0 |`0424:9514`| 2010 | |
|
||||
| Club3D | CSV-3242HD Dual Display Docking Station | 4 | 3.0 |`2109:2811`| 2015 | |
|
||||
| CyberPower | CP-H420P | 4 | 2.0 |`0409:0059`| 2004 | |
|
||||
| Cypress | CY4608 HX2VL development kit | 4 | 2.0 |`04B4:6570`| 2012 | |
|
||||
| D-Link | DUB-H4 rev B (silver) | 4 | 2.0 |`05E3:0605`| 2005 | 2010 |
|
||||
| D-Link | DUB-H4 rev D,E (black). Note: rev A,C not supported | 4 | 2.0 |`05E3:0608`| 2012 | |
|
||||
| Coolgear | USBG-12U2ML | 12 | 2.0 |`05e3:0607`| 2015 | |
|
||||
| Cypress | CY4608 HX2VL ([note](https://tinyurl.com/CY4608-1)) | 4 | 2.0 |`04B4:6570`| 2012 | |
|
||||
| D-Link | DUB-2332 rev A1 | 3 | 3.0 | | 2022 | |
|
||||
| D-Link | DUB-H4 rev D,E (black). Note: rev A,C,F not supported| 4 | 2.0 |`05E3:0608`| 2012 | |
|
||||
| D-Link | DUB-H7 rev A (silver) | 7 | 2.0 |`2001:F103`| 2005 | 2010 |
|
||||
| D-Link | DUB-H7 rev D (black). Note: rev B,C not supported | 7 | 2.0 |`05E3:0608`| 2012 | |
|
||||
| Dell | P2416D 24" QHD Monitor | 4 | 2.0 | | 2017 | |
|
||||
| D-Link | DUB-H7 rev D,E (black). Rev B,C,F,G not supported | 7 | 2.0 |`05E3:0608`| 2012 | |
|
||||
| Dell | P2416D 24" QHD Monitor ([note](https://git.io/JUAu8))| 4 | 2.0 | | 2017 | |
|
||||
| Dell | S2719DGF 27" WQHD Gaming-Monitor | 5 | 3.0 |`0424:5734`| 2018 | |
|
||||
| Dell | UltraSharp 1704FPT 17" LCD Monitor | 4 | 2.0 |`0424:A700`| 2005 | 2015 |
|
||||
| Dell | UltraSharp U2415 24" LCD Monitor | 5 | 3.0 | | 2014 | |
|
||||
| Dell | UltraSharp U3419W 34" Curved Monitor | 6 | 3.0 | | 2020 | |
|
||||
| Dell | Wyse 3040 ([-f required](https://tinyurl.com/wyse3k))| 6 | 3.0 | | 2017 | |
|
||||
| Delock | 62537 | 4 | 3.0 | | 2017 | 2021 |
|
||||
| Delock | 87445 ([note](https://git.io/Jsuz5)) | 4 | 2.0 |`05E3:0608`| 2009 | 2013 |
|
||||
| Elecom | U2H-G4S | 4 | 2.0 | | 2006 | 2011 |
|
||||
| Gigabyte | G27Q monitor ([see](http://tinyurl.com/G27Q551)) | 4 | 3.0 |`2109:0817`| 2020 | |
|
||||
| GlobalScale | ESPRESSObin SBUD102 V5 | 1 | 3.0 |`1D6B:0003`| 2017 | |
|
||||
| Hardkernel | ODROID-C4 ([note](https://git.io/JG0mP)) | 4 | 3.0 | | 2020 | |
|
||||
| Hawking Technology | UH214 | 4 | 2.0 | | 2003 | 2008 |
|
||||
| Hewlett Packard | USB-C Dock G5 5TW10AA | 5 | 3.0 |`03F0:076B`| 2019 | |
|
||||
| Hewlett Packard | P5Q58UT | 3 | 3.0 | | 2019 | |
|
||||
| IBM | SK-8815 USB Keyboard | 3 | 1.1 |`04B3:301A`| 2004 | |
|
||||
| Inateck | HB2025A ([USB2 only](https://tinyurl.com/HB2025A-1)) | 4 | 3.1 |`2109:2822`| 2021 | |
|
||||
| IOI | U3H415E1 | 4 | 3.0 | | 2012 | |
|
||||
| j5create | JUH470 (works only in USB2 mode) | 3 | 3.0 |`05E3:0610`| 2014 | |
|
||||
| j5create | JUH377 ([note](https://tinyurl.com/JUH377)) | 7 | 3.0 | | 2016 | |
|
||||
| j5create | JUH470 ([note](https://tinyurl.com/JUH470)) | 3 | 3.0 |`05E3:0610`| 2014 | |
|
||||
| Juiced Systems | 6HUB-01 | 7 | 3.0 |`0BDA:0411`| 2014 | 2018 |
|
||||
| KUNBUS GmbH | RevPi Connect (+) / S / SE | 2 | 2.0 |`0424:9514`| 2018 | |
|
||||
| KUNBUS GmbH | RevPi Connect 4 | 2 | 3.0 | | 2022 | |
|
||||
| KUNBUS GmbH | RevPi Core 3 / S / SE | 2 | 2.0 |`0424:9514`| 2017 | |
|
||||
| LG Electronics | 27MD5KL-B monitor | 4 | 3.0 |`043E:9A60`| 2019 | |
|
||||
| LG Electronics | 27GL850-B monitor | 4 | 3.0 |`0451:8142`| 2019 | |
|
||||
| LG Electronics | 27UK850-W monitor | 2 | 3.0 | | 2018 | |
|
||||
| LG Electronics | 27UN83A-W monitor | 2 | 3.0 |`0451:8142`| 2020 | |
|
||||
| LG Electronics | 38WK95C-W monitor | 4 | 3.0 |`0451:8142`| 2018 | |
|
||||
| Lenovo | ThinkPad Mini Dock Series 3 (433710U) | 6 | 2.0 |`17EF:100A`| 2016 | |
|
||||
| Lenovo | ThinkPad Ultra Docking Station (40A20090EU) | 6 | 2.0 |`17EF:100F`| 2015 | |
|
||||
| Lenovo | ThinkPad Ultra Docking Station (40AJ0135EU) | 7 | 3.1 |`17EF:3070`| 2018 | |
|
||||
| Lenovo | ThinkPad X200 Ultrabase 42X4963 | 3 | 2.0 |`17EF:1005`| 2008 | 2011 |
|
||||
| Lenovo | ThinkPad X6 Ultrabase 42W3107 | 4 | 2.0 |`17EF:1000`| 2006 | 2009 |
|
||||
| Lenovo | ThinkPlus 4-in-1 USB-C hub 4X90W86497 | 3 | 3.0 | | 2021 | |
|
||||
| Lenovo | ThinkVision T24i-10 Monitor | 4 | 2.0 |`17EF:0610`| 2018 | |
|
||||
| Lenovo | USB-C to 4 Port USB-A Hub ([USB2 only](https://github.com/mvp/uhubctl/issues/625)) | 4 | 2.0 |`17EF:103A`| 2020 | |
|
||||
| Lindy | USB serial converter 4 port | 4 | 1.1 |`058F:9254`| 2008 | |
|
||||
| Linksys | USB2HUB4 | 4 | 2.0 | | 2004 | 2010 |
|
||||
| Maplin | A08CQ | 7 | 2.0 |`0409:0059`| 2008 | 2011 |
|
||||
| Linksys | USB2HUB4 ([note](https://git.io/JYiDZ)) | 4 | 2.0 | | 2004 | 2010 |
|
||||
| Maplin | A08CQ ([red ports only](https://tinyurl.com/gh635)) | 7 | 2.0 |`0409:0059`| 2008 | 2011 |
|
||||
| Metadot | Das Keyboard 4 | 2 | 3.0 | | 2014 | |
|
||||
| Microchip | EVB9512 | 2 | 2.0 | | 2009 | |
|
||||
| Microchip | EVB-USB2517 | 7 | 2.0 | | 2008 | |
|
||||
| Microchip | EVB-USB2534BC | 4 | 2.0 | | 2013 | |
|
||||
| Microchip | EVB-USB5807 | 7 | 3.0 | | 2016 | |
|
||||
| Moxa | Uport-407 | 7 | 2.0 |`110A:0407`| 2009 | |
|
||||
| NVidia | Jetson Nano B01 ([details](https://git.io/JJaFR)) | 4 | 3.0 | | 2019 | |
|
||||
| NVidia | Jetson Xavier NX ([details](https://tinyurl.com/Xavier-NX)) | 4 | 3.0 | | 2020 | |
|
||||
| Phidgets | HUB0003_0 | 7 | 2.0 |`1A40:0201`| 2017 | |
|
||||
| Philips | 346B1C UltraWide 34" Curved Monitor | 4 | 3.0 |`05E3:0610`| 2019 | |
|
||||
| Plugable | USB3-HUB7BC | 7 | 3.0 |`2109:0813`| 2015 | |
|
||||
| Plugable | USB3-HUB7C | 7 | 3.0 |`2109:0813`| 2015 | |
|
||||
| Plugable | USB3-HUB7-81X | 7 | 3.0 |`2109:0813`| 2012 | |
|
||||
| Plugable | USB3-HUB7C (only works for 2 charge ports) | 7 | 3.0 |`2109:0813`| 2015 | |
|
||||
| Plugable | USBC-HUB7BC (works for 6/7 ports, not the rightmost) | 7 | 3.0 |`2109:0817`| 2021 | |
|
||||
| Plugable | USB3-HUB10-C2 (only works for 2 charge ports) | 10 | 3.0 | | 2014 | |
|
||||
| Port Inc | NWUSB01 | 4 | 1.1 |`0451:1446`| 1999 | 2003 |
|
||||
| Raspberry Pi | B+, 2B, 3B ([see below](#raspberry-pi-b2b3b)) | 4 | 2.0 | | 2011 | |
|
||||
| Raspberry Pi | 3B+ ([see below](#raspberry-pi-3b)) | 4 | 2.0 |`0424:2514`| 2018 | |
|
||||
| Raspberry Pi | 4B ([see below](#raspberry-pi-4b)) | 4 | 3.0 |`2109:3431`| 2019 | |
|
||||
| Raspberry Pi | 5 ([see below](#raspberry-pi-5)) | 4 | 3.0 |`1d6b:0002`| 2023 | |
|
||||
| Renesas | uPD720202 PCIe USB 3.0 host controller | 2 | 3.0 | | 2013 | |
|
||||
| Rosewill | RHUB-210 | 4 | 2.0 |`0409:005A`| 2011 | 2014 |
|
||||
| Rosonway | RSH-518C ([note](https://tinyurl.com/RSH518)) | 7 | 3.0 |`2109:0817`| 2021 | |
|
||||
| Rosonway | RSH-A10 ([see](https://tinyurl.com/2ppyyaj8)) | 10 | 3.0 |`0bda:0411`| 2020 | |
|
||||
| Rosonway | RSH-A13 ([warning](https://tinyurl.com/RSH-A13)) | 13 | 3.1 |`2109:2822`| 2021 | |
|
||||
| Rosonway | RSH-A16 ([note](https://git.io/JTawg), [warning](https://tinyurl.com/RSH-A16)) | 16 | 3.0 |`0bda:0411`| 2020 | |
|
||||
| Rosonway | RSH-A37S | 7 | 3.0 |`2109:2822`| 2021 | |
|
||||
| Rosonway | RSH-A104 ([USB2 only](https://tinyurl.com/RSH-A104)) | 4 | 3.1 |`2109:2822`| 2022 | |
|
||||
| Rosonway | RSH-ST07C ([only 4](https://tinyurl.com/4pjnujrn)) | 7 | 3.0 |`2109:2822`| 2023 | |
|
||||
| Rosonway | RSH-ST10C-6 ([note](https://tinyurl.com/428vpa2f)) | 10 | 3.1 | | 2024 | |
|
||||
| Sanwa Supply | USB-HUB14GPH | 4 | 1.1 | | 2001 | 2003 |
|
||||
| Seagate | Backup Plus Hub STEL8000100 | 2 | 3.0 |`0BC2:AB44`| 2016 | |
|
||||
| StarTech | ST4200USBM | 4 | 2.0 |`0409:005A`| 2004 | |
|
||||
| Seeed Studio | reTerminal CM4104032 | 2 | 2.0 |`0424:2514`| 2021 | |
|
||||
| Sipolar | A-173 | 7 | 3.0 |`0BDA:0411`| 2016 | |
|
||||
| StarTech | DKT30CSDHPD3 USB-C Travel Dock | 3 | 3.0 |`2109:2817`| 2018 | |
|
||||
| StarTech | HB30A4AIB ([warning](https://tinyurl.com/ycxravwk)) | 4 | 3.0 |`2109:2817`| 2018 | |
|
||||
| StarTech | HB31C2A2CB ([note](https://github.com/mvp/uhubctl/issues/601)) | 5 | 3.0 |`14B0:013D`| 2020 | |
|
||||
| Sunix | SHB4200MA | 4 | 2.0 |`0409:0058`| 2006 | 2009 |
|
||||
| Targus | PAUH212U | 7 | 2.0 | | 2004 | 2009 |
|
||||
| System Talks | Sugoi USB2-HUB4X ([warning](https://github.com/mvp/uhubctl/issues/636))|4|2.0| | 2007 | |
|
||||
| Targus | ACH155 (port 3 controls all ports) | 4 | 3.0 | | 2022 | |
|
||||
| Targus | PA095UZ | 2 | 2.0 | | 2004 | |
|
||||
| Targus | PAUH212/PAUH212U | 7 | 2.0 | | 2004 | 2009 |
|
||||
| Texas Instruments | TUSB4041PAPEVM | 4 | 2.1 |`0451:8142`| 2015 | |
|
||||
| UUGear | MEGA4 (for Raspberry Pi 4B) | 4 | 3.0 |`2109:0817`| 2021 | |
|
||||
| VirtualHere | USB3 4-port hub ([note](https://tinyurl.com/vhusb)) | 4 | 3.0 | | 2024 | |
|
||||
|
||||
This table is by no means complete.
|
||||
If your hub works with `uhubctl`, but is not listed above, please report it
|
||||
@@ -98,57 +159,83 @@ virtual hubs for power off/on changes to take effect. `uhubctl` will try to do t
|
||||
Unfortunately, while most hubs will cut off data USB connection, some may still not cut off VBUS to port,
|
||||
which means connected phone may still continue to charge from port that is powered off by `uhubctl`.
|
||||
|
||||
Installing
|
||||
==========
|
||||
|
||||
For Linux and MacOS uhubctl is available in standard package managers
|
||||
and can be installed with following commands:
|
||||
|
||||
* MacOS: `brew install uhubctl` or `sudo port install uhubctl`
|
||||
- :warning: MacOS 26+ requires [fix](https://github.com/libusb/libusb/pull/1700).
|
||||
Until libusb version 1.0.30 with this fix is released, install libusb from master:
|
||||
|
||||
brew uninstall libusb --ignore-dependencies
|
||||
brew install libusb --head
|
||||
* Ubuntu/Debian/Raspbian: `sudo apt install uhubctl`
|
||||
* Redhat/EPEL/Fedora/CentOS: `sudo yum install uhubctl`
|
||||
* OpenSUSE: `sudo zypper install uhubctl`
|
||||
* FreeBSD: `cd /usr/ports/sysutils/uhubctl && sudo make install`
|
||||
|
||||
However, uhubctl installed from standard package manager may not
|
||||
necessarily be latest version, or even severely lag behind current version.
|
||||
If [latest published](https://github.com/mvp/uhubctl/releases) uhubctl version
|
||||
is newer than what your package manager offers, you may need to compile and install
|
||||
from source as described below.
|
||||
|
||||
Compiling
|
||||
=========
|
||||
|
||||
This utility was tested to compile and work on Linux
|
||||
(Ubuntu/Debian, Redhat/Fedora/CentOS, Arch Linux, Gentoo, openSUSE, Buildroot), FreeBSD, NetBSD and Mac OS X.
|
||||
This utility was tested to compile and work on Linux (Ubuntu/Debian/Raspbian,
|
||||
Redhat/EPEL/Fedora/CentOS, Arch Linux, Gentoo, openSUSE, Buildroot),
|
||||
FreeBSD, NetBSD, SunOS and MacOS.
|
||||
|
||||
While `uhubctl` compiles on Windows, USB power switching does not work on Windows because `libusb`
|
||||
is using `winusb.sys` driver, which according to Microsoft does not support
|
||||
[necessary USB control requests](https://social.msdn.microsoft.com/Forums/sqlserver/en-US/f680b63f-ca4f-4e52-baa9-9e64f8eee101).
|
||||
[necessary USB control requests](https://web.archive.org/web/20210225235523/https://social.msdn.microsoft.com/Forums/sqlserver/en-US/f680b63f-ca4f-4e52-baa9-9e64f8eee101/how-to-send-an-quotusb-control-requestquot-to-an-usbhub?forum=wdk).
|
||||
This may be fixed if `libusb` starts supporting different driver on Windows.
|
||||
|
||||
First, you need to install library libusb-1.0 (version 1.0.12 or later, 1.0.16 or later is recommended):
|
||||
Note that it is highly recommended to have utility `pkgconf` (or `pkg-config`) installed
|
||||
(often it is installed by default).
|
||||
|
||||
* Ubuntu: `sudo apt-get install libusb-1.0-0-dev`
|
||||
* Redhat: `sudo yum install libusb1-devel`
|
||||
* MacOSX: `brew install libusb`, or `sudo port install libusb-devel`
|
||||
> :warning: `libusb-1.0.23` is [broken](https://github.com/libusb/libusb/issues/707) on MacOS Catalina!
|
||||
You have to install `libusb-1.0.22` until [libusb issue 707](https://github.com/libusb/libusb/issues/707) is fixed,
|
||||
or use this workaround to force use of older Mojave build:
|
||||
First, you need to install library libusb-1.0 (version 1.0.13 or later is required,
|
||||
1.0.23 or later is recommended):
|
||||
|
||||
brew uninstall --ignore-dependencies libusb
|
||||
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/5314f1d/Formula/libusb.rb
|
||||
|
||||
* FreeBSD: libusb is included by default
|
||||
* NetBSD: `sudo pkgin install libusb1 gmake pkg-config`
|
||||
* Ubuntu: `sudo apt-get install libusb-1.0-0-dev pkgconf`
|
||||
* Redhat: `sudo yum install libusb1-devel pkgconf`
|
||||
* OpenSUSE: `sudo zypper install libusb-1_0-devel pkgconf`
|
||||
* MacOS: `brew install libusb pkgconf`, or `sudo port install libusb-devel pkgconf`
|
||||
* FreeBSD: `pkg install gmake pkgconf` (libusb is included by default)
|
||||
* NetBSD: `sudo pkgin install libusb1 gmake pkgconf`
|
||||
* Windows: TBD?
|
||||
|
||||
To fetch uhubctl source:
|
||||
To fetch uhubctl source and compile it:
|
||||
|
||||
git clone https://github.com/mvp/uhubctl
|
||||
cd uhubctl
|
||||
make
|
||||
|
||||
This should generate `uhubctl` binary.
|
||||
You can install it in your system as `/usr/sbin/uhubctl` using:
|
||||
|
||||
sudo make install
|
||||
|
||||
To compile, simply run `make` - this will generate `uhubctl` binary.
|
||||
Note that on some OS (e.g. FreeBSD/NetBSD) you need to use `gmake` instead to build.
|
||||
|
||||
Also, for Mac OS X you can install `uhubctl` with Homebrew custom tap:
|
||||
|
||||
```
|
||||
brew tap mvp/uhubctl https://github.com/mvp/uhubctl
|
||||
brew install --HEAD uhubctl
|
||||
```
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
> :warning: On Linux, use `sudo` or configure USB permissions as described below!
|
||||
|
||||
To list all supported hubs:
|
||||
|
||||
uhubctl
|
||||
|
||||
You can control the power on a USB port(s) like this:
|
||||
|
||||
uhubctl -a off -p 2
|
||||
|
||||
This means operate on default smart hub and turn power off (`-a off`, or `-a 0`)
|
||||
on port 2 (`-p 2`). Supported actions are `off`/`on`/`cycle` (or `0`/`1`/`2`).
|
||||
on port 2 (`-p 2`). Supported actions are `off`/`on`/`cycle`/`toggle` (or `0`/`1`/`2`/`3`).
|
||||
`cycle` means turn power off, wait some delay (configurable with `-d`) and turn it back on.
|
||||
Ports can be comma separated list, and may use `-` for ranges e.g. `2`, or `2,4`, or `2-5`, or `1-2,5-8`.
|
||||
|
||||
@@ -168,14 +255,35 @@ Linux USB permissions
|
||||
=====================
|
||||
|
||||
On Linux, you should configure `udev` USB permissions (otherwise you will have to run it as root using `sudo uhubctl`).
|
||||
To fix USB permissions, first run `sudo uhubctl` and note all `vid:pid` for hubs you need to control.
|
||||
Then, add one or more udev rules like below to file `/etc/udev/rules.d/52-usb.rules` (replace with your vendor id):
|
||||
|
||||
SUBSYSTEM=="usb", ATTR{idVendor}=="2001", MODE="0666"
|
||||
Starting with Linux Kernel 6.0 there is a standard interface to turn USB hub ports on or off,
|
||||
and `uhubctl` will try to use it (instead of `libusb`) to set the port status.
|
||||
This is why there are additional rules for 6.0+ kernels.
|
||||
There is no harm in having these rules on systems running older kernel versions.
|
||||
|
||||
To fix USB permissions, first run `sudo uhubctl` and note all `vid:pid` for hubs you need to control.
|
||||
Then, add udev rules like below to file `/etc/udev/rules.d/52-usb.rules`
|
||||
(replace `2001` with your hub vendor id, or completely remove `ATTR{idVendor}` filter to allow any USB hub access):
|
||||
|
||||
SUBSYSTEM=="usb", DRIVER=="hub|usb", MODE="0666", ATTR{idVendor}=="2001"
|
||||
# Linux 6.0 or later (its ok to have this block present for older Linux kernels):
|
||||
SUBSYSTEM=="usb", DRIVER=="hub|usb", \
|
||||
RUN="/bin/sh -c \"chmod -f 666 $sys$devpath/*port*/disable || true\""
|
||||
|
||||
Note that for USB3 hubs, some hubs use different vendor ID for USB2 vs USB3 components of the same chip,
|
||||
and both need permissions to make uhubctl work properly.
|
||||
E.g. for Raspberry Pi 4B, you need to add these 2 lines (or remove idVendor filter):
|
||||
|
||||
SUBSYSTEM=="usb", DRIVER=="hub|usb", MODE="0666", ATTR{idVendor}=="2109"
|
||||
SUBSYSTEM=="usb", DRIVER=="hub|usb", MODE="0666", ATTR{idVendor}=="1d6b"
|
||||
|
||||
If you don't like wide open mode `0666`, you can restrict access by group like this:
|
||||
|
||||
SUBSYSTEM=="usb", ATTR{idVendor}=="2001", MODE="0664", GROUP="dialout"
|
||||
SUBSYSTEM=="usb", DRIVER=="hub|usb", MODE="0664", GROUP="dialout"
|
||||
# Linux 6.0 or later (its ok to have this block present for older Linux kernels):
|
||||
SUBSYSTEM=="usb", DRIVER=="hub|usb", \
|
||||
RUN+="/bin/sh -c \"chown -f root:dialout $sys$devpath/*port*/disable || true\"" \
|
||||
RUN+="/bin/sh -c \"chmod -f 660 $sys$devpath/*port*/disable || true\""
|
||||
|
||||
and then add permitted users to `dialout` group:
|
||||
|
||||
@@ -185,6 +293,7 @@ For your `udev` rule changes to take effect, reboot or run:
|
||||
|
||||
sudo udevadm trigger --attr-match=subsystem=usb
|
||||
|
||||
For your convenience, ready to use udev rule is provided [here](https://github.com/mvp/uhubctl/blob/master/udev/rules.d/52-usb.rules).
|
||||
|
||||
|
||||
FAQ
|
||||
@@ -194,7 +303,8 @@ FAQ
|
||||
|
||||
According to USB 2.0 specification, USB hubs can advertise no power switching,
|
||||
ganged (all ports at once) power switching or per-port (individual) power switching.
|
||||
Note that `uhubctl` will only detect USB hubs which support per-port power switching.
|
||||
Note that by default `uhubctl` will only detect USB hubs which support per-port power switching
|
||||
(but you can force it to try operating on unsupported hubs with option `-f`).
|
||||
You can find what kind of power switching your hardware supports by using `sudo lsusb -v`:
|
||||
|
||||
No power switching:
|
||||
@@ -233,6 +343,8 @@ Per-port power switching:
|
||||
3. If tests above were successful, please report your hub
|
||||
by opening new issue at https://github.com/mvp/uhubctl/issues,
|
||||
so we can add it to list of supported devices.
|
||||
Please do not report unsupported hubs, unless it is different
|
||||
hardware revision of some already listed supported model.
|
||||
|
||||
|
||||
#### _USB devices are not removed after port power down on Linux_
|
||||
@@ -240,11 +352,10 @@ Per-port power switching:
|
||||
After powering down USB port, udev does not get any event, so it keeps the device files around.
|
||||
However, trying to access the device files will lead to an IO error.
|
||||
|
||||
This is Linux kernel issue. It may be eventually fixed in kernel, see more discussion [here](https://bit.ly/2JzczjZ).
|
||||
Basically what happens here is that kernel USB driver knows about power off,
|
||||
but doesn't send notification about it to udev.
|
||||
This is Linux kernel [issue](https://tinyurl.com/ym7yvuzw) and is [fixed](https://github.com/mvp/uhubctl/pull/450)
|
||||
since uhubctl 2.5.0 for systems with Linux kernel 6.0 or later.
|
||||
|
||||
You can use this workaround for this issue:
|
||||
If you are still using Linux 5.x or older, you can use this workaround for this issue:
|
||||
|
||||
sudo uhubctl -a off -l ${location} -p ${port}
|
||||
sudo udevadm trigger --action=remove /sys/bus/usb/devices/${location}.${port}/
|
||||
@@ -257,12 +368,19 @@ When you turn power back on, device should re-enumerate properly (no need to cal
|
||||
|
||||
Some device drivers in kernel are surprised by USB device being turned off and automatically try to power it back on.
|
||||
|
||||
You can use option `-r N` where N is some number from 10 to 1000 to fix this -
|
||||
`uhubctl` will try to turn power off many times in quick succession, and it should suppress that.
|
||||
This may be eventually fixed in kernel, see more discussion [here](https://bit.ly/2JzczjZ).
|
||||
This is Linux kernel [issue](https://tinyurl.com/ym7yvuzw) and is [fixed](https://github.com/mvp/uhubctl/pull/450)
|
||||
since uhubctl 2.5.0 for systems with Linux kernel 6.0 or later.
|
||||
|
||||
If your device is USB mass storage, invoking `udisksctl` before calling `uhubctl`
|
||||
might help to mitigate this issue:
|
||||
If you are still using Linux 5.x or older:
|
||||
|
||||
You can use option `-r N`, where N is some number from 10 to 1000 to fix this -
|
||||
`uhubctl` will try to turn power off many times in quick succession, and it should suppress that.
|
||||
|
||||
Disabling USB authorization for device in question before turning power off with `uhubctl` should help:
|
||||
|
||||
echo 0 > sudo tee /sys/bus/usb/devices/${location}.${port}/authorized
|
||||
|
||||
If your device is USB mass storage, invoking `udisksctl` before calling `uhubctl` should help too:
|
||||
|
||||
sudo udisksctl power-off --block-device /dev/disk/...`
|
||||
sudo uhubctl -a off ...
|
||||
@@ -281,7 +399,10 @@ Doing so will confuse internal hub circuitry and will cause unpredictable behavi
|
||||
|
||||
#### _Raspberry Pi turns power off on all ports, not just the one I specified_
|
||||
|
||||
This is limitation of Raspberry Pi hardware design.
|
||||
This is the limitation of Raspberry Pi hardware design.
|
||||
As a workaround, you can buy any external USB hub from supported list above,
|
||||
attach it to any USB port of Raspberry Pi, and control power on its ports independently.
|
||||
Also, there are supported hubs designed specifically for Raspberry Pi, e.g. UUGear MEGA4.
|
||||
|
||||
For reference, supported Raspberry Pi models have following internal USB topology:
|
||||
|
||||
@@ -307,8 +428,9 @@ For reference, supported Raspberry Pi models have following internal USB topolog
|
||||
|
||||
##### Raspberry Pi 4B
|
||||
|
||||
> :warning: You may need to [update firmware](https://www.raspberrypi.org/documentation/hardware/raspberrypi/booteeprom.md)
|
||||
to vl805 00137ac or later to make power switching work on RPi 4B.
|
||||
> :warning: If your VL805 firmware is older than `00137ad` (check with `sudo rpi-eeprom-update`),
|
||||
you have to [update firmware](https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#rpi-eeprom-update)
|
||||
to make power switching work on RPi 4B.
|
||||
|
||||
* USB2 hub `1`, 1 port, only connects hub `1-1` below.
|
||||
|
||||
@@ -320,42 +442,74 @@ to vl805 00137ac or later to make power switching work on RPi 4B.
|
||||
|
||||
uhubctl -l 2 -a 0
|
||||
|
||||
* USB2 hub `3`, 1 port, OTG controller:
|
||||
* USB2 hub `3`, 1 port, OTG controller. Power switching is [not supported](https://git.io/JUc5Q).
|
||||
|
||||
uhubctl -l 3 -p 1 -a 0
|
||||
##### Raspberry Pi 5
|
||||
|
||||
Raspberry Pi 5 has two USB2 ports and two USB3 ports (total 4).
|
||||
These ports are connected to 4 distinct USB hubs `1`,`2`,`3`,`4` in really weird configuration
|
||||
(but depending on OS and HW revision hubs of interest can be `2`,`3`,`4`,`5`).
|
||||
If USB3 device is connected to blue socket, it will be detected on USB3 hub `2` or `4`.
|
||||
If USB2 device is connected to any socket or USB3 device connected to black socket,
|
||||
it will be detected on USB2 hub `1` or `3`.
|
||||
Regardless of USB2/USB3 connection type, blue sockets are always port `1`,
|
||||
and black sockets are always port `2`.
|
||||
|
||||
As a workaround, you can buy any external USB hub from supported list,
|
||||
attach it to any USB port of Raspberry Pi, and control power on its ports independently.
|
||||
Each of 4 USB onboard hubs advertises as supporting per-port power switching, but this is not true.
|
||||
In reality, Raspberry Pi 5 all 4 ports are ganged together in one group,
|
||||
despite belonging to 4 different logical USB hubs.
|
||||
|
||||
To turn off VBUS power it has to be disabled across all onboard hubs and ports with:
|
||||
|
||||
```
|
||||
uhubctl -l 2 -a 0
|
||||
uhubctl -l 4 -a 0
|
||||
```
|
||||
|
||||
To turn it back on:
|
||||
|
||||
```
|
||||
uhubctl -l 2 -a 1
|
||||
uhubctl -l 4 -a 1
|
||||
```
|
||||
|
||||
Note that VBUS power goes down only if all ports are off -
|
||||
enabling any single port enables VBUS back for all 4 ports.
|
||||
|
||||
Notable projects using uhubctl
|
||||
==============================
|
||||
| Project | Description |
|
||||
|:---------------------------------------------------------|:------------------------------------------------------|
|
||||
| [Morse code USB light](https://git.io/fj1F4) | Flash a message in Morse code with USB light |
|
||||
| [Webcam USB light](https://git.io/fj1FB) | Turn on/off LED when webcam is turned on/off |
|
||||
| [Cinema Lightbox](https://goo.gl/fjCvkz) | Turn on/off Cinema Lightbox from iOS Home app |
|
||||
| [Build Status Light](https://goo.gl/3GA82o) | Create a build status light in under 10 minutes |
|
||||
| [Buildenlights](https://git.io/fj1FC) | GitLab/GitHub project build status as green/red light |
|
||||
| [Weather Station](https://goo.gl/3b1FzC) | Reset Weather Station when it freezes |
|
||||
| [sysmoQMOD](https://bit.ly/2VtWrVt) | Reset cellular modems when necessary |
|
||||
| [Smog Sensor](https://bit.ly/2EMwgCk) | Raspberry Pi based smog sensor power reset |
|
||||
| [Terrible Cluster](https://goo.gl/XjiXFu) | Power on/off Raspberry Pi cluster nodes as needed |
|
||||
| [Ideal Music Server](https://bit.ly/39MeVFQ) | Turn off unused USB ports to improve audio quality |
|
||||
| [USB drives with no phantom load](https://goo.gl/qfrmGK) | Power USB drives only when needed to save power |
|
||||
| [USB drive data recovery](https://goo.gl/4MddLr) | Recover data from failing USB hard drive |
|
||||
| [Control power to 3D printer](https://git.io/fh5Tr) | OctoPrint web plugin for USB power control |
|
||||
| [USB fan for Raspberry Pi](https://bit.ly/2TRV6sM) | Control USB fan to avoid Raspberry Pi overheating |
|
||||
| [Raspberry Pi Reboot Router](https://bit.ly/3aNbQqs) | Automatically reboot router if internet isn't working |
|
||||
| [Control USB Lamp With Voice](https://bit.ly/2VtW2SX) | Voice Control of USB Lamp using Siri and Raspberry Pi |
|
||||
| Project | Description |
|
||||
|:---------------------------------------------------------|:--------------------------------------------------------|
|
||||
| [Morse code USB light](https://git.io/fj1F4) | Flash a message in Morse code with USB light |
|
||||
| [Webcam USB light](https://git.io/fj1FB) | Turn on/off LED when webcam is turned on/off |
|
||||
| [Cinema Lightbox](https://goo.gl/fjCvkz) | Turn on/off Cinema Lightbox from iOS Home app |
|
||||
| [Build Status Light](https://goo.gl/3GA82o) | Create a build status light in under 10 minutes |
|
||||
| [Buildenlights](https://git.io/fj1FC) | GitLab/GitHub project build status as green/red light |
|
||||
| [Weather Station](https://goo.gl/3b1FzC) | Reset Weather Station when it freezes |
|
||||
| [sysmoQMOD](https://tinyurl.com/sysmoQMOD) | Reset cellular modems when necessary |
|
||||
| [Smog Sensor](https://tinyurl.com/smogsensor) | Raspberry Pi based smog sensor power reset |
|
||||
| [Terrible Cluster](https://goo.gl/XjiXFu) | Power on/off Raspberry Pi cluster nodes as needed |
|
||||
| [Ideal Music Server](https://tinyurl.com/ideal-m-srv) | Turn off unused USB ports to improve audio quality |
|
||||
| [USB drives with no phantom load](https://goo.gl/qfrmGK) | Power USB drives only when needed to save power |
|
||||
| [USB drive data recovery](https://goo.gl/4MddLr) | Recover data from failing USB hard drive |
|
||||
| [Control power to 3D printer](https://git.io/fh5Tr) | OctoPrint web plugin for USB power control |
|
||||
| [USB fan for Raspberry Pi](https://tinyurl.com/fan-rpi) | Control USB fan to avoid Raspberry Pi overheating |
|
||||
| [Raspberry Pi Reboot Router](https://tinyurl.com/rpi-rtr)| Automatically reboot router if internet isn't working |
|
||||
| [Control USB Lamp With Voice](https://tinyurl.com/usblmp)| Voice Control of USB Lamp using Siri and Raspberry Pi |
|
||||
| [Control USB LED Strip](https://tinyurl.com/usbleds) | Controlling USB powered LED Light Strip |
|
||||
| [Brew beer with Raspberry Pi](https://git.io/JtbLd) | Automated beer brewing system using Raspberry Pi |
|
||||
| [Webcam On-Air Sign](https://tinyurl.com/uonair) | Automatically light up a sign when webcam is in use |
|
||||
| [Do it yourself PPPS](https://git.io/J3lHs) | Solder wires in your USB hub to support uhubctl |
|
||||
| [Open source PPPS hub](https://tinyurl.com/yckhystt) | Open source hardware project for uhubctl compatible hub |
|
||||
| [Python Wrapper for uhubctl](https://github.com/nbuchwitz/python3-uhubctl) | Module to use uhubctl with Python |
|
||||
| [labgrid](https://github.com/labgrid-project/labgrid) | Framework for testing embedded Linux on hardware |
|
||||
| [Thermal Camera](https://tinyurl.com/5asne8hw) | Turn on/off robot's thermal camera when necessary |
|
||||
|
||||
|
||||
Copyright
|
||||
=========
|
||||
|
||||
Copyright (C) 2009-2020 Vadim Mikhailov
|
||||
Copyright (C) 2009-2025 Vadim Mikhailov
|
||||
|
||||
This file can be distributed under the terms and conditions of the
|
||||
GNU General Public License version 2.
|
||||
|
||||
24
udev/rules.d/52-usb.rules
Normal file
24
udev/rules.d/52-usb.rules
Normal file
@@ -0,0 +1,24 @@
|
||||
# uhubctl – USB hub per-port power control https://github.com/mvp/uhubctl
|
||||
#
|
||||
# Copyright (c) 2009-2025, Vadim Mikhailov
|
||||
#
|
||||
# This file can be distributed under the terms and conditions of the
|
||||
# GNU General Public License version 2.
|
||||
|
||||
# uhubctl udev rules for rootless operation on Linux for users in group `dialout`.
|
||||
#
|
||||
# Copy this file to /etc/udev/rules.d, then reboot or run:
|
||||
#
|
||||
# sudo udevadm trigger --attr-match=subsystem=usb
|
||||
#
|
||||
# To add yourself to this permission group, run:
|
||||
#
|
||||
# sudo usermod -a -G dialout $USER
|
||||
|
||||
# This is for Linux before 6.0:
|
||||
SUBSYSTEM=="usb", DRIVER=="hub|usb", MODE="0664", GROUP="dialout"
|
||||
|
||||
# This is for Linux 6.0 or later (ok to keep this block present for older Linux kernels):
|
||||
SUBSYSTEM=="usb", DRIVER=="hub|usb", \
|
||||
RUN+="/bin/sh -c \"chown -f root:dialout $sys$devpath/*port*/disable || true\"" \
|
||||
RUN+="/bin/sh -c \"chmod -f 660 $sys$devpath/*port*/disable || true\""
|
||||
@@ -1,20 +0,0 @@
|
||||
DESCRIPTION = "uhubctl - USB hub per-port power control"
|
||||
HOMEPAGE = "https://github.com/mvp/uhubctl"
|
||||
LICENSE = "GPLv2"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
|
||||
file://LICENSE;md5=a79e6a142b69522fe7757fe7313895eb"
|
||||
|
||||
DEPENDS = "libusb1"
|
||||
RDEPENDS_${PN} = "libusb1"
|
||||
|
||||
SRC_URI = "git://github.com/mvp/uhubctl.git"
|
||||
SRCREV = "${AUTOREV}"
|
||||
PV = "git"
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
do_install_append () {
|
||||
install -d ${D}${bindir}
|
||||
install -Dm 0755 ${S}/uhubctl ${D}${bindir}/
|
||||
}
|
||||
|
||||
FILES_${PN} += "${bindir}/*"
|
||||
Reference in New Issue
Block a user