hbldh / bleak

A cross platform Bluetooth Low Energy Client for Python using asyncio
MIT License
1.58k stars 277 forks source link

dbus-fast error when trying to start scanning with BleakScanner #1456

Closed svhoy closed 3 months ago

svhoy commented 6 months ago

Description

Hello,

After I am upgraded Bleak (0.21.1) and dbus-fast (2.0.0 and 2.14.0) on my Raspberry Pi there are a issue when I like to start scanning for BLE Devices with BleakScanner. It seems something going wrong when I am initialize the BleakScanner.

What I Did

In my code I am just calling BleakScanner() and after that the only thing that happends is the error in Logs.

async def scan(self, timeout: float = 10.0) -> list[BLEDevice]:
        _scanner = BleakScanner()
        return await _scanner.discover(timeout=timeout)

Logs

2023-11-15 18:39:59,959 - pi_socket - ERROR: Can not create Dataclass: dbus_fast.signature.Variant size changed, may indicate binary incompatibility. Expected 24 from C header, got 20 from PyObject

Sorry that I can't provide more Logging Informations, when I am runnging my program with dbus-fast 1.84.2 I can see the whole Scanning progress in my log but with dbus-fast >=2.0.0 there is only thats what is comming.

Thanks for your help in advance.

dlech commented 6 months ago

It sounds like this is a bug in dbus-fast so should be reported at https://github.com/Bluetooth-Devices/dbus-fast

svhoy commented 6 months ago

I reported it to dbus-fast. Let's see what is comming.

svhoy commented 3 months ago

I like to close this here. This simple workaround works: dbus-fast issue