summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qbluetoothsocket_osx.mm
diff options
context:
space:
mode:
authorJuha Vuolle <juha.vuolle@insta.fi>2022-05-02 13:04:21 +0300
committerJuha Vuolle <juha.vuolle@insta.fi>2022-05-12 09:06:13 +0300
commitca96a42035255b4355e4d8ddba7f5da7b9006577 (patch)
tree072961c41bcc4f55a0b98214426c093b298c15ae /src/bluetooth/qbluetoothsocket_osx.mm
parente043bb633f44cc85080973857e6485a8f3801d30 (diff)
Fix Bluez BT LE battery reading
This commit addresses two related issues: - From Bluez 5.55 onwards the battery service is available through both GattService1 and Battery1 interface. This broke the current implementation in a way that the battery level was always '0'. This patch uses the GattService1 interface if available - The Battery1 interface is not always available during the service discovery, it's not generated yet. This causes the service to be missed. This patch also checks if the battery remote service is available also from 'Device1' interface This commit has been tested with Bluez versions 5.42..5.63 with Qt6, and with few selected versions with Qt5 Fixes: QTBUG-70222 Change-Id: I963947937cf85c8082fb044afe223f41e141b7c0 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit e7604172ff7bdab8f3936c84a866476aee576e54) Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'src/bluetooth/qbluetoothsocket_osx.mm')
0 files changed, 0 insertions, 0 deletions