[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-109159":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":25,"topics":26,"createdAt":10,"pushedAt":42,"updatedAt":43,"readmeContent":44,"aiSummary":45,"trendingCount":16,"starSnapshotCount":16,"syncStatus":46,"lastSyncTime":47,"discoverSource":48},109159,"mousepods","starman-tech\u002Fmousepods","starman-tech","Your AirPods are a mouse: AirPods 3 head tracking on Linux, and the first public documentation of Apple RemoteHID (HID over AACP)","https:\u002F\u002Fstarman-tech.github.io\u002Fmousepods\u002F",null,"Python",565,42,1,6,0,5,35,456,16,86.4,"Apache License 2.0",false,"main",true,[27,28,29,30,31,32,33,34,35,36,37,38,39,40,41],"aacp","accessibility","airpods","airpods-3","apple-accessory-protocol","bluetooth","head-mouse","head-tracking","imu","librepods","linux","python","remotehid","reverse-engineering","wayland","2026-11-17 17:03:33","2026-11-23 18:43:43","\u003Cp align=\"center\">\n  \u003Cimg src=\"docs\u002Fbrand\u002Ficon.svg\" width=\"96\" alt=\"MousePods icon\">\n\u003C\u002Fp>\n\n\u003Ch1 align=\"center\">MousePods\u003C\u002Fh1>\n\n\u003Cp align=\"center\">\n  \u003Cb>Your AirPods are a mouse.\u003C\u002Fb>\u003Cbr>\n  Head tracking and motion sensors from AirPods 3 and AirPods Pro, on Linux, without an Apple device.\u003Cbr>\n  Including the first public documentation of Apple's \u003Cb>RemoteHID\u003C\u002Fb> protocol, the way AirPods 3 expose their sensors.\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Cimg alt=\"Linux\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLinux-BlueZ%205.7x-1d1d1f?logo=linux&logoColor=white\">\n  \u003Cimg alt=\"Wayland and X11\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FWayland%20%7C%20X11-uinput-0a84ff\">\n  \u003Cimg alt=\"Python 3.10+\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fpython-3.10%2B-34c759\">\n  \u003Cimg alt=\"Tests\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Ftests-400%20passing-34c759\">\n  \u003Ca href=\"#license-and-attribution\">\u003Cimg alt=\"License Apache-2.0 + CC BY 4.0\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-Apache--2.0%20%2B%20CC%20BY%204.0-ff9f0a\">\u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"docs\u002Fmedia\u002Fcockpit-demo.gif\" width=\"600\" alt=\"Head tracking demo: the cockpit view follows the AirPods\">\u003Cbr>\n  \u003Csub>The built-in cockpit demo: the view follows the AirPods (\u003Ca href=\"docs\u002Fmedia\u002Fcockpit-demo.mp4\">smooth 60 fps video\u003C\u002Fa>).\u003C\u002Fsub>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fstarman-tech.github.io\u002Fmousepods\u002F\">Website\u003C\u002Fa> ·\n  \u003Ca href=\"docs\u002FDISCOVERIES.md\">New findings\u003C\u002Fa> ·\n  \u003Ca href=\"docs\u002FREMOTEHID-PROTOCOL.md\">RemoteHID protocol\u003C\u002Fa> ·\n  \u003Ca href=\"docs\u002FAIRPODS3-SENSORS.md\">AirPods 3 sensors\u003C\u002Fa> ·\n  \u003Ca href=\"README.fr.md\">Français\u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"docs\u002Fscreenshots\u002Fapp-motion.png\" width=\"800\" alt=\"The MousePods app: live motion data from AirPods 3\">\n\u003C\u002Fp>\n\n---\n\n### Games, desktop app and Flatpak\n\nContributed by [@henningnorden](https:\u002F\u002Fgithub.com\u002Fhenningnorden) for sim racing on Linux gaming systems\n(Bazzite, tested with AirPods Pro 2 in Assetto Corsa and ETS2):\n\n- **Games page:** tick a Steam game running through Proton and its camera follows your head,\n  without opentrack and without launch options. MousePods places a small TrackIR\u002FFreeTrack DLL\n  (`native\u002F`) in the game's Proton prefix; the game reads the head pose from a file MousePods\n  writes. Unticking puts back whatever tracker was set up before.\n- **Per-game profiles:** damping, range and response curve per axis, axes on\u002Foff, and a neck\n  model (computed from the head rotation, AirPods cannot measure leaning). **Calibrate** shows\n  one point at a time full screen on the monitors you play that game on; hold still at each and\n  MousePods measures how far you turn your head, so a small monitor and three monitors both work.\n- **Desktop app:** own window, tray icon, autostart at login, first-run wizard; packaged as a\n  Flatpak (`packaging\u002Fflatpak\u002F`, built by GitHub Actions). Bluetooth works without\n  `bluetoothctl` through BlueZ over D-Bus.\n- **Languages:** English and German besides French (`ui\u002Fi18n\u002F`).\n\nInstall: download `MousePods-flatpak` from the latest successful\n[build](https:\u002F\u002Fgithub.com\u002Fstarman-tech\u002Fmousepods\u002Factions\u002Fworkflows\u002Fbuild.yml) and run\n`flatpak install --user MousePods.flatpak`. Steam installed as a Flatpak is not supported yet.\n\n## What's new here\n\nBefore this project, **no public tool could get head-tracking data out of AirPods 3**. LibrePods, librepods-rs, pods-head-tracker,\nairpods-head-track and aap-head-tracker all list them as untested or unsupported. The reason turned out to be three\nthings nobody had written down:\n\n| Finding | |\n|---|---|\n| AirPods 3 **ignore** the SensorDataWX protocol that AirPods Pro 2\u002F3\u002F4 and AirPods 4 use | [§2](docs\u002FDISCOVERIES.md#2-airpods-3-do-not-speak-sensordatawx) |\n| They expose their sensors as **virtual HID devices through Apple RemoteHID** (RTBuddy channel `0x800`). The wire format is now fully documented | [protocol](docs\u002FREMOTEHID-PROTOCOL.md) |\n| At the Linux default L2CAP MTU (672), the motion sensors are **not announced at all**. They appear at 2582, the value iOS uses | [§6](docs\u002FDISCOVERIES.md#6-the-mtu-hides-the-sensors) |\n\nAlong the way: the complete AirPods 3 sensor catalog (`devmotion6`, `accel`, `gyro`, `cma`, `kadabra`…), sample rates up to\n**~210 Hz** instead of 25 Hz, the scales of the motion block, and how the buds power their sensors on and off.\n**→ All findings, with evidence and an honest \"not isolated yet\" list: [docs\u002FDISCOVERIES.md](docs\u002FDISCOVERIES.md).**\n\n## How it works\n\n```\n AirPods 3 ──── L2CAP 0x1001 (AACP, MTU 2582) ────▶ AAPClient ──▶ MotionEngine ──▶ Controller ──▶ \u002Fdev\u002Fuinput ──▶ cursor\n   │  HostConnect ◀─────────────────────────────────┤             gyro + gravity     souris \u002F pointeur        (Wayland, X11)\n   │  DeviceConnect ×8 (HID descriptors) ──────────▶│             → yaw · pitch · roll    \u002F glisse\n   │  SetReport feature 1 = 10 000 µs ◀─────────────┤                                       │\n   │  InputReport @ 100 Hz (58-byte block) ────────▶│                         http:\u002F\u002F127.0.0.1:8737  (app)\n AirPods Pro 2 ── same, through SensorDataWX (protobuf, 0x100000) ──┘\n```\n\n1. **Connect** without root: L2CAP PSM `0x1001`, encrypted link, receive MTU 2582.\n2. **Start the sensor**: RemoteHID for AirPods 3, SensorDataWX for AirPods Pro \u002F 4. Detected automatically.\n3. **Compute motion that doesn't depend on how the bud is held**: yaw is the rotation around the *vertical* (taken from the gravity vector), pitch the rotation around a lateral axis learned during calibration. Gyro bias is re-estimated whenever the device is still.\n4. **Move the cursor** through a virtual `uinput` device (works on Wayland), rendered at 120 Hz with One-Euro smoothing.\n\n## Modes\n\n| Mode | Move | Feels like |\n|---|---|---|\n| **Souris** (mouse) | turn \u002F tilt your head, or a bud in your hand | an air mouse, with acceleration |\n| **Pointeur** (pointer) | aim at the screen | a laser pointer. Calibrated by aiming at two corners: aim at a corner and the cursor lands there |\n| **Glisse** (glide) | slide a bud flat on the table | an inertial mouse. Experimental: see the limits below |\n\nClicks: stem press, quick head tilt (optional), or dwell. Shortcuts: `Ctrl+Alt+C` recenter · `Ctrl+Alt+P` pause · `Ctrl+Alt+M` mode · `Ctrl+Alt+S` scroll.\n\n## The app\n\nA local app in the style of macOS Settings (light and dark): battery rings, live 3D orientation, rate charts, every setting applied\nlive, guided calibration, a **sensor explorer** to start and query each RemoteHID device, the AirPods' internal settings and a raw packet log.\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"docs\u002Fscreenshots\u002Fapp-sensors.png\" width=\"49%\" alt=\"Sensor explorer\">\n  \u003Cimg src=\"docs\u002Fscreenshots\u002Fapp-calib.png\" width=\"49%\" alt=\"Calibration\">\n\u003C\u002Fp>\n\n## Install\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fstarman-tech\u002Fmousepods && cd mousepods\npython3 -m venv .venv && .venv\u002Fbin\u002Fpip install -r requirements.txt\n.venv\u002Fbin\u002Fpython airpods_mouse_controller.py --ui            # opens the app, starts the controller\n.venv\u002Fbin\u002Fpython airpods_mouse_controller.py --install-hotkeys   # GNOME shortcuts (optional)\n```\n\nRequirements: Linux with BlueZ, AirPods paired and connected, write access to `\u002Fdev\u002Fuinput` (granted to the logged-in user by\n`uaccess` on most desktop distributions). No root.\n\n```bash\n.venv\u002Fbin\u002Fpython airpods_mouse_controller.py --diag          # live rates in the terminal, no cursor control\n.venv\u002Fbin\u002Fpython -m unittest discover -s tests               # 159 tests, no hardware needed\n```\n\n### Immutable distros (Bazzite, Fedora Atomic): use a distrobox\n\nOn Bazzite the host Python cannot build `evdev` (no wheel on PyPI, and no `Python.h` on the\nread-only system), and Homebrew's Python has no `socket.AF_BLUETOOTH`. A Fedora distrobox has\nboth. It shares Bluetooth, `\u002Fdev\u002Fuinput` and your home directory with the host.\n\n```bash\ndistrobox create -n mousepods -i registry.fedoraproject.org\u002Ffedora-toolbox:43 -Y\ndistrobox enter mousepods\nsudo dnf install -y python3-devel gcc\nsudo ln -s \u002Fusr\u002Fbin\u002Fdistrobox-host-exec \u002Fusr\u002Flocal\u002Fbin\u002Fbluetoothctl   # use the host's bluetoothctl\ngit clone https:\u002F\u002Fgithub.com\u002Fstarman-tech\u002Fmousepods && cd mousepods\npython3 -m venv .venv && .venv\u002Fbin\u002Fpip install -r requirements.txt\n.venv\u002Fbin\u002Fpython airpods_mouse_controller.py --ui\n```\n\nWithout the `bluetoothctl` link (or `sudo dnf install bluez` inside the box) MousePods cannot list\nthe paired AirPods and says so. Tested on Bazzite with AirPods Pro 2. SteamOS 3.5+ ships distrobox\ntoo, so the same steps should work there in Desktop Mode (untested).\n\n**Proton games (Assetto Corsa tested):** run the Windows build of opentrack inside the game's\nProton prefix with [opentrack-launcher](https:\u002F\u002Fgithub.com\u002Fmarkx86\u002Fopentrack-launcher): set the\ngame's Steam launch option to `$HOME\u002F.local\u002Fbin\u002Fopentrack-launcher %command%` (exactly one\n`%command%`). In opentrack: input *UDP over network* port 4242, output *freetrack 2.0 Enhanced*\nwith *Enable both*. Assetto Corsa follows the head in the cockpit camera.\n\n## Status: what is real, what is not\n\n| | |\n|---|---|\n| ✅ AirPods 3 motion stream (RemoteHID), up to ~210 Hz | verified on hardware |\n| ✅ AirPods Pro 2 motion stream (SensorDataWX), ~100 Hz with the default 10 ms interval | verified on hardware |\n| ✅ Mouse mode (head and bud in hand), app, shortcuts | tried on hardware, still being tuned. 159 automated tests (protocol, engine under random orientations, calibration, replay of real captures) |\n| ⚠️ Pointer mode with corner calibration | tested in simulation only |\n| ⚠️ Glide mode | works stroke by stroke. On real slides: drift of 4 cm over 5 strokes after tuning, on **one** capture. A bud is round and rolls, and its sensors freeze when it lies still: it will never match an optical mouse |\n| ✅ Head tracking for simulators via opentrack | tried in a game: Assetto Corsa under Proton on Bazzite (AirPods Pro 2, opentrack inside the game's prefix) |\n| ⚠️ Virtual joystick for native games | packet format, joystick and angle maths tested; not yet tried in a game |\n| ⚠️ Garmin watch as a mouse (optional module) | first tests on hardware. Accelerometer only, 25 Hz: see below |\n| ❌ Case as a mouse (buds inside) | impossible on AirPods 3: the sensors are powered off in the case |\n| ❓ Apple PnP DeviceID | changed before the first success; probably not needed (the MTU is), not isolated yet |\n| ❓ Other models (AirPods 2, Pro 1, Max) | untested |\n\n## Head tracking for simulators\n\nAirPods 3 and AirPods Pro as a **TrackIR**: the in-game camera follows your head. Page **Simulateurs**\nin the app (or `--opentrack`, `--sim-joystick`):\n\n* **opentrack** output (\"UDP over network\", 127.0.0.1:4242), then opentrack's Wine\u002FProton output for\n  DCS, MSFS, IL-2, Elite Dangerous… (FreeTrack + TrackIR), or its X-Plane \u002F FlightGear outputs;\n* a **virtual joystick** (\"MousePods head tracker\", same axes as opentrack's libevdev output) for native\n  Linux games that bind the camera to axes: Euro Truck Simulator 2, American Truck Simulator, War Thunder…\n\nAngles come from the buds' own orientation quaternion, checked against the gyroscope on a real capture:\npitch and roll do not drift, yaw is recentered with one click. Rotation only (3 DoF).\nStep-by-step guide and what was found: **[docs\u002FSIMS.md](docs\u002FSIMS.md)**.\n\n## Garmin watch as a mouse (optional)\n\nA Garmin watch can drive the cursor too: **tilt your wrist** to move, **double-tap the watch** to click, drop your arm\nto pause. It has its own page in the app (**Garmin**: connect, guided 5-pose calibration with a live tilt dot,\nRecentrer \u002F Recalibrer tout \u002F Pause, speed, dead zone, smoothing, tap force, joystick or pointer mode) and a\nstandalone window.\n\n```bash\n.venv\u002Fbin\u002Fpip install -r requirements-garmin.txt      # optional: garmin-ble (AGPL-3.0) + bleak\nbluetoothctl                                          # once, phone Bluetooth off (one BLE client only)\n  scan le\n  pair XX:XX:XX:XX:XX:XX\n  trust XX:XX:XX:XX:XX:XX\n.venv\u002Fbin\u002Fpython airpods_mouse_controller.py --ui     # then page \"Garmin\", enter the address, \"Connecter\"\n.venv\u002Fbin\u002Fpython -m garmin.garmin_mouse --address XX:XX:XX:XX:XX:XX   # or the standalone window\n```\n\nLimits: the watch streams **only its accelerometer** in real time (24.9 Hz, 3 samples every 120 ms, 12-bit, no\ngyroscope), so the cursor follows the **tilt** of the wrist, not its rotation, with about 0.2 s of delay. Good for\npointing, not for games. What was tried to get more (services 17 SPAM and 18 BMX_RAW, the Garmin Connect app, a\nConnect IQ app) and every measurement: **[docs\u002FGARMIN.md](docs\u002FGARMIN.md)**.\n\nThe Bluetooth link uses [garmin-ble](https:\u002F\u002Fgithub.com\u002Fgwerneckp\u002Fgarmin-ble), which is **AGPL-3.0-only**. It is not\nbundled and no code from it is copied: it is installed separately, and only the Garmin module imports it.\nMousePods stays Apache-2.0; if you redistribute it *together with* garmin-ble, that combination is under the AGPL-3.0.\n\n## Built with Claude\n\nI reverse-engineered this together with **Claude** (Anthropic), used as an AI pair engineer in Claude Code. In one afternoon, Claude:\n- ran the Bluetooth probes and the ~300 blind attempts that failed;\n- sent background agents through LibrePods, the Wireshark dissector, the OpenHuilian clone firmware (static disassembly) and the iOS `RemoteHID.framework` pseudocode;\n- found the MTU and RemoteHID keys, wrote the controller, the app and the tests;\n- kept the [journal](docs\u002FJOURNAL.fr.md) of every attempt.\n\nI held the AirPods, made the calls and checked every result on real hardware. The method, failures included, is in the journal.\n\n## Credits\n\nThis builds on public work: [LibrePods](https:\u002F\u002Fgithub.com\u002Flibrepods-org\u002Flibrepods) (AACP and the SensorDataWX start packets),\n[pabloaul\u002Fapple-wireshark](https:\u002F\u002Fgithub.com\u002Fpabloaul\u002Fapple-wireshark) (RTBuddy dissector and `rtbuddy.proto`),\n[Gheop\u002Fmutix](https:\u002F\u002Fgithub.com\u002FGheop\u002Fmutix) and LibrePods PR #887 (layout of the 58-byte block),\n[arctumn\u002Fntpods](https:\u002F\u002Fgithub.com\u002Farctumn\u002Fntpods) (MTU gating, on AirPods Pro 3 heart rate),\n[spacedouut\u002FOpenHuilian](https:\u002F\u002Fgithub.com\u002Fspacedouut\u002FOpenHuilian) (clone firmware) and the public iOS 26.1 restore dump\nby EthanArbuckle. Garmin module: the [Gadgetbridge](https:\u002F\u002Fcodeberg.org\u002FFreeyourgadget\u002FGadgetbridge) protocol notes served as\ndocumentation and [garmin-ble](https:\u002F\u002Fgithub.com\u002Fgwerneckp\u002Fgarmin-ble) is an optional dependency. No code was copied from these projects.\n\n## License and attribution\n\n| What | License | What it requires |\n|---|---|---|\n| Source code | [Apache-2.0](LICENSE) + [NOTICE](NOTICE) | Keep the copyright and the NOTICE text in any redistribution or derivative work (in its NOTICE file, docs or \"about\" screen), and mark modified files |\n| Optional Garmin dependency [garmin-ble](https:\u002F\u002Fgithub.com\u002Fgwerneckp\u002Fgarmin-ble) (not included) | AGPL-3.0-only | Only if you use the Garmin module. Distributing MousePods bundled with it makes the combination AGPL-3.0: see [docs\u002FGARMIN.md](docs\u002FGARMIN.md) |\n| Findings, documentation, captures (`docs\u002F`, `captures\u002F`) | [CC BY 4.0](docs\u002FLICENSE-CC-BY-4.0.txt) | **Credit the author**, link to this repository and say if you changed anything, in any reuse: article, video, talk, other project, AI dataset |\n\n**How to credit:**\n\n> MousePods by Matteo Gaudioso (starman-tech): https:\u002F\u002Fgithub.com\u002Fstarman-tech\u002Fmousepods\n\n**Please tell me when you use it.** It's not a legal requirement, just a request: open an issue, or mention\n[@starman-tech](https:\u002F\u002Fgithub.com\u002Fstarman-tech). I'd love to see what you build, and I'll link to it.\nFor academic work, use [CITATION.cff](CITATION.cff) (GitHub's \"Cite this repository\" button).\n\n© 2026 Matteo Gaudioso. Not affiliated with Apple. AirPods is a trademark of Apple Inc.\n","MousePods 是一个在 Linux 系统上利用 AirPods 3 或 AirPods Pro 的内置 IMU 实现免 Apple 设备的头部追踪鼠标功能的开源工具。它通过逆向解析苹果专有的 RemoteHID（基于 AACP 的 HID 协议）获取加速度计与陀螺仪数据，结合 uinput 驱动将头部运动映射为光标移动或 6DoF 姿态输入；支持 Wayland\u002FX11、Flatpak 桌面应用、Steam 游戏 Proton 集成及多显示器校准。适用于无障碍辅助操作、模拟驾驶\u002F飞行游戏中的头部视角控制，以及无需额外硬件的轻量级头控交互场景。",2,"2026-11-24 04:36:02","CREATED_QUERY"]