Skip to content

Display Identity Key & Pairing Date: necessary to calculate the EID for presence detection #86

@HarryR

Description

@HarryR

This is super cool, just integrated FMDN BLE presence detection in an app, but I needed to extract the pairing date and identity key to do so. After that it was fairly straightforward to observe the packets, calculate and verify the EID etc. from the advertised frames.

diff --git a/NovaApi/ExecuteAction/LocateTracker/decrypt_locations.py b/NovaApi/ExecuteAction/LocateTracker/decrypt_locations.py
index c0e7033..05df49c 100644
--- a/NovaApi/ExecuteAction/LocateTracker/decrypt_locations.py
+++ b/NovaApi/ExecuteAction/LocateTracker/decrypt_locations.py
@@ -72,6 +72,13 @@ def decrypt_location_response_locations(device_update_protobuf):
     device_registration = device_update_protobuf.deviceMetadata.information.deviceRegistration
 
     identity_key = retrieve_identity_key(device_registration)
+    pair_date = device_registration.pairDate
+    print(f"\n{'='*60}")
+    print(f"IDENTITY KEY:")
+    print(f"{identity_key.hex()}")
+    print(f"PAIR DATE: {pair_date}")
+    print(f"{'='*60}\n")
     locations_proto = device_update_protobuf.deviceMetadata.information.locationInformation.reports.recentLocationAndNetworkLocations
     is_mcu = is_mcu_tracker(device_registration)

Here is example code: https://gist.github.com/HarryR/93c07f679370849e5e32fe7e12aa7610

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions