From 761431063bddb61d752598c6f622f8f934034a9b Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Thu, 10 Oct 2019 11:14:31 +0200 Subject: [PATCH] libusb: add warning about macOS use of USB Bluetooth Controller to README --- port/libusb/README.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/port/libusb/README.md b/port/libusb/README.md index f398cb86f..61bbf0d65 100644 --- a/port/libusb/README.md +++ b/port/libusb/README.md @@ -16,7 +16,9 @@ When everything is ready, you compile all examples with: make -## Environment +## Environment Setup + +### Linux On Linux, the USB Bluetooth dongle is usually not accessible to a regular user. You can either: - run the examples as root @@ -36,6 +38,7 @@ To add an udev rule, please create `/etc/udev/rules.d/btstack.rules` and add thi # Match Laird BT860 / Cypress Semiconductor CYW20704A2 SUBSYSTEM=="usb", ATTRS{idVendor}=="04b4", ATTRS{device}=="f901", MODE="0666" +### macOS On macOS, the OS will try to use a plugged-in Bluetooth Controller if one is available. It's best to to tell the OS to always use the internal Bluetooth Contoller. @@ -46,6 +49,15 @@ For this, execute: and then reboot to activate the change. +Note: if you get this error, + + libusb: warning [darwin_open] USBDeviceOpen: another process has device opened for exclusive access + libusb: error [darwin_reset_device] ResetDevice: device not opened for exclusive access + +and you didn't start another instance and you didn't assign the USB Controller to a virtual machine, +macOS uses the plugged-in Bluetooth Controller. Please configure NVRAM as explained and try again after a reboot. + + ## Running the examples BTstack's HCI USB transport will try to find a suitable Bluetooth module and use it.