Skip to content

Commit 022216a

Browse files
committed
Don't wait for scan response if non-connectable
1 parent 8d5b4a4 commit 022216a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libraries/CurieBLE/src/internal/BLEDeviceManager.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1370,7 +1370,7 @@ BLEDevice BLEDeviceManager::available()
13701370
{
13711371
uint64_t timestamp_delta = timestamp - _peer_adv_mill[i];
13721372
temp = &_peer_adv_buffer[i];
1373-
if ((timestamp_delta <= 2000) && (max_delta < timestamp_delta) && _peer_scan_rsp_data_len[i] >= 0)
1373+
if ((timestamp_delta <= 2000) && (max_delta < timestamp_delta) && (_peer_scan_rsp_data_len[i] >= 0 || !_peer_adv_connectable[i]))
13741374
{
13751375
// Eable the duplicate filter
13761376
if (_adv_duplicate_filter_enabled &&
@@ -1385,7 +1385,7 @@ BLEDevice BLEDeviceManager::available()
13851385
}
13861386
//pr_debug(LOG_MODULE_BLE, "%s-%d:index %d, i-%d", __FUNCTION__, __LINE__, index, i);
13871387

1388-
if (index < BLE_MAX_ADV_BUFFER_CFG && _peer_scan_rsp_data_len[index] >= 0)
1388+
if (index < BLE_MAX_ADV_BUFFER_CFG && (_peer_scan_rsp_data_len[index] >= 0 || !_peer_adv_connectable[index]))
13891389
{
13901390
temp = &_peer_adv_buffer[index];
13911391
if (true == BLEUtils::macAddressValid(*temp))

0 commit comments

Comments
 (0)