# BudsPro-Headtracking: streaming Galaxy Buds Pro head tracking over Samsung’s serial protocol

> Reimplements the Samsung Galaxy Buds Pro’s proprietary spatial-audio messages in a small Python script so that a PC can stream the earbuds’ head-tracking data in real time. It connects to the earbuds’ GEARMANAGER (or FACTORY) RFCOMM serial service, frames packets with start and end markers and a CRC16-CCITT checksum, enables the sensor stream with attach and two-second keep-alive messages, and decodes the rotation quaternion from the data events. A contributed script converts the quaternion to Euler angles and forwards it over local UDP to a Unity receiver; results are shown only as author-provided sample output.

- Type: Case study
- Targets: Protocol
- Category: Independent reconstruction cases
- Relationship: Independent reconstruction project
- Sources reviewed: 2026-10-20
- Added to the catalog: 2026-11-02
- Original resource: <https://github.com/timschneeb/BudsPro-Headtracking>
- Primary source: <https://github.com/timschneeb/BudsPro-Headtracking/blob/63b321aa0536fd28233eaaf3a05c4f3b3f8201fe/README.md>
- Catalog page: <https://awesomerea.org/resources/budspro-headtracking-case/>
- Record JSON: <https://awesomerea.org/resources/budspro-headtracking-case/record.json>
- Chinese version: [简体中文](https://awesomerea.org/zh/resources/budspro-headtracking-case/index.md)

## Requirements & limits

- The reviewed master commit 63b321a (2024-12-30) merges a contributor change that also accepts the FACTORY service name reported for Galaxy Buds2; the README covers only the Galaxy Buds Pro, and the project has no releases, tests or list of tested earbud firmware. Headtracking.py prints the raw x, y, z, w quaternion (four signed 16-bit values divided by 10,000) or, with -b, frame-timing statistics, and reports gyro-bias and stuck-sensor events only in verbose mode.
- It needs the user’s own paired Galaxy Buds Pro, addressed by its Bluetooth MAC address; no Samsung app or firmware is used at runtime or included in the repository. The repository does not document how the message IDs and framing were derived; code comments point to the author’s separate Galaxy Buds desktop client for the full parser and quaternion conversion.
- Python 3 with PyBluez on Windows or Linux; the README requires PyBluez 0.22 on Windows because 0.23 fails to enumerate Bluetooth devices. buds_to_unity.py also needs NumPy, hardcodes a device address and sends to 127.0.0.1:12562, and getBudsUDP.cs is a Unity MonoBehaviour adapted from a receiver credited to KAIST UVR Lab.
- The README shows sample quaternion output, and benchmark mode reports the average, minimum and maximum time between motion frames, but no captures, tests or recorded benchmark results are published. In the reviewed SpatialSensorManager.py the command payloads are built with Python’s bytes(n), which yields n zero bytes rather than the value n, so the bytes sent may differ from what the constant names suggest.
- LICENSE grants MIT (2021, Tim Schneeberger); the Unity script carries an attribution to its original author but no separate license. Galaxy Buds and its services belong to Samsung.

## Primary sources

1. <https://github.com/timschneeb/BudsPro-Headtracking/blob/63b321aa0536fd28233eaaf3a05c4f3b3f8201fe/README.md>
2. <https://github.com/timschneeb/BudsPro-Headtracking/blob/63b321aa0536fd28233eaaf3a05c4f3b3f8201fe/Headtracking.py>
3. <https://github.com/timschneeb/BudsPro-Headtracking/blob/63b321aa0536fd28233eaaf3a05c4f3b3f8201fe/SpatialSensorManager.py>
4. <https://github.com/timschneeb/BudsPro-Headtracking/blob/63b321aa0536fd28233eaaf3a05c4f3b3f8201fe/BluetoothService.py>
5. <https://github.com/timschneeb/BudsPro-Headtracking/blob/63b321aa0536fd28233eaaf3a05c4f3b3f8201fe/Crc16.py>
6. <https://github.com/timschneeb/BudsPro-Headtracking/blob/63b321aa0536fd28233eaaf3a05c4f3b3f8201fe/buds_to_unity.py>
7. <https://github.com/timschneeb/BudsPro-Headtracking/blob/63b321aa0536fd28233eaaf3a05c4f3b3f8201fe/getBudsUDP.cs>
8. <https://github.com/timschneeb/BudsPro-Headtracking/blob/63b321aa0536fd28233eaaf3a05c4f3b3f8201fe/LICENSE>

## More in Protocols

- [Even G2 protocol: reverse-engineering Even Realities G2 smart-glasses BLE traffic](https://awesomerea.org/resources/even-g2-ble-protocol-case/index.md) · Case study
- [fuji-cam-wifi-tool: reconstructing Fujifilm X-series Wi-Fi remote control](https://awesomerea.org/resources/fuji-cam-wifi-tool-protocol-case/index.md) · Case study
- [Gymnasticon: bridging proprietary exercise-bike data to standard cycling sensors](https://awesomerea.org/resources/gymnasticon-exercise-bike-bridge-case/index.md) · Case study
- [garmin-ble: a Python client for Garmin's GFDI watch protocol](https://awesomerea.org/resources/garmin-ble-gfdi-protocol-case/index.md) · Case study
- [bosectl: reconstructing Bose’s BMAP headphone protocol](https://awesomerea.org/resources/bosectl-bose-bmap-protocol-case/index.md) · Case study
- [lib-osmo-ble: DJI Osmo Pocket 3 Bluetooth LE protocol library](https://awesomerea.org/resources/osmo-pocket-3-ble-protocol-case/index.md) · Case study

## About this entry

The description was reviewed against primary sources.
Original editorial content: MIT. Linked projects, papers and assets retain their own rights and licenses.
