Code: Select all
// Custom UUID used to differentiate this device.
// Use any online UUID generator to generate a valid UUID.
// Note that the byte order is reversed ... CUSTOM_UUID
// below corresponds to the follow value:
// df67ff1a-718f-11e7-8cf7-a6006ad3dba0
const uint8_t CUSTOM_UUID[] =
{
0xA0, 0xDB, 0xD3, 0x6A, 0x00, 0xA6, 0xF7, 0x8C,
0xE7, 0x11, 0x8F, 0x71, 0x1A, 0xFF, 0x67, 0xDF
};
BLEUuid uuid = BLEUuid(CUSTOM_UUID);
Code: Select all
Bluefruit.Scanner.filterUuid(uuid); // Only invoke callback if the target UUID was found
I looked at the library and it didn't seem like i could sort by much else other than rssi and UUID.
Currently i am just matching the MAC address but i was hoping there might be a better way to approach this
Code: Select all
uint8_t addr[6] = {177,204,161,241,52,164};
int count = 0;
for (int i = 0; i < 6;i++){
if (addr[i] == report->peer_addr.addr[i]){
count++;
}
}
if (count == 6){
}