A dependency-free web app for AirPods: live battery levels (earbuds and charging case), a 10-band equalizer, and a page of interesting AirPods facts gathered from Apple documentation and protocol reverse-engineering research.
No build step — it's plain HTML/CSS/JS. Serve the folder over HTTP(S) (Web Bluetooth refuses to run
from file://):
python3 -m http.server 8000
# open http://localhost:8000localhost counts as a secure context; for any other host you need HTTPS.
| Platform | Browser | Battery (BLE scan) | Battery (GATT) | Equalizer |
|---|---|---|---|---|
| Android | Chrome / Edge | ✅ (with flag) | ✅ | ✅ |
| macOS | Chrome / Edge | ✅ (with flag) | ✅ | ✅ |
| Windows | Chrome / Edge | ✅ (with flag) | ✅ | ✅ |
| Linux | Chrome / Edge | ✅ (with flag) | ✅ | ✅ |
| iOS / iPadOS | any | ❌ no Web Bluetooth | ❌ | ✅ |
| Any | Firefox / Safari | ❌ no Web Bluetooth | ❌ | ✅ |
The flag: BLE advertisement scanning (navigator.bluetooth.requestLEScan) is still an
experimental API. Enable chrome://flags/#enable-experimental-web-platform-features and restart
the browser. Everything else works without flags, and Demo mode works in every browser.
Apple has no public AirPods API, so the app uses what actually exists:
-
macOS bridge (most reliable on a Mac) — Chrome's experimental BLE-scanning API often delivers no advertisements on macOS, but macOS itself tracks AirPods battery. Run
python3 bridge/macos_bridge.py
and the battery page auto-detects it (
http://127.0.0.1:8766/battery) and polls the OS data every 10 seconds — real left/right/case levels, no flags needed. -
Apple proximity pairing broadcasts (primary path on Android/Windows/Linux) — AirPods continuously advertise a BLE manufacturer-data message (company ID
0x004C, type0x07) containing model ID, left/right battery (4-bit, 0–10 scale, 15 = unavailable), charging flags, and case battery. The app scans for these and decodes them, including the left/right "flip" bit that swaps nibbles depending on which pod is primary. The case battery appears automatically whenever the case is broadcasting (lid open or recently active). -
Standard GATT Battery Service — AirPods don't expose it to non-Apple hosts, but many other earbuds do, so it's offered as a secondary path.
-
Demo mode — simulated data for trying the UI anywhere.
Format references: furiousMAC continuity, LibrePods.
AirPods' built-in Adaptive EQ runs on the H2 chip and has no public control API — no app on any
platform can change the device-level EQ. So the equalizer shapes the audio signal instead, with the
Web Audio API: a preamp plus 10 biquad filters (low-shelf at 31 Hz, peaking through the mids,
high-shelf at 16 kHz), applied in real time to any audio file you drop in (or a test sweep). Your
AirPods reproduce the shaped signal. Band gains, preamp, and the selected preset persist in
localStorage.
index.html— battery dashboard (left pod / right pod / case, charging indicators, event log)equalizer.html— 10-band EQ with presets, frequency-response curve and live spectruminfo.html— misc AirPods facts with sources