Skip to content

Releases: hbldh/bleak

v0.21.0

02 Sep 19:23

Choose a tag to compare

Added

  • Added bleak.uuids.normalize_uuid_16() function.
  • Added bleak.uuids.normalize_uuid_32() function.
  • Added advertisement_data() async iterator method to BleakScanner. Merged #1361.
  • Added type hints for kwargs on BleakScanner class methods.
  • Added support for Python 3.12.

Changed

  • Improved error messages when failing to get services in WinRT backend.
  • Improved error messages with enum values in WinRT backend. Fixes #1284.
  • Scanner backends modified to allow multiple advertisement callbacks. Merged #1367.
  • Changed default handling of the response argument in BleakClient.write_gatt_char.
    Fixes #909.
  • Bleak recipe now automatically installs bleak from GitHub release in Kivy example.
  • Changed BlueZManager methods to raise BleakError when device is not in BlueZ.
  • Optimized BlueZ backend device watchers and condition callbacks to avoid linear searches.
  • Changed type hint for buffer protocol to collections.abc.Buffer.

Fixed

  • Fixed handling all access denied errors when enumerating characteristics on Windows. Fixes #1291.
  • Added support for 32bit UUIDs. Fixes #1314.
  • Fixed typing for BaseBleakScanner detection callback.
  • Fixed possible crash in _stopped_handler() in WinRT backend. Fixes #1330.
  • Reduced expensive logging in the BlueZ backend. Merged #1376.
  • Fixed race condition with "InterfaceRemoved" when getting services in BlueZ backend.
  • Fixed missing permissions and requirements in android Kivy example. Fixes #1184.
  • Fixed WinRT backend sometimes hanging forever when a device goes out of range during connection. Fixes #1359.

v0.20.2

19 Apr 22:04

Choose a tag to compare

Fixed

  • Fixed org.bluez.Error.InProgress in characteristic and descriptor read and
    write methods in BlueZ backend.
  • Fixed OSError: [WinError -2147483629] The object has been closed when
    connecting on Windows. Fixes #1280.

v0.20.1

24 Mar 16:39

Choose a tag to compare

Fixed

  • Fixed possible garbage collection of running async callback from BleakClient.start_notify().
  • Fixed possible garbage collection of running async callback from BleakScanner(detection_callback=).
  • Fixed possible garbage collection of disconnect monitor in BlueZ backend. Fixed #1258.

v0.20.0

17 Mar 23:17
b6ab166

Choose a tag to compare

Added

  • Added BLEAK_DBUS_AUTH_UID environment variable for hardcoding D-Bus UID. Merged #1182.
  • Added return type None to some scanner methods.
  • Added optional hack to use Bluetooth address instead of UUID on macOS. Merged #1073.
  • Added BleakScanner.find_device_by_name() class method.
  • Added optional command line argument to use debug log level to all applicable examples.
  • Added bleak.uuids.normalize_uuid_str() function.
  • Added optional services argument to BleakClient() to filter services. Merged #654.
  • Added automatic retry on le-connection-abort-by-local in BlueZ backend. Fixes #1220.

Changed

  • Dropped async-timeout dependency on Python >= 3.11.
  • Deprecated BLEDevice.rssi and BLEDevice.metadata. Fixes #1025.
  • BLEDevice now uses __slots__ to reduce memory usage. Merged #1117.
  • BaseBleakClient.services is now None instead of empty service collection
    until services are discovered.
  • Include thread name in BLEAK_LOGGING output. Merged #1144.
  • Updated PyObjC dependency on macOS to v9.x.

Fixed

  • Fixed invalid UTF-8 in uuids.uuid16_dict.
  • Fixed AttributeError in _ensure_success in WinRT backend.
  • Fixed BleakScanner.stop() can raise BleakDBusError with org.bluez.Error.NotReady in BlueZ backend.
  • Fixed BleakScanner.stop() hanging in WinRT backend when Bluetooth is disabled.
  • Fixed leaking services when get_services() is cancelled in WinRT backend.
  • Fixed disconnect monitor task not always cancelled on the BlueZ client. Merged #1159.
  • Fixed WinRT scanner never calling detection_callback when a device does
    not send a scan response. Fixes #1211.
  • Fixed BLEDevice name sometimes incorrectly None.
  • Fixed unhandled exception in CentralManagerDelegate destructor on macOS. Fixes #1219.
  • Fixed object passed to disconnected_callback is not BleakClient. Fixes #1200.

v0.19.5

19 Nov 22:28

Choose a tag to compare

Fixed

  • Fixed more issues with getting services in WinRT backend.

v0.19.4

07 Nov 05:21

Choose a tag to compare

Fixed

  • Fixed TypeError in WinRT backend introduced in v0.19.3.

v0.19.3

07 Nov 05:11

Choose a tag to compare

Fixed

  • Fixed TimeoutError when connecting to certain devices with WinRT backend. Fixes #604.

v0.19.2

06 Nov 21:18

Choose a tag to compare

Fixed

  • Fixed crash when getting services in WinRT backend in Python 3.11. Fixes #1112.
  • Fixed cache mode when retrying get services in WinRT backend. Merged #1102.
  • Fixed KeyError crash in BlueZ backend when removing non-existent property. Fixes #1107.

v0.19.1

29 Oct 14:59

Choose a tag to compare

Fixed

  • Fixed crash in Android backend introduced in v0.19.0. Fixes #1085.
  • Fixed service discovery blocking forever if device disconnects in BlueZ backend. Merged #1092.
  • Fixed AttributeError crash when scanning on Windows builds < 19041. Fixes #1094.

v0.19.0

14 Oct 17:47

Choose a tag to compare

Added

  • Added support for Python 3.11. Merged #990.
  • Added better error message for Bluetooth not authorized on macOS. Merged #1033.
  • Added BleakDeviceNotFoundError which should is raised if a device can not
    be found by connect, pair and unpair. Merged #1022.
  • Added rssi attribute to AdvertisementData. Merged #1047.
  • Added BleakScanner.discovered_devices_and_advertisement_data property. Merged #1047.
  • Added return_adv argument to BleakScanner.discover method. Merged #1047.
  • Added BleakClient.unpair() implementation for BlueZ backend. Merged #1067.

Changed

  • Changed AdvertisementData to a named tuple. Merged #1047.
  • A faster unpack_variants is now provided by dbus-fast. Merged #1055.

Fixed

  • On BlueZ, support creating additional instances running on a different event
    loops (i.e. multiple pytest-asyncio cases). Merged #1034.
  • Fixed unhandled exception in max_pdu_size_changed_handler in WinRT backend. Fixes #1039.
  • Fixed stale services in WinRT backend causing WinError -2147483629. Fixes #1061.

Removed

Removed bleak.__version__. Use importlib.metadata.version('bleak') instead.