Bluetooth Device Control Background - keefo/NeewerLite GitHub Wiki

Bluetooth Device Control Background

How Do Apps Control Bluetooth Devices?

Most smart lights, speakers, and other gadgets use Bluetooth Low Energy (BLE) to communicate with your phone or computer.
BLE is designed for simple, fast, and energy-efficient control—perfect for things like turning a light on or changing its color.

When you use an app to control a device, the app sends commands over Bluetooth.
These commands are usually sent as small packets of data, which the device understands and reacts to.


What Is an ATT Send Packet?

ATT stands for Attribute Protocol, which is a core part of BLE.
It’s the way your app reads and writes data to a device’s “attributes” (like settings or controls).

  • ATT Send means the app is sending a packet to the device.
  • Each packet contains a command or data for the device to process.
  • The packet is sent to a specific “handle” (like an address for a feature on the device).

Example:
When you tap “Power On” in the app, it might send an ATT packet to the device’s power control handle, telling it to turn on.


How Are Bluetooth Devices Commonly Controlled?

  1. Connect: The app connects to the device over BLE.
  2. Discover Services: The app finds out what features the device supports (like power, color, brightness).
  3. Send Commands: The app writes data to specific handles using ATT packets.
  4. Device Reacts: The device receives the packet and changes its state (turns on, changes color, etc.).

Most commands are sent as “Write Command” packets—these are ATT Send packets that tell the device what to do.


Why Is This Important for Reverse Engineering?

When you log Bluetooth packets (like with PacketLogger), you see all the ATT Send packets going from your app to the device.
By studying these, you can figure out:

  • What commands the app sends for each action.
  • How the data is structured.
  • Which handles control which features.

This helps you build your own app or add support for new devices!


Summary:

  • ATT Send packets are the main way apps control Bluetooth devices.
  • They carry commands and data to specific features on the device.
  • Understanding these packets lets you customize or extend device control.