Skip to content

Commit 7156300

Browse files
vivien-applepull[bot]
authored andcommitted
[Darwin] Turn on CBCentralManagerScanOptionAllowDuplicatesKey (#27069)
1 parent ce983a9 commit 7156300

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/platform/Darwin/BleConnectionDelegateImpl.mm

+3-2
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,8 @@ - (void)startScanning
589589
return;
590590
}
591591

592-
[_centralManager scanForPeripheralsWithServices:@[ _shortServiceUUID ] options:nil];
592+
auto scanOptions = @{ CBCentralManagerScanOptionAllowDuplicatesKey : @YES };
593+
[_centralManager scanForPeripheralsWithServices:@[ _shortServiceUUID ] options:scanOptions];
593594
}
594595

595596
- (void)stopScanning
@@ -716,7 +717,7 @@ - (void)addPeripheralToCache:(CBPeripheral *)peripheral data:(NSData *)data
716717
ChipLogProgress(Ble, " - Version: %u", info.GetAdvertisementVersion());
717718
ChipLogProgress(Ble, " - Discriminator: %u", info.GetDeviceDiscriminator());
718719
ChipLogProgress(Ble, " - VendorId: %u", info.GetVendorId());
719-
ChipLogProgress(Ble, " - ProductId: %u", info.GetVendorId());
720+
ChipLogProgress(Ble, " - ProductId: %u", info.GetProductId());
720721
}
721722
}
722723

0 commit comments

Comments
 (0)