Skip to content

v2.1.0: ESP32 ANCS bridge

Choose a tag to compare

@edleeman17 edleeman17 released this 05 Oct 08:53
· 4 commits to main since this release

v2.1.0: ESP32 ANCS bridge

The iPhone notification listener no longer needs a Raspberry Pi. A classic ESP32 dev board (~$5) now does the job of ancs4linux + ancs-bridge. It's one firmware with no SD card or Linux Bluetooth stack, it boots in under a second, and power cuts don't bother it.

What's new

  • esp32-bridge/ is PlatformIO firmware (Arduino + NimBLE). It pairs with the iPhone over Bluetooth LE, reads notifications through Apple's ANCS, and POSTs them to the processor. It's a drop-in replacement:
    • Same contract: POST /notification with {app, title, body, timestamp}, plus GET /health, /logs and /status on :8081.
    • Same rules as the Linux bridge:
      • It forwards new and modified notifications and ignores iOS's replays on reconnect.
      • It skips notification IDs it has already handled in the last hour (persisted across reboots).
    • Same watchdogs, ported: it re-subscribes after 15 min of silence, refreshes advertising every 5 min while disconnected, and reboots after 30 min without the phone.
    • POST /reset reboots the bridge. The SMS RESET command uses it when BRIDGE_RESET_URL is set, so there's no SSH anymore.
    • POST /forward?on=1|0 starts with forwarding off, so a new board can be tested next to an existing bridge without double-sending.
    • Setup and updates: a first-boot WiFi setup hotspot, and over-the-air updates after that.
  • Steadier iPhone link. The bridge asks iOS for a 5 s link timeout instead of the ~0.7 s default, and re-advertises at Apple's fast rate after a drop. On the same desk, drops went from every 10–40 s to rare, and reconnects take 2–7 s.
  • Dashboard redesign: minimal and monochrome, with status-signalling colour. The AI analysis feature has been removed.

Upgrading from the Pi bridge

See esp32-bridge/README.md:

  1. Flash the board and join it to WiFi through its setup hotspot.
  2. Pair once from nRF Connect. iOS doesn't list LE devices in Settings until then.
  3. Check /logs for dry-run lines.
  4. Stop the Pi services.
  5. Run POST /forward?on=1.
  6. Point PI_HEALTH_URL and BRIDGE_RESET_URL at the board.

Known limitations

  • Only the iPhone can start a Bluetooth LE connection. After a long absence (you've been out), iOS sometimes stops reconnecting on its own; tap Sift ANCS in Settings → Bluetooth. The Pi bridge had the same limitation.
  • A classic ESP32 shares one radio between WiFi and Bluetooth, so put it within a few metres of where the phone usually sits.