Clone this wiki locally
A cross-platform user-mode library, for generic access to USB devices
Table of Contents
The current API is of 1.0 version (libusb-1.0 API). You can still use the legacy API (libusb-0.1 API) with the libusb-compat-0.1 wrapper.
Take note libusb-win32 is a separate project and it is in bug-fix-only mode. New project should migrate to use libusb Windows backend.
- Supports all the major platforms: Linux, OS X, Windows, OpenBSD/NetBSD, Solaris and Haiku
- Supports all versions of USB, from 1.0 to 3.1
- Unified modern API, that provides both synchronous and asynchronous access
- User-mode: no need for kernel access
libusb releases can be accessed from the releases directory.
The preferred way to get support is to use the mailing list. The libusb mailing-list is hosted on Sourceforge. You can subscribe and check the archive HERE.
You are also encouraged to check the Wiki Pages for topics of interest.
- Linux [status: Stable]
- Any modern Linux system with
- Any modern Linux system with
- Mac OS X [status: Stable]
- Any modern version of Mac OS X (PowerPC or x86 either in 32 and 64 bits)
- Note: for USB 3.0 port,please use Mac OS X Mountain Lion 10.8.2 or later.
- Note: the device should not be bound to a kernel driver. You can use a codeless kext to achieve that if there is a kernel driver (eg: HID or USB Mass Storage) which already binds to the device.
Windows [status: Stable]
MinGW (32 bit) or MinGW-w64. To compile a library that is both 32 and 64 bit compatible, you should use a version of MinGW-w64 that supports both
-m64(a.k.a. "multilib"). A pre-built multilib version can be downloaded with TDM64.
- Microsoft Visual C++ (Visual Studio).
- Windows DDK build environment
- Device driver support: WinUSB, HID, libusb-win32 (libusb0.sys, not recommended), libusbK, usbdk.
- MinGW (32 bit) or MinGW-w64. To compile a library that is both 32 and 64 bit compatible, you should use a version of MinGW-w64 that supports both
- OpenBSD and NetBSD [status: EXPERIMENTAL]
- Only device with
ugendriver are supported
- Only device with
- Windows CE -- [status: EXPERIMENTAL]
- Android -- [status: EXPERIMENTAL]
- Solaris support was added in libusb-1.0.21
- Haiku support was added in libusb-1.0.20
Note: FreeBSD 8 and above include a FreeBSD-specific reimplementation of the libusb API, so your applications will probably work there too. The source code for this library can be found here.
If you are interested in porting to other platforms, the PORTING file tells you where to start. We are more than happy to help out here, please write to the mailing list with your questions and feedback.
The latest development tree is always available from git.
For those not familiar with git, here are the commands one can use to retrieve libusb:
# retrieve development branch (this only needs to be done once) git clone git://github.com/libusb/libusb.git cd libusb
# for further updates, once the clone has been done git pull
You can also browse the git development tree from https://github.com/libusb/libusb.
When compiling from git, remember that you may have to run
./bootstrap.sh or run the autotools creation utilities, in order to have
Makefile created for you. The difference between
bootstrap.sh is that the former will invoke configure with a set of default options, whereas the latter will not.
To create projects relying on libusb, please refer to the samples in the
- OpenOCD and other libFTDI based projects
- UrJTAG - Universal JTAG Library
- CUPS - An Open Source printing system
- SANE - Scanner Access Now Easy
- usbutils - USB utilities for Linux
- sigrok - A signal analysis software suite for a very large range of devices
- SDR# (SDR Sharp) - A high performance Software Defined Radio application
- OpenKinect - Library and appplications for the Microsoft Xbox Kinect device
- OpenNI - An Open Source SDK for 3D sensing
- BTstack - A Portable User-Space Bluetooth Stack
- UsbPicProg - An Open Source PIC programmer
- fprint - A fingerprint scanning application and library
- IIDC Camera Control Library - Capture and control API for IIDC compliant cameras
- Microdia - A Microdial webcam capture application
- usbmuxd - A socket daemon to multiplex connections from and to iOS devices
- coldsync - Palm OS synchronization utility
- SUB-20 - Software for the Dimax SUB-20 Multi Interface USB Adapter
- libnifalcon - A driver for the Novint Falcon Haptic Device
- XPIOCARDS - A flight simulator interface
- Exodriver - Open Source drivers for Labjack data acquisition devices
- madWiMAX - A Linux driver for mobile WiMAX devices
- Yubikey Personalization - Library and command line tool used to personalize YubiKeys.
- USRP Hardware Driver (UHD) - A cross-platform driver for USRP Software Defined Radios
- libuvc - Library for webcams and other USB Video Class devices
- And many more!...
- usb4java — libusb for Java
- LibUsbDotNet — libusb for C#, .NET and Mono
- PyUSB — libusb for Python
- python-libusb1 — Another Python ctype-based wrapper
- BitPim/USB — A partial Python wrapper using swig
- libusb for Ruby
- Haskell low level and high level bindings
- luausb — libusb for LUA
- node-usb — libusb for node.js
- ocaml-usb — libusb for OCaml
- Factor libusb bindings
- io-usb — libusb for Nim
- Device::USB — libusb for perl
- gousb — libusb for Go
- php-usb — libusb for php