# PeatsControl

By [M Tauseef Haider](https://tauseefhaider.dev)

Project: [PeatsControl](https://tauseefhaider.dev/projects/peatscontrol)

**Technologies:** Kotlin, Bluetooth SPP, Wireshark, Android SDK, Reverse Engineering

## Overview

When the official SoundPEATS app server went down, users were locked out of managing their own earbuds , so I reverse-engineered the Bluetooth protocol and built a fully offline controller. Captured Android HCI snoop logs into Wireshark, decoded the SPP packet structure (magic bytes 0x5A5A, header, command, payload, checksum), and shipped a custom Android app: a strict 6-second MAC-verification handshake to block imposter devices, granular battery telemetry parsed straight from the byte stream, and full hardware control , ANC, gaming mode, and complete touch-sensor remapping.

## The problem

The official app’s server becoming unavailable meant losing access to earbud controls. The hardware still worked; the missing piece was a local way to talk to it.

## The engineering decision

Capture Android HCI logs, inspect them in Wireshark, and decode the Bluetooth SPP protocol into a native Kotlin application.

## Read the signal

Decoded a packet structure comprising 0x5A5A magic bytes, a header, a command, a payload, and a checksum.

## Verify the connection

A six-second MAC-verification handshake checks the connected device before enabling controls.

## Keep control local

Battery telemetry, ANC, gaming mode, and touch-sensor remapping communicate directly with the earbuds.

The visual on the HTML project page is a labeled schematic, illustrating the system described here.

[Discuss this project](https://tauseefhaider.dev/#contact)

[All work](https://tauseefhaider.dev/#project-index)
