Commit Graph

359 Commits

Author SHA1 Message Date
Vadim Mikhailov
d00a167ab4 homebrew audit insists on checksum before head 2025-04-17 13:35:31 -07:00
Vadim Mikhailov
16001b090d minor fixes to homebrew formula so it passes strict audit checks 2025-04-17 13:28:19 -07:00
Vadim Mikhailov
42cdfb0b82 Fix udev rules to support Linux kernels 6.8+
Linux kernels before had devpath containing `usbN-portM`.
Newer kernels just use `port` symlink instead, which breaks our udev rules.
Changing glob from `*-port*` to `*port*` makes it work for both old and new kernels.

Closes issues #608, #609.
2025-02-23 12:51:49 -08:00
Vadim Mikhailov
c74755be42 Fix FreeBSD build, update docs regarding pkg-config 2025-01-21 19:45:22 -08:00
Vadim Mikhailov
07abf4cbea Fix warnings when compiled in C++ mode
Fixed all warnings when compiling with `c++ -std=c++11 ...`:
* bzero() appears to be deprecated, replaced with memset()
* fixed few const warnings
* suppressed zero array warnings (emitted by libusb headers)
2025-01-21 19:25:50 -08:00
Vadim Mikhailov
d483981f95 Add thermal camera control as notable project
Described in #594.
2025-01-18 14:59:52 -08:00
Vadim Mikhailov
2ca14eb3dd Add Mac Mini M4 as compatible device
Closes #606.
2025-01-18 14:44:59 -08:00
Vadim Mikhailov
40f10578cb Remove Rosonway RSH-A107 (and ikuai A107) from supported list
There are multiple reports that RSH-A107 does not turn off VBUS:
While it is possible that some hardware revisions which are working,
looks like most don't. It is better to remove it from the list.

Closes #604.
2025-01-18 14:32:56 -08:00
Vadim Mikhailov
7604f84c95 Add StarTech HB31C2A2CB as compatible device
Closes #601.
2025-01-18 14:24:32 -08:00
Vadim Mikhailov
f4b0d2ad31 Add RSH-A37S as compatible device
Closes #598.
2025-01-18 14:15:35 -08:00
Vadim Mikhailov
a7df8f8367 Cleanup ifdef usage
* No need to check for both __gnu_linux__ and __linux__, latter is enough.
* Require libusb 1.0.13 to build - this makes LIBUSB_API_VERSION always defined.
* Include `<libusb.h>` not `<libusb-1.0/libusb.h>` - this will always work
  if `pkg-config` is detected. For backwards compatibility still try building
  without `pkg-config` present, but it is much less reliable and will not work on Mac.
* Bump copyright year.
2025-01-18 14:04:34 -08:00
Tormod Volden
a957b21815 Add --sysdev/-y option for direct device node access (#600)
* Add --sysdev/-u option for direct device node access

Only the device specified by the given device path will be accessed,
instead of scanning the USB bus.

Most useful if you use udev rules to create stable device node aliases for hubs,
independent of bus topology.

For instance, if your matching udev rules include SYMLINK+="MYSMARTHUB1"
you can call uhubctl with --sysdev /dev/MYSMARTHUB1 instead of using -l
and a non-stable bus location to specify it.

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
2025-01-18 11:50:25 -08:00
Vadim Mikhailov
2dbc6ce2d9 Add recipe for compiling on OpenSUSE
Closes #592.
2024-10-15 21:49:00 -07:00
mvp
302b3c0c77 always include <fcntl.h>
4a233824c4 fixed issue for Raspberry Pi on Linux, but broke compilation on Mac.
Fixing it by always including <fcntl.h>.
2024-10-13 13:10:22 -07:00
Vadim Mikhailov
4a233824c4 Add StarTech DKT30CSDHPD3 as compatible device
Closes #588.
2024-09-17 18:09:57 -07:00
Vadim Mikhailov
e0d1c34eed Improve support for Raspberry Pi 4B and 5:
* Detect if we are running on Raspberry 4B or 5
* Add RPi 4B and 5 conditionals for RPi hacks
* Relax some conditions which may vary depending on RPi hardware and/or OS
  (in particular Ubuntu hub numbering differs from Raspbian).
* For RPi5, changed README to suggest using busses 2 and 4 instead of 1 and 3.
  This makes the same recipe work on both Raspbian and Ubuntu.

This fixes #587.
2024-09-16 20:23:33 -07:00
mvp
153c5da267 Fixed snprintf override which breaks on old MacOS
`snprintf` is available in Mac/FreeBSD headers only if _XOPEN_SOURCE is 600 or higher.
This closes #586.
2024-09-12 10:42:23 -07:00
mvp
bfc11e6b05 Remove Buffalo BSH4A05U3BK from supported list
Buffalo BSH4A05U3BK does not seem to support VBUS off, removing from the list.

Closes #584.
2024-08-31 22:29:58 -07:00
mvp
c9abed425c Release version 2.6.0 as stable brew tap 2024-08-31 16:57:18 -07:00
mvp
352f5878e9 Release version 2.6.0 v2.6.0 2024-08-31 16:30:35 -07:00
mvp
169842ae97 Improve Linux detection
__gnu_linux__ is not always present on all Linux platforms -
add checking for __linux__ too.
2024-08-31 16:19:59 -07:00
mvp
8de8c9487f Add Philips 346B1C as compatible device
Closes #582.
2024-08-31 16:01:38 -07:00
mvp
3dbc1d9e41 Add Rosonway RSH-A107 (aka ikuai A107) as compatible device
Closes #572.
2024-08-31 15:52:12 -07:00
Misha Bunte
83ce372810 Fix flag to turn on and off 2024-08-16 14:05:14 -07:00
Misha Bunte
f22541cf64 Add flash (inverted cycle) option - turn on and off (#580)
* Add flash (inverted cycle) option - to turn port on then off with a delay
2024-08-13 13:24:09 -07:00
Christian Svensson
2df4681826 Construct root USB device sysfs path
Fixes #578. See issue for discussion.

Signed-off-by: Christian Svensson <blue@cmd.nu>
2024-08-05 12:32:33 -07:00
mvp
359d887927 Fix typo for driver name
Closes #574.
2024-08-04 20:51:41 -07:00
Christian Svensson
1f920f6b15 Fix endian conversions to work for big-endian
Before:
```
Current status for hub 3 [6b1d:0200 Linux 6.1.98 xhci-hcd xHCI Host Controller 0000:01:00.0, USB 0.02, 2 ports, ppps]
  Port 1: 0305 power lowspeed suspend connect [9911:c068 Sierra Wireless, Incorporated MC7304-CP]
  Port 2: 0301 power lowspeed connect [0304:0160 FTDI FT232R USB UART A10OEDEW]
```

After:

```
Current status for hub 1 [1d6b:0002 Linux 6.1.98 ehci_hcd EHCI Host Controller 16f0000000000.ehci, USB 2.00, 2 ports, nops]
  Port 1: 0503 power highspeed enable connect [0424:2240 Generic Ultra Fast Media 000000225001]
  Port 2: 0100 power
Current status for hub 3 [1d6b:0002 Linux 6.1.98 xhci-hcd xHCI Host Controller 0000:01:00.0, USB 2.00, 2 ports, ppps]
  Port 1: 0503 power highspeed enable connect [1199:68c0 Sierra Wireless, Incorporated MC7304-CP]
  Port 2: 0103 power enable connect [0403:6001 FTDI FT232R USB UART A10OEDEW]
```

Tested on both x86-64 and MIPS64.

Signed-off-by: Christian Svensson <blue@cmd.nu>
2024-08-04 19:59:56 -07:00
mvp
746891d888 Add VirtualHere USB3 4-port hub as compatible device
Closes #571.
2024-06-05 16:26:20 -07:00
mvp
83f624f3b5 Removed Plugable USB3-HUB7-81X from supported list
Closes #559.
2024-05-21 11:14:23 -07:00
Hans Märki
61fd83ff10 Add Rosonway A10, and ST07C as compatible device (#567) 2024-05-21 11:06:36 -07:00
Jan Lübbe
cd99f0de34 Add labgrid to README as project using uhubctl (#566)
labgrid uses uhubctl in the USBPowerDriver to control power for boards
connected on switchable USB hubs [1].

[1] https://github.com/labgrid-project/labgrid/blob/master/labgrid/driver/powerdriver.py
2024-05-06 00:57:57 -07:00
Vadim Mikhailov
3d804c1ab7 Add support for Raspberry Pi 5
Added hack to support Raspberry Pi 5.
Updated README with recipe how to control power on RPi5.

Closes #547.
2024-04-19 16:08:19 -07:00
Vadim Mikhailov
3e86729800 Add Lenovo USB-C to 4 Port USB-A Hub as compatible device
Closes #561.
2024-04-19 16:06:29 -07:00
Vadim Mikhailov
d556081fbb Add LG 27GL850-B as compatible device
Closes #560.
2024-04-19 16:02:47 -07:00
Vadim Mikhailov
1199b9ddbc Add Targus PA095UZ as compatible device
Closes #558.
2024-04-19 15:59:46 -07:00
Vadim Mikhailov
f70c2ced96 Fix build on Mac
Recent libusb seems to have removed extra symlink `libusb-1.0/libusb.h`,
which breaks build on Mac.

TODO: consider always using `<libusb.h>`, but that would
put hard dependency on `pkg-config` usage.
2024-04-19 15:49:19 -07:00
Vadim Mikhailov
4deae1731c Update README, bump copyright year
* Remove mention of MacOS bug only applicable to old MacOS 12.4 x86
* Simplify docs related to Linux kernel 6.0 fixes
* Bump copyright year
2024-02-20 22:40:28 -08:00
Vadim Mikhailov
5cc9f154e1 Remove Cyberpower CP-H420P from supported list
Removing CP-H420P because it does not seem to support Vbus control.

Closes #557.
2024-02-20 22:08:08 -08:00
mvp
7a0fbd266f Update README.md (#553)
Fix devices sorting order
2024-01-24 11:48:24 -08:00
Nicolai
e18434cd2e Add Revolution Pi to list of supported devices (#552)
Revolution Pi Core and Connect family implement per port power switching
for all USB ports.

Signed-off-by: Nicolai Buchwitz <nb+github@tipi-net.de>
2024-01-24 11:42:36 -08:00
mvp
a34319a6d4 Add Gigabyte G27Q as compatible device
Closes #551.
2024-01-21 17:34:39 -08:00
mvp
d18db0d2be Add Acer BE270U as compatible device
Closes #550.
2024-01-21 17:29:02 -08:00
mvp
f37dcb5cbf Update EOL dates for some hubs
Updated EOL date for B+B SmartWorx USH304 to 2019.
https://www.mouser.com/PCN/Advantech_Corporation_EOL_BB_USH304.pdf.
Updated EOL date for Delock 62537, last available date seems to be 2021.

Closes #528.
2023-10-07 12:53:45 -07:00
mvp
5bb7197f51 Remove Anker AK-A83650A1 from supported list
There are multiple reports in #361 that Anker PowerExpand 6-in-1 USB-C hub
does not support vbus off - removing it from supported list.
2023-09-23 10:36:18 -07:00
mvp
5b2c40db83 Add Sugoi USB2-HUB4X as compatible device
Closes #525.
2023-09-21 20:25:07 -07:00
mvp
0d28753bcf Add Das Keyboard 4 as compatible device
Closes #522.
2023-09-21 20:12:35 -07:00
mvp
54ab9e72d4 Add Dell Wyse 3040 as compatible device
Dell Wyse 3040 is odd - it has 6 ports advertised on USB2 and 7 ports on USB3,
and both USB2+USB3 do not advertise power switching support.
However, using -f it seems that power switching does work.
I assume it needs separate control for USB2+USB3 using -e as well.

Closes #512.
2023-07-30 16:26:33 -07:00
mvp
b16ba1b36d Add Coolgear USBG-12U2ML as compatible device
Closes #514.
2023-07-17 22:40:50 -07:00
mvp
30372ce59f Add open source hardware hub design based on CH335F to notable projects
Closes #516.
2023-07-17 21:13:50 -07:00