Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Bluetooth Low Energy

Bluetooth Low Energy

A brief introduction on the Bluetooth Low Energy technology and some of its technical aspects.

The code can be found on Github:
https://github.com/natangr/AndroidViper

Natan Grando
https://github.com/natangr
https://linkedin.com/in/natan-grando-36820397/

Cheesecake Labs

July 06, 2017
Tweet

More Decks by Cheesecake Labs

Other Decks in Technology

Transcript

  1. Spec Release Date Classic Speed LE Speed Bluetooth 1.0 and

    1.0B 1994 - 1998 721 kbit/s Bluetooth 1.1 2002 721 kbit/s Bluetooth 1.2 2005 721 kbit/s Bluetooth 2.0 + EDR 2004 2.1 Mbit/s Bluetooth 2.1 + EDR 2007 3 Mbit/s Bluetooth 3.0 + HS 2009 24 Mbit/s Bluetooth 4.0 + LE 2010 25 Mbit/s 1 Mbit/s (800 kbit/s) Bluetooth 4.1 2013 25 Mbit/s 1 Mbit/s (800 kbit/s) Bluetooth 4.2 2014 25 Mbit/s 1 Mbit/s (800 kbit/s) Bluetooth 5.0 2016 50 Mbit/s 2 Mbit/s (1400 kbit/s)
  2. BLE Protocol • Advertisement and Discovery • Server • Client

    • Characteristic • Service • Descriptor • Generic Attribute Profile (GATT) • Notifications and Indications
  3. Server • Broadcast advertising packets; • Receive GATT commands and

    requests; • Return responses. Ex.: a heart rate sensor.
  4. Client • See advertising packets • Request connection • Send

    GATT commands and requests • Accept responses Ex.: a smartphone.
  5. Service A collection of related characteristics, which operate together to

    perform a particular function. Ex.: Smart lock service includes characteristic to see the lock state and characteristic to change the state
  6. Descriptor A descriptor provides additional information about a characteristic. Descriptors

    are optional – each characteristic can have any number of descriptors. Ex.: A temperature value characteristic may have an indication of its units (Celsius or Fahrenheit)
  7. Generic Attribute Profile (GATT) GATT operations: ◦ Discover UUIDs for

    all primary services ◦ Discover all characteristics for a given service ◦ Read descriptors ◦ Read characteristic value ◦ Write characteristic value ◦ More...
  8. Notifications and Indications GATT offers notifications and indications. The client

    may request a notification for a particular characteristic from the server. The server can then send the value to the client whenever it becomes available. This avoids the need for the client to poll the server. Ex.: Notifies when a lock change it’s current state