Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
1
2
Bluetooth LE:
User experience with iOS
Serhii Suprun
GlobalLogic Lviv iOS TechTalk
16.11.2016
3
Confidential
Radio transmit technology based on 2.4 to 2.485 GHz
Protocols
Initiated in 1989 (1.1 in 2002 and 5.0 in jun...
4
Confidential
Runes
ᚼand ᛒ
Scandinavian runes
5
Confidential
LE == Low Energy ?
Up to 4-5 years of work on one battery
- 1 Mbit/s (radio)
- 270 Kbit/s (application limi...
6
Confidential
Central
Client
Peripheral
Server
iOS
?
Who is who?
7
Confidential
Device to CBPeripheral magic
CoreBluetooth
8
Confidential
Red pill
9
Confidential
Identifiers
Everything is uuid
128 bit (289ed316-defc-48de-8a74-2c9e854e5ab3)
16 bit (0xFE8B)
10
Confidential
Discovery
UUID is everything
func scanForPeripherals(withServices serviceUUIDs: [CBUUID]?, options: [Strin...
11
Confidential
Connect: 1 connect
CBCentralManager
func connect(_ peripheral: CBPeripheral, options: [String : Any]? = ni...
12
Confidential
Connect: 2 services
CBPeripheral
func discoverServices(_ serviceUUIDs: [CBUUID]?)
optional func peripheral...
13
Confidential
Connect: 3 characteristic
CBPeripheral
func discoverCharacteristics(_ characteristicUUIDs: [CBUUID]?, for ...
14
Confidential
Connect: 3 characteristic
CBPeripheral
func discoverCharacteristics(_ characteristicUUIDs: [CBUUID]?, for ...
15
Confidential
Data transfer
CBPeripheral
func readValue(for characteristic: CBCharacteristic)
func writeValue(_ data: Da...
16
Confidential
Transfer speed
Packets
Connection Interval Min ≥ 20 ms
Default MTU: 23 bytes
23*50 = 1150 bytes per second...
17
Confidential
Under the hood
18
Confidential
iphone 6 to iphone 5s
average
bytes time interval (second) bytes/sec
82939 25.147522 3298.098318
82939 24....
19
Confidential
Time between chunks
20
Confidential
Problemaz
- Pairing
- Rename
- Speed?
New in iOS 10?
21
Confidential
Links
https://en.wikipedia.org/wiki/Bluetooth
https://developer.apple.com/videos/play/wwdc2013/703/
https:...
22
Confidential
Questions please
Thanks
23
Thank you
Upcoming SlideShare
Loading in …5
×

Bluetooth LE: User Experience with iOS

908 views

Published on

This presentation is about Bluetooth Low Energy, and the respective user experience with iOS. The slides give fuller understanding of BLE characteristics and contain hints on identifying, discovering and providing connection between devices through Bluetooth LE.

This presentation by Serhii Suprun, GlobalLogic expert, was delivered at GlobalLogic Lviv iOS TechTalk on November 16, 2016.

Learn more: https://www.globallogic.com/ua/gl_news/globallogic-lviv-ios-techtalk-summary

Published in: Software
  • 8 Simple Tips & Tricks To Extend The Life Of Your Car Battery.. ■■■ http://t.cn/AiFAb0DL
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

Bluetooth LE: User Experience with iOS

  1. 1. 1
  2. 2. 2 Bluetooth LE: User experience with iOS Serhii Suprun GlobalLogic Lviv iOS TechTalk 16.11.2016
  3. 3. 3 Confidential Radio transmit technology based on 2.4 to 2.485 GHz Protocols Initiated in 1989 (1.1 in 2002 and 5.0 in june 2016) Dr. Nils Rydbeck CTO at Ericsson Mobile and Dr. Johan Ullman Runes What is Bluetooth ?
  4. 4. 4 Confidential Runes ᚼand ᛒ Scandinavian runes
  5. 5. 5 Confidential LE == Low Energy ? Up to 4-5 years of work on one battery - 1 Mbit/s (radio) - 270 Kbit/s (application limit) - 26 kbit/s (iOS-iOS my tests)
  6. 6. 6 Confidential Central Client Peripheral Server iOS ? Who is who?
  7. 7. 7 Confidential Device to CBPeripheral magic CoreBluetooth
  8. 8. 8 Confidential Red pill
  9. 9. 9 Confidential Identifiers Everything is uuid 128 bit (289ed316-defc-48de-8a74-2c9e854e5ab3) 16 bit (0xFE8B)
  10. 10. 10 Confidential Discovery UUID is everything func scanForPeripherals(withServices serviceUUIDs: [CBUUID]?, options: [String : Any]? = nil) func stopScan() optional func centralManager(_ central: CBCentralManager, didDiscover peripheral: CBPeripheral, advertisementData: [String : Any], rssi RSSI: NSNumber) CBCentralManager CBCentralManagerDelegate
  11. 11. 11 Confidential Connect: 1 connect CBCentralManager func connect(_ peripheral: CBPeripheral, options: [String : Any]? = nil) func cancelPeripheralConnection(_ peripheral: CBPeripheral) optional func centralManager(_ central: CBCentralManager, didConnect peripheral: CBPeripheral) CBCentralManagerDelegate
  12. 12. 12 Confidential Connect: 2 services CBPeripheral func discoverServices(_ serviceUUIDs: [CBUUID]?) optional func peripheral(_ peripheral: CBPeripheral, didDiscoverServices error: Error?) CBPeripheralDelegate
  13. 13. 13 Confidential Connect: 3 characteristic CBPeripheral func discoverCharacteristics(_ characteristicUUIDs: [CBUUID]?, for service: CBService) optional func peripheral(_ peripheral: CBPeripheral, didDiscoverCharacteristicsFor service: CBService, error: Error?) CBPeripheralDelegate
  14. 14. 14 Confidential Connect: 3 characteristic CBPeripheral func discoverCharacteristics(_ characteristicUUIDs: [CBUUID]?, for service: CBService) optional func peripheral(_ peripheral: CBPeripheral, didDiscoverCharacteristicsFor service: CBService, error: Error?) CBPeripheralDelegate
  15. 15. 15 Confidential Data transfer CBPeripheral func readValue(for characteristic: CBCharacteristic) func writeValue(_ data: Data, for characteristic: CBCharacteristic, type: CBCharacteristicWriteType) optional func peripheral(_ peripheral: CBPeripheral, didUpdateValueFor characteristic: CBCharacteristic, error: Error?) CBPeripheralDelegate
  16. 16. 16 Confidential Transfer speed Packets Connection Interval Min ≥ 20 ms Default MTU: 23 bytes 23*50 = 1150 bytes per second 9200 bit per second Max MTU: 512 bytes 512*50 = 25600 bytes per second 204800 bit per seconds (200 kbit/s) 128 kbit - low quality audio stream
  17. 17. 17 Confidential Under the hood
  18. 18. 18 Confidential iphone 6 to iphone 5s average bytes time interval (second) bytes/sec 82939 25.147522 3298.098318 82939 24.842042 3338.654689 82939 24.637974 3366.307636 82939 24.557985 3377.272199 82939 24.590379 3372.823168 bytes/sec kbit/s kbyte/s 82939 25.016174 3315.415059 3344.761845 26.75809476 3.266368989 iphone 5s to iphone 6 87771 27.235893 3222.622442 average 87771 26.602149 3299.395098 87771 26.506242 3311.333232 87771 26.216806 3347.890662 87771 26.595411 3300.231006 bytes/sec kbit/s kbyte/s 87771 26.41587 3322.661718 3300.689026 26.40551221 3.223329127 Experiments
  19. 19. 19 Confidential Time between chunks
  20. 20. 20 Confidential Problemaz - Pairing - Rename - Speed? New in iOS 10?
  21. 21. 21 Confidential Links https://en.wikipedia.org/wiki/Bluetooth https://developer.apple.com/videos/play/wwdc2013/703/ https://developer.apple.com/videos/play/wwdc2012/703/ https://developer.apple.com/videos/play/wwdc2012/705/ https://developer.apple.com/hardwaredrivers/BluetoothDesignGuidelines.pdf https://www.google.com
  22. 22. 22 Confidential Questions please Thanks
  23. 23. 23 Thank you

×