Skip to content

hidapi 0.15.0⚓︎

Build notes⚓︎

  • Patch 002-fix-bus-spi-fallback.patch (linux/hid.c): the hidraw backend uses BUS_SPI, which was added to <linux/input.h> only in kernel 4.10. AVM devices use older kernel headers (2.6.32/3.10/4.4/4.9, including with uClibc 1.0.58 on MIPS), so BUS_SPI is undefined there and linux/hid.c fails with 'BUS_SPI' undeclared. The patch defines a fallback (#define BUS_SPI 0x1A). This is a kernel-headers issue, not uClibc-specific, so a source patch is used instead of a uClibc gate (no regression on any toolchain).

hidapi is a multi-platform library that enables applications to interface with
Bluetooth and USB HID-class devices.

In Freetz-EVO:

  • The libusb backend (libhidapi-libusb) is always built. It talks to
    the device via the kernel's usbfs interface directly, so it does not
    require the kernel HID/INPUT subsystem. This is the backend used by
    hidws and ja11-config, and it is the only one that works on
    GRX5 routers (e.g. 7590AX), where the AVM kernel lacks CONFIG_INPUT and
    hid.ko cannot load.
  • The hidraw backend (libhidapi-hidraw) is optional and controlled by
    FREETZ_LIB_hidapi_hidraw. It requires the kernel HID modules
    (hid.ko, hid-generic.ko, usbhid.ko) and is not compatible with
    GRX5 devices.

The package includes a minimal stub libudev implementation to satisfy hidapi's
build-time dependency on udev without pulling in the full systemd/libudev stack.

Runtime interface⚓︎

  • shared library libhidapi-libusb.so.0.15.0 plus SONAME symlinks
    (and libhidapi-hidraw.so.0.15.0 when the hidraw backend is enabled)
  • ABI-compatible runtime for applications communicating with HID-class devices