Skip to content

Commit 1505436

Browse files
committed
example clean up
1 parent 865bfb6 commit 1505436

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

libraries/Bluefruit52Lib/examples/DualRoles/dual_bleuart/dual_bleuart.ino

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -154,14 +154,10 @@ void prph_bleuart_rx_callback(void)
154154
*------------------------------------------------------------------*/
155155
void scan_callback(ble_gap_evt_adv_report_t* report)
156156
{
157-
// Check if advertising contain BleUart service
158-
if ( Bluefruit.Scanner.checkReportForService(report, clientUart) )
159-
{
160-
Serial.println("BLE UART service detected. Connecting ... ");
161-
162-
// Connect to device with bleuart service in advertising
163-
Bluefruit.Central.connect(report);
164-
}
157+
// Since we configure the scanner with filterUuid()
158+
// Scan callback only invoked for device with bleuart service advertised
159+
// Connect to the device with bleuart service in advertising packet
160+
Bluefruit.Central.connect(report);
165161
}
166162

167163
void cent_connect_callback(uint16_t conn_handle)
@@ -214,4 +210,3 @@ void cent_bleuart_rx_callback(BLEClientUart& cent_uart)
214210
clientUart.println("[Cent] Peripheral role not connected");
215211
}
216212
}
217-

0 commit comments

Comments
 (0)