8 Commits

Author SHA1 Message Date
Vadim Mikhailov
786dcb2277 Improve Linux udev rules to support more systems
Some Linux systems detect USB hubs with driver as `hub`, and some as `usb`.
Improve udev permission rules to match both options.

Closes #618.
2025-06-05 21:32:31 -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
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
mvp
359d887927 Fix typo for driver name
Closes #574.
2024-08-04 20:51:41 -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
41e1bacf41 Bump copyright year 2023-01-27 11:23:08 -08:00
mvp
2ef5f0eb0b Fixed udev rule example to use DRIVER="usb"
It seems that DRIVER="hub" almost never works,
but DRIVER="hub" always does.
2023-01-04 20:37:58 -08:00
mvp
914060b4b5 Add simpler way to configure udev rules and ready to use udev rule file
It turns out that we can allow udev access to any USB hub using DRIVER=="hub"
udev filter, this should make it easier for linux ditros to add proper udev rules.

This change adds more documentation to README, and also adds ready to use udev rule
that should work for any USB hub and any Linux kernel version.
2022-11-01 20:19:00 -07:00