Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.2.2
-
PySide6.2.2, Shiboken6.2.2, PyCharm 2022.3.3 (Community Edition), Python 3.9.7
Description
Hi all,
Scanning for BLE devices on MacOs seems to have issues! I detect classic bluetooth devices along with LE devices.
I am using the following code to scan:
self.__discovery_agent: QBluetoothDeviceDiscoveryAgent = QBluetoothDeviceDiscoveryAgent() self._discovery_agent.deviceDiscovered.connect(self._discovery_agent_device_discovered_handler) self._discovery_agent.finished.connect(self._discovery_agent_scan_finished_handler) self.__discovery_agent.DiscoveryMethod = QBluetoothDeviceDiscoveryAgent.LowEnergyMethod self.__discovery_agent.setLowEnergyDiscoveryTimeout(timeout) self.__discovery_agent.start()
I have an assumption that the following line of code should limit the scanning to BLE devices:
self.__discovery_agent.DiscoveryMethod = QBluetoothDeviceDiscoveryAgent.LowEnergyMethod
This code works pretty fine on WindowsOS.
I see the following traces during scanning phase:
2023-09-26 09:27:08.937 Python[85263:5125034] [IOBluetoothDeviceInquiry initWithDelegate:] 0x600002c2d320qt.bluetooth.darwin: IOKit error code: 1
qt.bluetooth.darwin: IOKit error code: 1
qt.bluetooth.darwin: IOKit error code: 1
qt.bluetooth.darwin: IOKit error code: 1qt.bluetooth.darwin: Manually interrupting IOBluetoothDeviceInquiry
Please note that I've communicated with Qt C++ devs. and they replied that
a C++-based code on MacOS does not detect classic bluetooth devices.
For more informatoin; Please see https://bugreports.qt.io/projects/QTBUG/issues/QTBUG-117009
Attachments
Issue Links
- blocks
-
PYSIDE-2468 Qt Permission API does not work with PySide6 on macOS
- Closed
- relates to
-
QTBUG-117009 Unstable Qt6.2/Qt6.5 BLE connection under macOS
- Closed
-
PYSIDE-2468 Qt Permission API does not work with PySide6 on macOS
- Closed