From 63bbc1a73224a9d613fefa5fe56636c9350c1b69 Mon Sep 17 00:00:00 2001 From: iAMD Date: Fri, 19 Jan 2024 13:43:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=93=9D=E7=89=99=E7=BC=93?= =?UTF-8?q?=E5=AD=98=E9=97=AE=E9=A2=98=20(#43)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bluetooth_low_energy/CHANGELOG.md | 4 ++++ bluetooth_low_energy/example/pubspec.lock | 6 +++--- bluetooth_low_energy/pubspec.yaml | 4 ++-- bluetooth_low_energy_windows/CHANGELOG.md | 4 ++++ bluetooth_low_energy_windows/example/pubspec.lock | 2 +- bluetooth_low_energy_windows/pubspec.yaml | 2 +- .../windows/my_central_manager.cpp | 8 ++++---- 7 files changed, 19 insertions(+), 11 deletions(-) diff --git a/bluetooth_low_energy/CHANGELOG.md b/bluetooth_low_energy/CHANGELOG.md index ddabe39..98074bd 100644 --- a/bluetooth_low_energy/CHANGELOG.md +++ b/bluetooth_low_energy/CHANGELOG.md @@ -1,3 +1,7 @@ +## 5.0.5 + +* `Windows` Fix the [`CentralManager#discoverGATT`, `CentralManager#readCharacteristic` and `CentralManager#readDescriptor` issue](https://github.com/yanshouwang/bluetooth_low_energy/issues/42) caused by cache mode. + ## 5.0.4 * `iOS` Fix issues caused by CoW. diff --git a/bluetooth_low_energy/example/pubspec.lock b/bluetooth_low_energy/example/pubspec.lock index ff1603c..32c2684 100644 --- a/bluetooth_low_energy/example/pubspec.lock +++ b/bluetooth_low_energy/example/pubspec.lock @@ -23,7 +23,7 @@ packages: path: ".." relative: true source: path - version: "5.0.4" + version: "5.0.5" bluetooth_low_energy_android: dependency: transitive description: @@ -60,10 +60,10 @@ packages: dependency: transitive description: name: bluetooth_low_energy_windows - sha256: "1a4382a1c3d480a35b4de5b7065b00e739cf44129108006c2a3ed8f3ca99fd3d" + sha256: e2b812e00ff808feb5dca9404a5310f21fceecd2656f0a2d51f0bbeb9e8b258b url: "https://pub.dev" source: hosted - version: "5.0.0" + version: "5.0.1" bluez: dependency: transitive description: diff --git a/bluetooth_low_energy/pubspec.yaml b/bluetooth_low_energy/pubspec.yaml index 5350fda..ee0c923 100644 --- a/bluetooth_low_energy/pubspec.yaml +++ b/bluetooth_low_energy/pubspec.yaml @@ -1,6 +1,6 @@ name: bluetooth_low_energy description: A Flutter plugin for controlling the bluetooth low energy, supports central and peripheral apis. -version: 5.0.4 +version: 5.0.5 homepage: https://github.com/yanshouwang/bluetooth_low_energy environment: @@ -13,7 +13,7 @@ dependencies: bluetooth_low_energy_platform_interface: ^5.0.0 bluetooth_low_energy_android: ^5.0.2 bluetooth_low_energy_darwin: ^5.0.3 - bluetooth_low_energy_windows: ^5.0.0 + bluetooth_low_energy_windows: ^5.0.1 bluetooth_low_energy_linux: ^5.0.0 dev_dependencies: diff --git a/bluetooth_low_energy_windows/CHANGELOG.md b/bluetooth_low_energy_windows/CHANGELOG.md index 2531be2..7b73900 100644 --- a/bluetooth_low_energy_windows/CHANGELOG.md +++ b/bluetooth_low_energy_windows/CHANGELOG.md @@ -1,3 +1,7 @@ +## 5.0.1 + +* Fix the [`CentralManager#discoverGATT`, `CentralManager#readCharacteristic` and `CentralManager#readDescriptor` issue](https://github.com/yanshouwang/bluetooth_low_energy/issues/42) caused by cache mode. + ## 5.0.0 * Add implementation of `CentralManagerApi`. diff --git a/bluetooth_low_energy_windows/example/pubspec.lock b/bluetooth_low_energy_windows/example/pubspec.lock index c05931e..4a73ba1 100644 --- a/bluetooth_low_energy_windows/example/pubspec.lock +++ b/bluetooth_low_energy_windows/example/pubspec.lock @@ -23,7 +23,7 @@ packages: path: ".." relative: true source: path - version: "5.0.0" + version: "5.0.1" boolean_selector: dependency: transitive description: diff --git a/bluetooth_low_energy_windows/pubspec.yaml b/bluetooth_low_energy_windows/pubspec.yaml index cf145e8..3ae203e 100644 --- a/bluetooth_low_energy_windows/pubspec.yaml +++ b/bluetooth_low_energy_windows/pubspec.yaml @@ -1,6 +1,6 @@ name: bluetooth_low_energy_windows description: Windows implementation of the bluetooth_low_energy plugin. -version: 5.0.0 +version: 5.0.1 homepage: https://github.com/yanshouwang/bluetooth_low_energy environment: diff --git a/bluetooth_low_energy_windows/windows/my_central_manager.cpp b/bluetooth_low_energy_windows/windows/my_central_manager.cpp index 94b3a57..5c5bdb9 100644 --- a/bluetooth_low_energy_windows/windows/my_central_manager.cpp +++ b/bluetooth_low_energy_windows/windows/my_central_manager.cpp @@ -280,7 +280,7 @@ namespace bluetooth_low_energy_windows try { const auto& service = m_retrieve_service(address_args, handle_args); - const auto& r = co_await service->GetCharacteristicsAsync(); + const auto& r = co_await service->GetCharacteristicsAsync(winrt::Windows::Devices::Bluetooth::BluetoothCacheMode::Uncached); const auto status = r.Status(); if (status != winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattCommunicationStatus::Success) { @@ -345,7 +345,7 @@ namespace bluetooth_low_energy_windows try { const auto& characteristic = m_retrieve_characteristic(address_args, handle_args); - const auto& r = co_await characteristic->GetDescriptorsAsync(); + const auto& r = co_await characteristic->GetDescriptorsAsync(winrt::Windows::Devices::Bluetooth::BluetoothCacheMode::Uncached); const auto status = r.Status(); if (status != winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattCommunicationStatus::Success) { @@ -399,7 +399,7 @@ namespace bluetooth_low_energy_windows try { const auto& characteristic = m_retrieve_characteristic(address_args, handle_args); - const auto& r = co_await characteristic->ReadValueAsync(); + const auto& r = co_await characteristic->ReadValueAsync(winrt::Windows::Devices::Bluetooth::BluetoothCacheMode::Uncached); const auto status = r.Status(); if (status != winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattCommunicationStatus::Success) { @@ -515,7 +515,7 @@ namespace bluetooth_low_energy_windows try { const auto& descriptor = m_retrieve_descriptor(address_args, handle_args); - const auto& r = co_await descriptor->ReadValueAsync(); + const auto& r = co_await descriptor->ReadValueAsync(winrt::Windows::Devices::Bluetooth::BluetoothCacheMode::Uncached); const auto status = r.Status(); if (status != winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattCommunicationStatus::Success) {