Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.5.1
-
- Qt 6.5.1
- Android12 Go Edition ( Lenovo Tab M8 4th Gen )
- Bluetooth LE 5.0
-
-
13
-
cc337336f (dev), da88795e0 (6.6), 45675834c (6.5)
-
Foundation Sprint 90, Foundation Sprint 91
Description
Step to reproduce
- Several tries to connect / disconnect from Android device to peripheral BLE device.
- If the disconnection occurs during the establishing of a connection with the discovered service, reconnection will be unavailable thereafter.
-
- I have attached the log file when problem occurs. ( ble.log )
Cause of problem
- I think QLowEnergyController is in an abnormal state and cannot be reconnected, because reconnection becomes possible after calling QLowEnergyController::createCentral() and initializing QLowEnergyController.
Request
- If the QLowEnergyController is in an abnormal state and cannot be reconnected, then I would like QLowEnergyController::error() to be called to return some error status.
-
- When a reconnection problem occurs, a call to QLowEnergyController::error() returns a status of QLowEnergyController::NoError.
- I want to call QLowEnergyController::error() to check QLowEnergyController's error status and initialize it with QLowEnergyController::createCentral() if necessary. (as follow)
if (m_pController != nullptr) { if (m_pController->error() != QLowEnergyController::Error::NoError) { m_pController->disconnectFromDevice(); delete m_pController; m_pController = nullptr; m_pController = QLowEnergyController::createCentral(m_currentDevice.getDevice()); } }
Appendix
- When a reconnection problem occurs, a call to QLowEnergyController::error() returns a status of QLowEnergyController::ConnectionError on Android 11 Go Edition ( Lenovo Tab M7 3rd Gen ). However, on Android12 Go Edition, QLowEnergyController::Error::NoError is returned.
Attachments
For Gerrit Dashboard: QTBUG-115370 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
505164,3 | Clear any pendingJob of BT LE controller in case of disconnect | dev | qt/qtconnectivity | Status: MERGED | +2 | 0 |
505889,2 | Clear any pendingJob of BT LE controller in case of disconnect | 6.6 | qt/qtconnectivity | Status: MERGED | +2 | 0 |
506114,2 | Clear any pendingJob of BT LE controller in case of disconnect | 6.5 | qt/qtconnectivity | Status: MERGED | +2 | 0 |