diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 17654028..503253f9 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -13,6 +13,7 @@ and this project adheres to `Semantic Versioning Optional["CentralManagerDelegate"]: if self.central_manager.state() == CBManagerStateUnsupported: raise BleakError("BLE is unsupported") + if self.central_manager.state() == CBManagerStateUnauthorized: + raise BleakError("BLE is not authorized - check macOS privacy settings") + if self.central_manager.state() != CBManagerStatePoweredOn: raise BleakError("Bluetooth device is turned off") diff --git a/docs/troubleshooting.rst b/docs/troubleshooting.rst index 6fb71296..0b139522 100644 --- a/docs/troubleshooting.rst +++ b/docs/troubleshooting.rst @@ -43,6 +43,11 @@ the *Privacy* settings in the macOS *System Preferences*. .. image:: images/macos-privacy-bluetooth.png +If the app is already in the list but the checkbox for Bluetooth is disabled, +you will get the a ``BleakError``: "BLE is not authorized - check macOS privacy settings". +instead of crashing with ``SIGABRT``, in which case you need to check the box +to allow Bluetooth for the app that is running Python. + No devices found when scanning on macOS 12 ==========================================