|Version 1 (modified by sping, 13 months ago) (diff)|
There are two libusb API versions:
- libusb-1.0 is the current version, under active development
- libusb-0.1 is the original version which is deprecated and unmaintained since many years
- libusb-compat-0.1 is a compatibility library which provides the libusb-0.1 API by using libusb-1.0
The different API versions do not conflict, so they can be installed in parallell on a system. However, if you have installed libusb-1.0 then we strongly recommend to use libusb-compat-0.1 instead of the ancient libusb-0.1 code, so that programs which use both the 0.1 API and the 1.0 API in different parts of the program, or in different libraries used by the program, will both end up using libusb-1.0 for actual device access. This is important to avoid potential conflicts between libusb-1.0 and libusb-0.1 being used by the same process.
In addition to the above libraries by the libusb project there is also a separate project which provides the libusb-0.1 API on Windows:
- libusb-win32 (It is a separate project, but several contributors participate in both libusb and libusb-win32.)
libusb-1.0 (current API version)
Daniel Drake adopted the project in January 2008 and worked on the libusb-1.0 API and implementation, which adds several features missing in the 0.1 API. libusb-1.0 is the recommended version to use for all new development. Developers are encouraged to port existing applications which use libusb-0.1 to use the new API.
- Latest release: 1.0.9
- See the libusb-1.0 page for more detailed information about libusb-1.0
- libusb-1.0 API documentation
- Linux, Mac OS X, Windows, OpenBSD and NetBSD are currently supported.
- FreeBSD includes a separate implementation of the libusb-0.1 and libusb-1.0 APIs in the system libc.
- The Windows backend currently depends on the generic USB device driver WinUSB.sys by Microsoft, which is included with all Windows versions starting with Windows Vista. There is a ticket about support for the libusb0.sys kernel driver developed by the libusb-win32 project.
A device driver which supports libusb must always be used for the device on every operating system. Each operating system has different rules for device drivers. On Mac OS X, if an interface driver included with the OS matches the characteristics of a device, that driver will seize the interface, and the driver cannot be detached by libusb, so libusb will not be able to use that interface. In the case of OpenBSD and NetBSD, libusb-1.0 can be used only for device with ugen driver. For Windows, if you need to read from or write to the USB device, currently only devices with WinUSB driver are supported.
libusb is not well suited for accessing HID class devices. It is possible to use libusb with HID device though if the original driver is replaced by a supported driver but this is usually not easy on non-Linux platforms. It is recommended to use HIDAPI instead, for convenient and cross-platform access to HID class devices.
libusb-0.1 (legacy API)
Johannes Erdfelt founded the libusb project and lead development through 2007. By then, libusb-0.1 had stabilized, and was adopted by a wide range of projects.
- Last release: libusb-0.1.12
- Supported operating systems: Linux, FreeBSD, NetBSD, OpenBSD, Darwin, MacOS X (and Windows, through the libusb-win32 project). Solaris has a wrapper for libusb-0.1 as well. There are also independent implementation efforts for other OS like BeOS and OS/2 which may not be mature enough.
- Development status: libusb-0.1 is deprecated and will have no further changes or releases
- Note that libusb-win32 is a separate project which still sees active development. The next generation libusb-win32 kernel driver (libusbk.sys) is based on KMDF. The libusbk library will support the existing libusb-win32 API, libusb-1.0 API and WinUSB-like API. libusb-win32 users who are fine with the libusb-win32 API are recommended to keep using it since it will be supported by the libusb-win32 project. libusb-win32 users who are interested in libusb-1.0 will also be supported once the libusbk backend is integrated. Future enhancement of the libusb-1.0 API (say libusb-1.1) may be required to be more suitable for Windows users.
- Download libusb-0.1 releases here
- libusb-0.1 API documentation
- Unofficial bindings at the libusb-win32 site
- Projects and Examples using libusb-win32