Datasheet

void useActiveScan(bool enable);
Enabling 'Active Scan' by setting the enable parameter to 1 will cause the device to request the optional Scan
Response advertising packet, which is a second 31 byte advertising packet that can be used to transmit additional
}
else
{
/* This is a normal advertising packet */
Serial.printf("[ADV%9d] Packet received from ", millis());
}
Serial.printBuffer(report->peer_addr.addr, 6, ':');
Serial.print("\n");
/* Raw buffer contents */
Serial.printf("%14s %d bytes\n", "PAYLOAD", report->dlen);
if (report->dlen)
{
Serial.printf("%15s", " ");
Serial.printBuffer(report->data, report->dlen, '-');
Serial.println();
}
/* RSSI value */
Serial.printf("%14s %d dBm\n", "RSSI", report->rssi);
/* Adv Type */
Serial.printf("%14s ", "ADV TYPE");
switch (report->type)
{
case BLE_GAP_ADV_TYPE_ADV_IND:
Serial.printf("Connectable undirected\n");
break;
case BLE_GAP_ADV_TYPE_ADV_DIRECT_IND:
Serial.printf("Connectable directed\n");
break;
case BLE_GAP_ADV_TYPE_ADV_SCAN_IND:
Serial.printf("Scannable undirected\n");
break;
case BLE_GAP_ADV_TYPE_ADV_NONCONN_IND:
Serial.printf("Non-connectable undirected\n");
break;
}
/* Check for BLE UART UUID */
if ( Bluefruit.Scanner.checkReportForUuid(report, BLEUART_UUID_SERVICE) )
{
Serial.printf("%14s %s\n", "BLE UART", "UUID Found!");
}
/* Check for DIS UUID */
if ( Bluefruit.Scanner.checkReportForUuid(report, UUID16_SVC_DEVICE_INFORMATION) )
{
Serial.printf("%14s %s\n", "DIS", "UUID Found!");
}
Serial.println();
}
© Adafruit Industries https://learn.adafruit.com/bluefruit-nrf52-feather-learning-guide Page 101 of 175