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

Bluetooth LE, Core Bluetooth, and a Glimpse Into Your Near Future

Bluetooth LE, Core Bluetooth, and a Glimpse Into Your Near Future

Bluetooth LE is Bluetooth's low power, low latency companion with tons of potential, and it's built into your phone and laptop. Bluetooth LE is cheap, accessible, hackable, and powerful. I'll discuss the current state of Bluetooth LE, why it's awesome, and introduce Core Bluetooth on iOS. Learn how to use it to connect to Bluetooth LE accessories and iOS devices. We'll experiment with dev kits and code and discuss gotchas/limitations of the framework.

Sam Kirchmeier

March 21, 2013
Tweet

More Decks by Sam Kirchmeier

Other Decks in Technology

Transcript

  1. Bluetooth LE, Core Bluetooth, and a Glimpse Into Your Near

    Future Sam Kirchmeier @skirchmeier MinneBar 2013 Wednesday, April 10, 13
  2. Wednesday, April 10, 13

  3. Plan Introduce Bluetooth Low Energy Convince you it’s awesome Do

    cool demos Wednesday, April 10, 13
  4. Wednesday, April 10, 13

  5. Classic Low Energy Wednesday, April 10, 13

  6. ssic Low Energy Wednesday, April 10, 13

  7. Bluetooth Low Energy Designed to maximize battery life New architecture

    New hardware New class of peripherals Small bits of data in short bursts Wednesday, April 10, 13
  8. Low Energy Wednesday, April 10, 13

  9. Adapted from in 2001 Wednesday, April 10, 13

  10. 4.0 in 2010 Adapted from in 2001 Wednesday, April 10,

    13
  11. 4.0 in 2010 iPhone 4S in 2011 Adapted from in

    2001 Wednesday, April 10, 13
  12. 4.0 in 2010 iPhone 4S in 2011 Awesome Adapted from

    in 2001 Wednesday, April 10, 13
  13. Wednesday, April 10, 13

  14. Wednesday, April 10, 13

  15. LE LE Wednesday, April 10, 13

  16. LE LE 1 Ubiquitous Wednesday, April 10, 13

  17. LE LE 2 Inexpensive 1 Ubiquitous Wednesday, April 10, 13

  18. LE LE 2 Inexpensive 3 Hackable 1 Ubiquitous Wednesday, April

    10, 13
  19. LE LE 2 Inexpensive 3 Hackable 1 Ubiquitous Wednesday, April

    10, 13
  20. LE LE 2 Inexpensive 3 Hackable 1 Ubiquitous Wednesday, April

    10, 13
  21. Bluetooth 4.0 1 Ubiquitous Wednesday, April 10, 13

  22. 2016 100% 2013 67% Bluetooth Low Energy Capable Cell Phones

    1 Ubiquitous Wednesday, April 10, 13
  23. Yes No iOS Android Windows 8 Windows RT Windows Phone

    Blackberry 10 x x x x x 1 Ubiquitous Wednesday, April 10, 13
  24. Yes No It’s Complicated iOS Android Windows 8 Windows RT

    Windows Phone Blackberry 10 x x x x x x 1 Ubiquitous Wednesday, April 10, 13
  25. 2 Inexpensive 3 Hackable 1 Ubiquitous Wednesday, April 10, 13

  26. Made for iPhone (MFi) Not Required 2 Inexpensive Wednesday, April

    10, 13
  27. Simpler So!ware Cheaper Hardware 2 Inexpensive Wednesday, April 10, 13

  28. 2 Inexpensive 3 Hackable 1 Ubiquitous Wednesday, April 10, 13

  29. Core Bluetooth 3 Hackable Wednesday, April 10, 13

  30. Core Bluetooth 3 Hackable Few limitations Wednesday, April 10, 13

  31. Core Bluetooth 3 Hackable Few limitations Even in the background

    Wednesday, April 10, 13
  32. Core Bluetooth 3 Hackable Few limitations Even in the background

    iOS gets out of the way Wednesday, April 10, 13
  33. Core Bluetooth 3 Hackable Few limitations Even in the background

    iOS gets out of the way No MFi Wednesday, April 10, 13
  34. Hardware 3 Hackable Wednesday, April 10, 13

  35. 3 Hackable Texas Instruments CC2540 Mini Development Kit $100 Wednesday,

    April 10, 13
  36. 3 Hackable Bluegiga BLE112 Evaluation Board $375 Wednesday, April 10,

    13
  37. 3 Hackable RedBearLab BLE-Shield for Arduino $30 Wednesday, April 10,

    13
  38. 3 Hackable Cirago BTA8000 $15 Wednesday, April 10, 13

  39. LE LE 2 Inexpensive 3 Hackable 1 Ubiquitous Wednesday, April

    10, 13
  40. Products Wednesday, April 10, 13

  41. Products Bluetooth Smart & Bluetooth Smart Ready Wednesday, April 10,

    13
  42. FitBit Wednesday, April 10, 13

  43. hipKey Wednesday, April 10, 13

  44. Stick-N-Find Wednesday, April 10, 13

  45. COOKOO Wednesday, April 10, 13

  46. What’s the catch? Wednesday, April 10, 13

  47. It’s slow. really Wednesday, April 10, 13

  48. It’s slow. really Wednesday, April 10, 13

  49. 0 37,500 75,000 112,500 150,000 LE Classic Wi-Fi Data Rate

    (kbps) Wednesday, April 10, 13
  50. 0 37,500 75,000 112,500 150,000 LE Classic Wi-Fi Data Rate

    (kbps) Carrier Pigeon Wednesday, April 10, 13
  51. Data Rate (kbps) Bluetooth LE Bluetooth Classic 50 1,200 Wednesday,

    April 10, 13
  52. Data Rate (kbps) Wake Up (ms) Bluetooth LE Bluetooth Classic

    50 2–6 1,200 1,000–6,000 Wednesday, April 10, 13
  53. Data Rate (kbps) Wake Up (ms) Range (!) Bluetooth LE

    Bluetooth Classic 50 2–6 160 1,200 1,000–6,000 300 Wednesday, April 10, 13
  54. Demos Wednesday, April 10, 13

  55. Demos 1. Scanning & Connecting 2. Discover Services & Read

    Data 3. Update a Remote Display Wednesday, April 10, 13
  56. Core Bluetooth Wednesday, April 10, 13

  57. Central Peripheral Wednesday, April 10, 13

  58. Scan Central Peripheral Hello? Wednesday, April 10, 13

  59. Scan Advertise Central Peripheral Hello! Hello? Wednesday, April 10, 13

  60. Scan Advertise Central Peripheral Hello! Hello? Wednesday, April 10, 13

  61. CBCentralManager Wednesday, April 10, 13

  62. CBCentralManager CBCentralManagerDelegate Wednesday, April 10, 13

  63. CBCentralManager CBCentralManagerDelegate central ... scanForPeripheralsWithServices:options: Wednesday, April 10, 13

  64. CBCentralManager CBCentralManagerDelegate didDiscoverPeripheral:advertisementData:RSSI: delegate central ... scanForPeripheralsWithServices:options: delegate didDiscoverPeripheral:advertisementData:RSSI: Wednesday,

    April 10, 13
  65. CBCentralManager CBCentralManagerDelegate Wednesday, April 10, 13

  66. didDiscoverPeripheral:advertisementData:RSSI: delegate CBCentralManager CBCentralManagerDelegate Wednesday, April 10, 13

  67. didDiscoverPeripheral:advertisementData:RSSI: delegate didConnectPeripheral: delegate central connectPeripheral:options: CBCentralManager CBCentralManagerDelegate Wednesday, April

    10, 13
  68. Your app can be backgrounded. Wednesday, April 10, 13

  69. Demo 1. Scanning & Connecting Wednesday, April 10, 13

  70. 1 Scanning & Connecting Wednesday, April 10, 13

  71. Demo App Arduino 1 Scanning & Connecting Wednesday, April 10,

    13
  72. Code 1 Scanning & Connecting Wednesday, April 10, 13

  73. Demo 2. Discover Services & Read Data Wednesday, April 10,

    13
  74. Demo App Arduino 2 Discover Services & Read Data Wednesday,

    April 10, 13
  75. Bluetooth Profiles Wednesday, April 10, 13

  76. Profile Wednesday, April 10, 13

  77. Profile Service Wednesday, April 10, 13

  78. Profile Service Wednesday, April 10, 13

  79. Profile Service Characteristic Wednesday, April 10, 13

  80. Profile Service Characteristic Wednesday, April 10, 13

  81. Profile Service Characteristic Descriptor Wednesday, April 10, 13

  82. Profile Service Characteristic Descriptor Profile Thermometer Measurement Location Interval Wednesday,

    April 10, 13
  83. Profile BLE-Shield RX TX Wednesday, April 10, 13

  84. Profile BLE-Shield RX TX New message every 3 seconds Receives

    incoming data Wednesday, April 10, 13
  85. Profile BLE-Shield RX TX f9266fd7-ef07-45d6-8eb6-bd74f13620f9 e788d73b-e793-4d9e-a608-2f2bafc59a00 4585c102-7784-40b4-88e1-3cb5c4fd37a3 New message every

    3 seconds Receives incoming data Wednesday, April 10, 13
  86. CBPeripheral CBPeripheralDelegate Wednesday, April 10, 13

  87. peripheral discoverServices: delegate didDiscoverServices: CBPeripheral CBPeripheralDelegate Wednesday, April 10, 13

  88. peripheral discoverServices: delegate didDiscoverServices: peripheral discoverCharacteristics:forService: delegate didDiscoverCharacteristicsForService:error: CBPeripheral CBPeripheralDelegate

    Wednesday, April 10, 13
  89. CBPeripheral CBPeripheralDelegate peripheral setNotifyValue:forCharacteristic: ... Wednesday, April 10, 13

  90. delegate didUpdateValueForCharacteristic:error: CBPeripheral CBPeripheralDelegate peripheral setNotifyValue:forCharacteristic: ... delegate didUpdateValueForCharacteristic:error: delegate

    didUpdateValueForCharacteristic:error: Wednesday, April 10, 13
  91. Arduino 2 Discover Services & Read Data RX Notify Message

    Wednesday, April 10, 13
  92. Code 2 Discover Services & Read Data Wednesday, April 10,

    13
  93. Demo 3. Update a Remote Display Wednesday, April 10, 13

  94. 3 Update a Remote Display Wednesday, April 10, 13

  95. Arduino 3 Update a Remote Display Update TX Wednesday, April

    10, 13
  96. #blerules 3 Update a Remote Display Wednesday, April 10, 13

  97. Code 3 Update a Remote Display Wednesday, April 10, 13

  98. Recap Introduced Bluetooth Low Energy Convinced you it’s awesome Did

    cool demos Wednesday, April 10, 13
  99. Thanks! #blerules https://github.com/livefront/blerules Wednesday, April 10, 13

  100. Thanks! #blerules https://github.com/livefront/blerules @skirchmeier Wednesday, April 10, 13

  101. References References, source code, and more information can be found

    in the Readme that accompanies these slides at https://github.com/livefront/blerules. Jonathan Cassell, IMS Research — http://www.imsresearch.com/press-release/ Is_the_Google_Platform_Delaying_the_Bluetooth_Smart_Train&cat_id=188&from= Alex West, IMS Research — http://www.imsresearch.com/press-release/ The_Slow_Road_from_Classic_Bluetooth_to_Bluetooth_Smart_in_Consumer_Me dical_Devices&cat_id=165&from= Joakim Linde, Apple — https://developer.apple.com/videos/wwdc/2012/ Various, Wikipedia — http://en.wikipedia.org/wiki/Bluetooth_low_energy Slide 10 Slide 10 Slide 32 Slide 33 Wednesday, April 10, 13