Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions libraries/CurieBLE/src/internal/BLEDeviceManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ BLEDevice BLEDeviceManager::peripheral()

bool BLEDeviceManager::startScanning()
{
_adv_duplicate_filter_enabled = false;
_adv_duplicate_filter_enabled = true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you can change code here. If you changed code here, it will make developer confusing. I think change the code in BLEDevice.cpp is more reasonable.

_scan_param.filter_dup = BT_HCI_LE_SCAN_FILTER_DUP_ENABLE;
int err = bt_le_scan_start(&_scan_param, ble_central_device_found);
if (err)
Expand All @@ -591,7 +591,7 @@ bool BLEDeviceManager::startScanning()

bool BLEDeviceManager::startScanningWithDuplicates()
{
_adv_duplicate_filter_enabled = true;
_adv_duplicate_filter_enabled = false;
memset(_peer_duplicate_address_buffer, 0, sizeof(_peer_duplicate_address_buffer));
_duplicate_filter_header = _duplicate_filter_tail = 0;

Expand Down