Skip to content

BleakClient.stop_notify() documentation seems not relevant for MAC OS #1969

@EasyRiderr

Description

@EasyRiderr

The BleakClient.stop_notify() documentation says:

Notifications are stopped automatically on disconnect, so this method does not need to be called unless notifications need to be stopped some time before the device disconnects.

But on MAC (Apple M2 Pro with macOS Tahoe v26.4.1), when bleak connects to a BLE peripheral, enables notifications, disconnects then reconnects and try to enable notifications, the following errors is raised:

File "/Users/user/Library/Application Support/hatch/env/virtual/project/hoVqGm6Y/project/lib/python3.14/site-packages/bleak/backends/corebluetooth/client.py", line 382, in start_notify
    await self._delegate.start_notifications(
    ...<3 lines>...
    )
  File "/Users/user/Library/Application Support/hatch/env/virtual/project/hoVqGm6Y/project/lib/python3.14/site-packages/bleak/backends/corebluetooth/PeripheralDelegate.py", line 463, in start_notifications
    raise ValueError("Characteristic notifications already started")
ValueError: Characteristic notifications already started

The expected behavior would be no Exception raised. By the way, under Linux, everything is fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Backend: Core BluetoothIssues and PRs relating to the Core Bluetooth backendbugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions