BTLE (Bluetooth Low Energy) and CoreBluetooth
-
Upload
zach-dennis -
Category
Technology
-
view
6.626 -
download
5
description
Transcript of BTLE (Bluetooth Low Energy) and CoreBluetooth
![Page 2: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/2.jpg)
Bluetooth LE
![Page 3: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/3.jpg)
What is BTLE?
![Page 4: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/4.jpg)
A short range, ultra-low power consuming
wireless technology.
![Page 5: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/5.jpg)
Shares the “Bluetooth” name, but has different design goals in mind.
![Page 6: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/6.jpg)
Power ConsumptionYears, not hours or
days.
![Page 7: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/7.jpg)
Short range~ 50m
![Page 8: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/8.jpg)
Packet-basedShort bursts of data.
![Page 9: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/9.jpg)
Intervals
Ad Ad AdData Data
![Page 10: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/10.jpg)
Multiple channels
Ad Ad AdData Data
Ad Ad AdData Data
Ad Ad AdData Data#1
#2
#3
![Page 11: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/11.jpg)
Device A is looking.
Ad AdData Data
Ad AdData Data
Scan
Ad
Ad
Scan Data
Device B is advertising.
![Page 12: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/12.jpg)
Frequency hopping
![Page 13: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/13.jpg)
Connection-lessDevices do not need to maintain
connections.
![Page 14: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/14.jpg)
Pairinge.g. iOS - happens when Insufficient
Authentication error code is sent from the peripheral.
![Page 15: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/15.jpg)
SecurityDevices pair, keys are distributed, and the
connection is encrypted. !
Encryption is AES-128.
![Page 16: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/16.jpg)
![Page 17: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/17.jpg)
Why BTLE?
![Page 18: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/18.jpg)
*Borrowed from 2012 WWDC CoreBluetooth Talk
![Page 19: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/19.jpg)
1 billion+ devices
![Page 20: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/20.jpg)
*Borrowed from 2013 Apple WWDC talk
![Page 21: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/21.jpg)
How BTLE Works
![Page 22: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/22.jpg)
The Stack
![Page 23: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/23.jpg)
Key Terms• Central
• Peripheral
• Service
• Characteristic
• Descriptor
![Page 24: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/24.jpg)
Central Peripheral(has data)(wants data)
![Page 25: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/25.jpg)
Central Peripheraladvertising
![Page 26: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/26.jpg)
Central Peripheraladvertising
scan
![Page 27: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/27.jpg)
Central Peripheraladvertising
advertising
scan
![Page 28: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/28.jpg)
Central Peripheraladvertising
scan advertising
discover services Heart Monitor
![Page 29: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/29.jpg)
Central Peripheraladvertising
scan advertising
discover services
discover characteristics
Heart Monitor
BPM
![Page 30: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/30.jpg)
Central Peripheraladvertising
scan advertising
discover services
discover characteristics
Heart Monitor
BPM
read value 95
![Page 31: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/31.jpg)
Central Peripheraladvertising
scan advertising
discover services
discover characteristics
Heart Monitor
BPM
read value 95
observe value BPM 95
![Page 32: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/32.jpg)
Central Peripheraladvertising
scan advertising
discover services
discover characteristics
Heart Monitor
BPM
read value 95
observe value BPM 95BPM 95BPM 98value changed
![Page 33: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/33.jpg)
Service
A service is a human-readable specification of a set of characteristics and their associated behavior.
![Page 34: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/34.jpg)
Two kinds of services
There are primary services and secondary services.
![Page 35: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/35.jpg)
Nested services
Services can contain other services.
![Page 36: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/36.jpg)
Characteristic
A characteristic is a bit of data that has a known format labeled with a UUID.
They are intended for computer-readable format as opposed to human-readable text.
![Page 37: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/37.jpg)
Profiles
A profile is a specification that describe two or more devices, with one or more services on each device, how they discover each other, connect, and otherwise interact.
Profiles define roles for devices to play.
![Page 38: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/38.jpg)
Heart Rate ProfileCollector Heart Rate Sensor
Heart Rate Service
Device Information Service
![Page 39: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/39.jpg)
Heart Rate ProfileCollector Heart Rate Sensor
Heart Rate Service
Device Information Service
GATT CLIENT GATT SERVER
![Page 40: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/40.jpg)
Profiles & Services
Profiles contain services.
Services can be contained by multiple profiles.
![Page 41: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/41.jpg)
Peripheral
Characteristic
Characteristic
Service
Characteristic
Anatomy of a Peripheral
Descriptor
Service
![Page 42: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/42.jpg)
Apple’s Approach to BTLE
![Page 43: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/43.jpg)
Simple
Powerful
![Page 44: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/44.jpg)
Technology Stack
![Page 45: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/45.jpg)
*Borrowed from 2012 WWDC CoreBluetooth Talk
![Page 46: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/46.jpg)
Supported Profiles
• Generic Attribute Profile Service • Generic Access Profile Service • Bluetooth Low Energy HID Service • Battery Service • Time Service • Apple Notification Center Service
![Page 47: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/47.jpg)
CoreBluetooth
![Page 48: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/48.jpg)
Object Model
![Page 49: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/49.jpg)
CBCharacteristic
CBService
CBCentral
CBMutableCharacteristic
CBMutableService
Main Objects
Data Objects
Helper ObjectsCBUUID CBATTRequest
CBCentralManagerDelegate CBPeripheralManagerDelegate
CBCentralManager CBPeripheralManager
CBPeripheralDelegate
CBPeripheral
![Page 50: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/50.jpg)
Being a Central
![Page 51: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/51.jpg)
Central Peripheral
![Page 52: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/52.jpg)
CBCentralManager
Scanning!– scanForPeripheralsWithServices:options !Stop scanning!– stopScan !Connecting to peripherals!– connectPeripheral:options – cancelPeripheralConnection: !Retrieving known peripherals!– retrieveConnectedPeripheralsWithServices: – retrievePeripheralsWithIdentifiers:
![Page 53: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/53.jpg)
CBCentralManagerDelegate
Monitoring Connections with Peripherals!– centralManager:didConnectPeripheral: – centralManager:didDisconnectPeripheral:error: – centralManager:didFailToConnectPeripheral:error: !Discovering and Retrieving Peripherals!– centralManager:didDiscoverPeripheral:advertisementData:RSSI: – centralManager:didRetrieveConnectedPeripherals: – centralManager:didRetrievePeripherals: !Monitoring Changes to the Central Manager’s State!– centralManagerDidUpdateState: – centralManager:willRestoreState:
![Page 54: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/54.jpg)
CBPeripheralDelegateDiscovering Services!– peripheral:didDiscoverServices: – peripheral:didDiscoverIncludedServicesForService:error: !Discovering Characteristics and Characteristic Descriptors!– peripheral:didDiscoverCharacteristicsForService:error: – peripheral:didDiscoverDescriptorsForCharacteristic:error: !Retrieving Characteristic and Characteristic Descriptor Values!– peripheral:didUpdateValueForCharacteristic:error: – peripheral:didUpdateValueForDescriptor:error: !Writing Characteristic and Characteristic Descriptor Values!– peripheral:didWriteValueForCharacteristic:error: – peripheral:didWriteValueForDescriptor:error: !Managing Notifications for a Characteristic’s Value!– peripheral:didUpdateNotificationStateForCharacteristic:error: !Retrieving a Peripheral’s Received Signal Strength Indicator (RSSI) Data!– peripheralDidUpdateRSSI:error: !Monitoring Changes to a Peripheral’s Name or Services!– peripheralDidUpdateName: – peripheral:didModifyServices:
![Page 55: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/55.jpg)
> code <
![Page 56: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/56.jpg)
Being a Peripheral
![Page 57: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/57.jpg)
Central Peripheral
![Page 58: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/58.jpg)
CBPeripheralManager
Services!– addService: – removeService: – removeAllServices: !Advertising!– startAdvertising: – stopAdvertising – isAdvertising !Notifying observing devices of updates!– updateValue:forCharacteristic:onSubscribedCentrals: !Responding to Read/Write Requests!– respondToRequest:withResult
![Page 59: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/59.jpg)
CBPeripheralManagerDelegateMonitoring Changes to the Peripheral Manager’s State!– peripheralManagerDidUpdateState: – peripheralManager:willRestoreState: !Adding Services!– peripheralManager:didAddService:error: !Advertising Peripheral Data!– peripheralManagerDidStartAdvertising:error: !Monitoring Subscriptions to Characteristic Values!– peripheralManager:central:didSubscribeToCharacteristic: – peripheralManager:central:didUnsubscribeFromCharacteristic: – peripheralManagerIsReadyToUpdateSubscribers: !Receiving Read and Write Requests!– peripheralManager:didReceiveReadRequest: – peripheralManager:didReceiveWriteRequests:
![Page 60: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/60.jpg)
CBMutableServiceInitializing a Mutable Service!– initWithType:primary: !Managing a Mutable Service!– UUID – isPrimary – characteristics – includedServices
Initializing a Mutable Characteristic!– initWithType:properties:value:permissions: !Managing a Mutable Characteristic! UUID value descriptors properties permissions subscribedCentrals
CBMutableCharacteristic
![Page 61: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/61.jpg)
> code <
![Page 62: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/62.jpg)
Foreground vs. Background
![Page 63: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/63.jpg)
Two background modes.
![Page 64: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/64.jpg)
bluetooth-central“Uses Bluetooth LE accessories” in Xcode
![Page 65: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/65.jpg)
bluetooth-peripheral“Acts as Bluetooth LE accessory” in Xcode
![Page 66: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/66.jpg)
Specify background modes in Info.plist.
![Page 67: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/67.jpg)
Nuances of backgrounding
![Page 68: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/68.jpg)
Central Scanning
• Scanning (as a Central) acts differently in the background.
• Scan options are ignored. Multiple discoveries of a peripheral are coalesced into one.
• The scan interval may increase and your app may take longer to discover a peripheral.
![Page 69: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/69.jpg)
Peripheral Advertising• Advertising in the background differs from
foreground mode:
• The CBAdvertisementDataLocalNameKey is not advertised.
• The frequency at which your app advertises may decrease.
• Service UUIDs may not be advertised. Apple does best effort.
![Page 70: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/70.jpg)
Peripheral Events
• iOS will wake up your app to receive events: read, write, and subscribe events.
![Page 71: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/71.jpg)
Caching
• Services, characteristics and characteristic descriptors are cached
• Characteristic value is kind of cached. When discovered the last read value will be provided, but it’s put to you to use it (static values) or read the value (dynamic values) from the peripheral.
![Page 72: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/72.jpg)
State Preservation and Restoration
• Optional feature.
• Why? if your app is background it can be terminated the OS
• iOS will store the state of the application and act on behalf of it as a proxy. When it receives an event your app is waiting for it will start the app back up in the background to allow it to process it
• Single method for you to implement to restore the state of your app.
![Page 73: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/73.jpg)
iBeacons
![Page 74: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/74.jpg)
![Page 75: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/75.jpg)
A part of CoreLocation
![Page 76: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/76.jpg)
Just a data format in the advertising packets.
!
Apple to release actual profile on ___________.
![Page 77: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/77.jpg)
Tips
![Page 78: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/78.jpg)
CoreBluetooth lives in IOBluetooth for Mac
apps.
![Page 79: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/79.jpg)
No more simulator support
as of iOS7
![Page 80: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/80.jpg)
Keep references to CBPeripheral and CBCentrals
if you plan on using them.
![Page 81: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/81.jpg)
YOSO!YOCO!
DSWYDNT
![Page 82: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/82.jpg)
Done with peripheral, disconnect.
![Page 83: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/83.jpg)
CBPeripheral and CBCentral objects can be
dictionary keys.
![Page 84: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/84.jpg)
If you’re a peripheral support characteristic
notifications.
![Page 85: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/85.jpg)
Require paired connections to acquire sensitive information
![Page 86: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/86.jpg)
Finding peripherals the system already knows about
– retrieveConnectedPeripheralsWithServices: – retrievePeripheralsWithIdentifiers:
CentralManager
![Page 87: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/87.jpg)
MTU Exchange Requests
*Borrowed from 2013 Apple WWDC talk
![Page 88: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/88.jpg)
• Allows more data to be sent in one go
• Less packet overhead
• up to 20% increase in throughput
• Free.
MTU Exchange Requests
![Page 89: BTLE (Bluetooth Low Energy) and CoreBluetooth](https://reader033.fdocuments.in/reader033/viewer/2022042503/54b1e03f4a79591a3c8b462e/html5/thumbnails/89.jpg)
App store recommendations from Apple
• include the device with your submission
• be explicit about services the device provides
• provide instructions for how to use the device/app
• or don’t and cross your fingers