BLE Architecture — Layer by Layer

1) Application Layer

Your device logic.

  • Sensors, device behavior, data processing
  • Uses BLE to communicate data Example: breath sensor sends measurement.

2) GATT (Generic Attribute Profile)

Defines how data is organized and exchanged.

  • Services
  • Characteristics
  • Read / Write / Notify / Indicate Example: Heart Rate Service, custom sensor service.

3) ATT (Attribute Protocol)

Protocol underneath GATT.

  • Moves attributes between devices
  • Client/server data model Think: transport for GATT data.

4) GAP (Generic Access Profile)

Defines how devices find and connect.

  • Advertising
  • Scanning
  • Connecting
  • Roles (Central / Peripheral) Controls visibility & connection behavior.

5) L2CAP

Data multiplexing layer.

  • Splits and reassembles packets
  • Handles MTU sizes
  • Supports multiple logical channels Usually hidden by stack.

Controls radio behavior.

  • Advertising packets
  • Connection timing
  • Channel hopping
  • Retransmissions Critical for power & stability.

7) Physical Layer (PHY)

Actual radio transmission.

  • 2.4 GHz band
  • 1M, 2M, or coded PHY
  • Modulation and channels Real RF layer.