From 7156300e266b932ce4d75b96cbf4f44158c70ed4 Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Mon, 5 Jun 2023 18:25:00 +0200 Subject: [PATCH] [Darwin] Turn on CBCentralManagerScanOptionAllowDuplicatesKey (#27069) --- src/platform/Darwin/BleConnectionDelegateImpl.mm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/platform/Darwin/BleConnectionDelegateImpl.mm b/src/platform/Darwin/BleConnectionDelegateImpl.mm index 70b6605eb2fd5c..6d56573959b6b9 100644 --- a/src/platform/Darwin/BleConnectionDelegateImpl.mm +++ b/src/platform/Darwin/BleConnectionDelegateImpl.mm @@ -589,7 +589,8 @@ - (void)startScanning return; } - [_centralManager scanForPeripheralsWithServices:@[ _shortServiceUUID ] options:nil]; + auto scanOptions = @{ CBCentralManagerScanOptionAllowDuplicatesKey : @YES }; + [_centralManager scanForPeripheralsWithServices:@[ _shortServiceUUID ] options:scanOptions]; } - (void)stopScanning @@ -716,7 +717,7 @@ - (void)addPeripheralToCache:(CBPeripheral *)peripheral data:(NSData *)data ChipLogProgress(Ble, " - Version: %u", info.GetAdvertisementVersion()); ChipLogProgress(Ble, " - Discriminator: %u", info.GetDeviceDiscriminator()); ChipLogProgress(Ble, " - VendorId: %u", info.GetVendorId()); - ChipLogProgress(Ble, " - ProductId: %u", info.GetVendorId()); + ChipLogProgress(Ble, " - ProductId: %u", info.GetProductId()); } }