Self-Hosted Tag Manager NIST P-224 Elliptic Curve ESP32 Multi-Firmware Generator Django 5 · DRF · Django-Q2 · MapLibre GL

Apple Find My Manager: ESP32 DIY Tag Control & Telemetry System

A comprehensive, self-hosted engineering platform and web dashboard for managing custom ESP32 locator tags on Apple's offline finding network. Automates NIST P-224 elliptic curve keypair generation, tailored firmware export across ESP-IDF, Arduino, and MicroPython, background Apple 2FA cloud synchronization via FindMy.py and django-q2, Fernet field-level encrypted credential vaults, a full Django REST Framework API, and real-time vector map plotting with MapLibre GL JS.

Django 5.0 / DRF FindMy.py & Anisette ESP32 (C / C++ / MicroPython) Django-Q2 Multiprocessing Fernet AES-128 Encryption MapLibre GL & OpenFreeMap

System Key Highlights

  • Multi-Target Firmware Synthesis: Dynamically generates native ESP-IDF C, Arduino IDE sketch, and MicroPython source code with baked-in P-224 keys.
  • Non-Blocking 2FA Synchronization: Delegates Apple cloud authentication, Anisette token generation, and SMS/Push 2FA verification to asynchronous django-q2 workers.
  • Fernet Field-Level Encryption: Apple passwords and tag private keys are transparently encrypted at rest using AES-128-CBC derived from SECRET_KEY.
  • Vector Map Visualizer: GPU-accelerated MapLibre GL JS dark vector map visualizes tag history and coordinates via free OpenFreeMap OSM tiles.

System Architecture & Data Pipeline

The manager operates as a self-contained Django 5 service with an integrated SQLite ORM broker. It decouples long-running Apple network operations from client HTTP requests, enabling smooth UI responsiveness even during interactive two-factor authentication challenges:

  ┌───────────────┐      BLE Beacon (28B Public Key)      ┌─────────────┐
  │   ESP32 Tag   │ ───────────────────────────────────── │  Nearby iOS │
  │ (Transmitter) │                                       │   Device    │
  └───────────────┘                                       └──────┬──────┘
                                                                 │ Encrypted GPS
                                                                 |
  ┌──────────────────────────────────────────────────┐   ┌─────────────┐
  │         Apple Find My Simple Manager             │   │ Apple Cloud │
  │  ┌───────────────┐        ┌───────────────────┐  │   │   Servers   │
  │  │   Django 5    │ ────── │     Django-Q2     │  │   └──────┬──────┘
  │  │  Web Server   │        │ Background Worker │  │          │
  │  │ (UI & DRF API)│        │   (FindMy.py)     │  ┼──────────┘
  │  └───────┬───────┘        └─────────┬─────────┘  │  Reports Fetch & 2FA
  │          │                          │            │
  │          |                          |            │
  │   MapLibre GL Map           Encrypted SQLite DB  │
  │   (OpenFreeMap Tiles)       (UUIDs + Fernet AES) │
  └──────────────────────────────────────────────────┘

The service maintains multi-tenant isolation: Apple accounts, devices, and location reports belong strictly to a Django user. Companion config.ini and .keys files can also be exported to feed existing macless-haystack Docker containers.

Technical Specifications

Architecture Django 5.0 MVC + Django REST Framework
Task Queue django-q2 Multiprocessing (SQLite ORM Broker)
Cryptography NIST P-224 ECDSA, Fernet AES-128-CBC, SHA-256
Apple Sync FindMy.py + Local/Remote Anisette Protocol
Firmware Targets ESP-IDF (C), Arduino (C++), MicroPython (Python)
Wireless Standard BLE GAP Non-Connectable Adv (0x004C, Type 0x12)
Mapping Engine MapLibre GL JS + OpenFreeMap Dark Vector Tiles
Authentication django-allauth (MFA/TOTP) + DRF Bearer Tokens
Visual Walkthrough

Platform Interfaces & Workflows (14 Screenshots)

Home Dashboard
Dashboard Figure 01

Central Control Desk

Overview of linked Apple IDs, active ESP32 tags, fetch statuses, and quick action triggers.

User Login Screen
Auth Figure 02

User Authentication Screen

Multi-tenant session login supporting username or verified email with mandatory verification.

Apple Accounts Table
Accounts Figure 03

Apple Accounts Management

Table showing registered Apple IDs, active states, last fetch timestamps, and status indicators.

Add Apple Account Form
Encryption Figure 04

Encrypted Credential Entry

Form with client-side masking and Fernet encryption on write before saving to SQLite database.

Account Details and 2FA
2FA Sync Figure 05

Account Details & 2FA Session

Live Anisette session details, background sign-in triggers, 2FA prompt handling, and config.ini exporter.

Devices List Table
Devices Figure 06

Registered ESP32 Tags

List of all tags displaying public advertisement key prefixes, associated Apple accounts, and duty cycles.

Device Details and Keys
Keys & Firmware Figure 07

Device Keys & Firmware Desk

Plaintext bench inspection of 28-byte public/private keys, broadcast duration sliders, and source download links.

Arduino IDE Code Export
Code Export Figure 08

Arduino C++ Sketch Exporter

Dynamic C++ source generator embedding the NIST P-224 key bytes, random static MAC address, and raw payload.

Create New Device Form
Keygen Figure 09

P-224 Keypair Device Generator

Generate new cryptographic elliptic curve keypairs on the fly or paste existing keys from OpenHaystack.

Device Location History Table
History Figure 10

Granular Location History Log

UTC timestamps, decoded latitude/longitude, horizontal accuracy radius (m), and battery status bits.

Live Map Tracking Interface
Live Map Figure 11

MapLibre GL Dark Vector Map

Interactive GPU-rendered vector map with OpenFreeMap dark style, marker popups, and device telemetry cards.

Interactive Map Waypoint Detail Popup
Telemetry Figure 12

Waypoint Detail Inspection Popup

High-precision waypoint telemetry inspection displaying confidence level, horizontal uncertainty radius, and report timestamp.

User Profile and MFA Settings
Security Figure 13

User Profile & MFA Center

Manage verified email addresses, change password, and enroll in RFC 6238 TOTP authenticator apps.

Django REST Framework API Root
REST API Figure 14

DRF Browsable REST API Root

Scoped JSON endpoints under /api/v1/ supporting Token and Session auth for mobile and headless scripting.

Django Admin Dashboard
Admin Figure 15

Django Admin & Task Inspector

Administrative management interface for scheduled jobs, django-q2 task monitoring, and system metrics.