Hello Everyone,
I am currently building a presence detection application using the nRF52840. I want to be able to detect both Android and Apple devices. Currently the application is working for Android by detecting BLE iBeacons and comparing the UUID to a known list.
However, since Apple devices do not support iBeacons and use random resolvable addresses a different approach was needed. I have come up with the following solution:
If a packet with address type BT_ADDR_LE_RANDOM_ID or BT_ADDR_LE_RANDOM is found then i want to resolve the address using the Accelerated Address Resolver (AAR) peripheral.
I already obtained the requierd IRKs for this and they are stored in a uint8_t irk[16]. However when i run the AAR with one of addresses it never matches one of the IRKs, altough i'm sure that both the MAC address and the IRK match.
I even tried calling the the resolve function manually in the startup function with known data, but this doesn't work either. Maybe you can help out and spot the error?
Please see my code below: