libusb-1.0.2

Introduction to libusb

The libusb package contains a library used by some applications for USB device access.

This package is known to build and work properly using an LFS-6.5 platform.

Package Information

libusb Dependencies

Optional (Required to Build the API Documentation)

Doxygen-1.5.9

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/libusb

Installation of libusb

Install libusb by running the following commands:

./configure --prefix=/usr &&
make

If Doxygen is installed and you wish to build the API documentation, issue the following command:

make -C doc docs

This package does not come with a test suite.

Now, as the root user:

make install

If you built the API documentation, install it using the following commands as the root user:

install -v -d -m755 /usr/share/doc/libusb-1.0.2/apidocs &&
install -v -m644 doc/html/* \
    /usr/share/doc/libusb-1.0.2/apidocs

Configuring Libusb

To access raw USB devices (those not treated as a disk by the mass-storage driver), appropriate support must be available in the kernel. Check your kernel configuration for Device Drivers ⇒ USB support ⇒ Support for Host-side USB. Select any USB hardware device drivers you may need on the same page.

To have raw USB devices set up properly, add the following udev rule.

cat > /etc/udev/rules.d/23-usb.rules << "EOF"
# Set group ownership for raw USB devices
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="usb"
EOF

Add any users that need to access raw USB devices to the usb group.

usermod -a -G usb <username>

Contents

Installed Programs: None
Installed Library: libusb-1.0.{so,a}
Installed Directories: /usr/include/libusb-1.0 and /usr/share/doc/libusb-1.0.2

Short Descriptions

libusb-1.0.{so,a}

libraries contain C functions for accessing USB hardware.

Last updated on 2009-07-27 12:11:13 +0000