hidapi icon indicating copy to clipboard operation
hidapi copied to clipboard

FreeBSD hidraw backend to replace libusb backend

Open mcuee opened this issue 2 years ago • 3 comments

  • https://github.com/libusb/hidapi/issues/274#issuecomment-1543512022

It would be good we have a FreeBSD specific backend using hidraw for HIDAPI so that FreeBSD HIDAPI users no longer need to use the libusb backend.

Reference: https://reviews.freebsd.org/D27992

This driver provides raw access to HID devices through uhid(4)-compatible interface and is based on pre-8.x uhid(4) code.

Unlike uhid(4) it does not take devices in to monopoly ownership and allows parallel access from other drivers. hidraw supports Linux's hidraw-compatible interface as well.

mcuee avatar May 11 '23 08:05 mcuee

From @wulf7

  • https://github.com/libusb/hidapi/issues/274#issuecomment-1543639126

I already added hidraw enumeration support to https://github.com/wulf7/libudev-devd/ So, most probably, addition of linux hidapi backend to build is only thing left.

mcuee avatar May 11 '23 09:05 mcuee

@wulf7

Please help to review the current hidraw backend for Linux and see what would be needed to change to make it working under FreeBSD hidraw. PR will be more than welcome.

  • https://github.com/libusb/hidapi/blob/master/linux/hid.c

mcuee avatar May 11 '23 09:05 mcuee