AirPods Max support for linux-rust (encrypted AAP, battery, NC, on-head, head-tracking scaffold)#617
Open
Dino-dev66 wants to merge 1 commit into
Open
Conversation
Force L2CAP security to Medium before connecting. AirPods refuse to emit the AAP notification stream over an unencrypted channel, so the Max only accepted writes (NC) and reported nothing back. With encryption it now streams battery, ear/on-head detection, listening mode, metadata and keys. What now works on AirPods Max: - Battery monitoring (single Headphone component, count=1) - Noise control set + live readback - On-head detection (drives media play/pause) - Connect/disconnect desktop notifications (notify-send) Spatial audio / head tracking: - Implemented the Pro-style 0x17 head-tracking stream: parse, start/stop senders, an AACPEvent, a live orientation visualiser, re-center, and nod/shake gesture detection mapped to media controls. - Gated off for AirPods Max (model A2096/A3184) with an explanatory note: the Max exposes motion via a ProtectedAccess HID-over-AAP relay that no host can open. Conversational Awareness is likewise unavailable (H1 chip). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds working AirPods Max support to the
linux-rustclient, tested against a real AirPods Max (A2096, Lightning).Root cause that unlocked everything
The L2CAP channel was opened unencrypted (
BT_SECURITYdefaulted toLow). AirPods accept writes over an unencrypted channel (so changing noise control appeared to work) but never emit the AAP notification stream — no battery, ear detection, mode readback, metadata or proximity keys. Setting the socket toSecurity::Mediumbeforeconnect()(the equivalent of whatproximity_keys.py/bumble do withauthenticate()+encrypt()) makes the Max stream everything.Now working on AirPods Max
Headphone(0x01) component,count=1notify-send, transient)Head tracking / spatial audio
0x17stream end to end: parse, start/stop senders, anAACPEvent::HeadTracking, a live pitch/yaw/roll visualiser, re-center, and a nod/shakeGestureDetectormapped to media controls. This path is for models that support it (e.g. AirPods Pro).A2096/A3184) with an in-app explanation: the Max exposes motion via aProtectedAccessHID-over-AAP relay (cma/B2PRelayHIDDevice) that doesn't stream to an unauthenticated host. The Pro-style START packet only makes it re-advertise its HID descriptors.Known hardware limits on the Max (not bugs)
ConversationDetectConfig(H1 chip; Apple gates CA to H2).Notes
0x1Dmodel number.expire_timeout, so notifications use thetransienthint and are limited to connect/disconnect.🤖 Generated with Claude Code