[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: PyQt 6.6.1 QBluetoothDeviceInfo getServiceData() Bug
From:       Phil Thompson <phil () riverbankcomputing ! com>
Date:       2024-04-17 11:45:48
Message-ID: 459e57657e717761bba53292cce168d4 () riverbankcomputing ! com
[Download RAW message or body]

On 12/04/2024 10:51, Benjamin Griffiths wrote:
> Hi there,
> 
>  I am trying to read the BLE service data from QBluetoothDeviceInfo
> via the serviceData() method, but I believe I have discovered a bug.
> 
>  _serviceData() ->__ Dict[QBluetoothUuid, QByteArray]_
> 
> The function returns an empty dictionary for discovered devices that
> have no service data available (correct behaviour). However, when the
> device does have service data, a TypeError is raised.
> 
>  _TypeError: unhashable type: 'QBluetoothUuid'_
> 
>  I have attached a minimal reproducible example that scans for all
> Bluetooth Low Energy devices and tries to read the service data using
> serviceData(). Obviously to reproduce this error you will need to be
> in range of some BLE devices that have non-empty service data.
> 
>  I am using Python 3.10.11 and PyQt 6.6.1.
> 
>  A work around is to use the serviceUuids() method, then use
> serviceData(uuid) for each UUID. However as per the documentation this
> only return the "first" item in service data, not all of it.
> 
>  Any support would be greatly appreciated.
> 
>  Many thanks,
> 
>  Ben

Should be fixed in the next snapshot.

Thanks,
Phil
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic