This is an introduction to Bluetooth Low Energy (BLE). This biggest benefit is that the Bluetooth device take sufficiently less energy compared to classic Bluetooth so it can now be powered by a cheap battery. This is accomplished by doing the following 3 things:
Less time on the air
Less energy when on the air
Completely new architecture
Power consumption is about 6 times less then classic, but the max amount of data transferred is over 20 worse.
Use cases for BLE
Health Care
Sports & Fitness
Security
Home Automation
Home Entertainment
Kids Toys
Pay Systems
Time Syncing Services
Proximity (How close things are, via RSSI)
Key Terms
Dual Mode vs Single Mode
Dual mode can do both Bluetooth Classic and BLE
Single mode can only do BLE
Client & Server
Server has the data
Client is Central
Server is Peripheral
iOS Device can be either central or peripheral
Peripheral can only connect to one Central
Central can connect to many Peripherals
Discovering the Device
Broadcaster (Central) advertises on 40 different frequencies under 3 channels it’s services
Observer (Peripheral) scans for services
An advertising interval is the amount of time between packets and the shorter the time the more battery that is used.
Connecting to the device
A connection request is sent from the Observer to the Broadcaster. The Broadcaster accepts, then data can be transferred between the two
There is analogous connection interval which limits the Peripheral to only sending data at certain times.
Services
Service is a description of the set of data.
A service contains multiple characteristics
Characteristics
Characteristics are specific values related to the service.
A characteristic contains the following:
UUID
value
properties (read, write)
client configuration (notifications)
additional descriptors (you can define)
Core Bluetooth Principles
Simple
Powerful
Build on Bluetooth 4.0 standard
Your App
There nothing in the OS that manages BLE, so your app is responsible for:
Discovery
Connection Management
Data Exchange
Device Management
Where is BLE supported?
iPhone 4S
Mac mini
iPad
MacBook
iOS Simulator
Core Bluetooth Objects
Main Objects
CBCentralCBCentralManagerCBPeripheralCBPeripheralManager
Data Objects
CBService
CBMutableService
CBCharacteristic
CBMutableCharacteristic
Helper Objects
CBUUID
CBATTRequest
iOS Backgrounding Modes
Event-based Peripherals: something has happened, tell the user
Session-based Peripherals: full access to peripherals
Heart Rate Demo
Found here.
