xref: /btstack/port/libusb/README.md (revision 7dc86dfd3569d69491d87d64749fd45afb46c67a)
1# BTstack Port for POSIX Systems with libusb library
2
3The quickest way to try BTstack is on a Linux or OS X system with an
4additional USB Bluetooth dongle. It requires
5[pkg-config](http://www.freedesktop.org/wiki/Software/pkg-config/)
6and [libusb-1.0](http://libusb.info) or higher to be
7installed.
8
9On Linux, the USB Bluetooth donle is usually not accessible to a regular user. You can:
10- run the examples as root
11- add a udev rule for your dongle to extend access rights to user processes
12
13To add an udev rule, please create `/etc/udev/rules.d/btstack.rules` and add this
14
15	# Match all devices from CSR
16	SUBSYSTEM=="usb", ATTRS{idVendor}=="0a12", MODE="0666"
17
18	# Match DeLOCK Bluetooth 4.0 dongle
19	SUBSYSTEM=="usb", ATTRS{idVendor}=="0a5c", ATTRS{device}=="21e8", MODE="0666"
20
21	# Match Asus BT400
22	SUBSYSTEM=="usb", ATTRS{idVendor}=="0b05", ATTRS{device}=="17cb", MODE="0666"
23
24On OS X, it’s necessary to tell the OS to only use the internal
25Bluetooth. For this, execute:
26
27    sudo nvram bluetoothHostControllerSwitchBehavior=never
28
29and then reboot to activate the change.
30
31