Bluetooth Low Energy

for iOS

Philly CocoaHeads - July 9, 2015

Don Coleman - Chariot Solutions

@doncoleman

Lightbulb Service

  • Light Switch
  • Dimmer Setting

Lightbulb Service - FF10

16 bit UUIDs

0000FF10-0000-1000-8000-00805F9B34FB

0000FF11-0000-1000-8000-00805F9B34FB

0000FF12-0000-1000-8000-00805F9B34FB

Lightbulb Service - FF10

Properties

Attributes

Permissions

Descriptors

Advertising

Advertising

  • 5425B44A-024A-4D39-88D2-D9F016199B29
  • Services: [ 0x180A, 0xFF10, 0XFF20, …]
  • Manufacturer Data: <00007465 6d70>
  • Connectable: True
  • TX Power Level: 4
  • RSSI: -80
  • Name: Smart Lightbulb

After Connecting...

  • Get a list of services
  • For each service, get a list of characteristics
  • For each characteristic, get properties
  • Save handle to read or write later
  • Subscribe to be notified on changes

Read Value

Write Value

Write Command

Heart Rate Service - 180d

org.bluetooth.service.heart_rate.xml
org.bluetooth.characteristic.heart_rate_measurement.xml

Notification

Indication

Lightbulb Service - FF10

Core Bluetooth

Central Manager

Central Manager Delegate

Scanning and Discovery

Connecting

Discovered Services

Discovered Characteristics

Read Characteristic

Write Characteristic

Write Without Response

Demo

Thermometer Service - bbb0

Notification

Notification

Callback

iBeacon

  • UUID: ad5d9ece-9331-48c2-b597-2845aac4a8f0
  • Major: 0x01
  • Minor: 0x0A

Core Location

(not Core Bluetooth)

Region

Ranging

Ranging a beacon

  • CLLocationManager
  • CLLocationManagerDelegate
  • CLBeacon
  • CLBeaconRegion

Creating a Beacon

  • CBPeripheralManager
  • CBPeripheralManagerDelegate

Creating Peripherals

Peripheral Manager

Peripheral Manager Delegate

Characteristic & Descriptor

Characteristic & Descriptor

Service

Write Request

Read Request

Demo

Thank You

Don Coleman

@doncoleman

don@chariotsolutions.com

Slides http://don.github.io/slides/

Code http://github.com/don/phillycocoa

 

Creative Commons License
Bluetooth Low Energy by Don Coleman
is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Based on a work at https://github.com/don/.../2015-07-09-phillycocoa.