Skip to content

Commit 1d6bf67

Browse files
committed
Immediately call device callbacks during active scans for non-connectable devies.
2 parents 63d3930 + bb8982b commit 1d6bf67

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/NimBLEScan.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ NimBLEScan::NimBLEScan() {
141141

142142
if (pScan->m_pAdvertisedDeviceCallbacks) {
143143
// If not active scanning report the result to the listener.
144-
if(pScan->m_scan_params.passive) {
144+
if(pScan->m_scan_params.passive || event->disc.event_type == BLE_HCI_ADV_TYPE_ADV_NONCONN_IND) {
145145
pScan->m_pAdvertisedDeviceCallbacks->onResult(advertisedDevice);
146146
// Otherwise wait for the scan response so we can report all of the data at once.
147147
} else if (event->disc.event_type == BLE_HCI_ADV_RPT_EVTYPE_SCAN_RSP) {

0 commit comments

Comments
 (0)