SlideShare a Scribd company logo
1 of 38
在穿戴式裝置與物聯網正夯的時代
身為App Developer你不能不了解的BLE
Sam Lee (misgod.tw@gmail.com)
lInternet
lBLE (Bluetooth Low Energy)
lBluetooth Smart
lBluetooth 4.0 (June 2010)
lBluetooth 4.1 (Dec 2013)
l低成本 (?)
l範圍: ~ 100m
l省電: 鈕扣電池可以撐1年以上
l速度: 理論上限(1Mbit/s), App (270Kbit/s)
Overview
lBroadcast & connection
lShort packets
lClient/Server 架構
lEverything has STATE
l非同步傳送資料
Device Classic Bluetooth BLE support
Pre-4.0 Bluetooth Yes No
4.x Single-Mode No Yes
4.x Dual-Mode Yes Yes
廣播
連線
如何省電
Protocol ??
Profile ??
lGATT Based Profiles
l2.4G Hz
l40 channels
l3 advertising channel
lFixed rate: 1 Mbit/s
l高斯頻移鍵控(GFSK)
lFrequency Hopping (AFH)
lBluetooth Device Address
l48-bit (Public/Random)
l4 roles
lAdvertiser & Scanner
lMaster & Slave
l1 format 2 types packets
lAdvertising & Data
lConnection (7.5ms~4s)
l 27bytes, but ~20 bytes
lAdvertising (20ms ~ 10.24s)
l31 bytes data payload
lActive/Passive scanning
l搭起友誼的橋樑
l協定多工器
l封包重組與分配
lData payload: 23 bytes
lSimilar to TCP
lInitiator → Responder
lCentral → Peripheral (GAP)
lSecurity Procedures
lPairing
lBonding
lEncryption Re-establishment
lPairing Algorithms
lJust Works
lPasskey Display
lOut Of Band
lClient->Server
lRequest → Response
lStrict Sequencing
lServer Initiated
lIndication/Confirmation
lNotfiication
l Handle lType
l(UUID)
lAttribute Value l
Permissio
ns
l2B 2/4/16B l0~512B
lControl layer
lRoles
lBroascaster & Observer
lCentral & Peripheral
lGAP Service(GATT)
lDevice name
lApprearance
lPPCP
lData Layer
lRoles
lClient & Server
lBluetoothBaseUUID
lxxxxxxxx-0000-1000-8000-
00805F9B34FB
lShortened UUID(16 or 32 bit)
lFirst Release
lJellyBean MR 4.3 (API 18)
lPeripheral Mode
lAndroid L (Coming Soon)
http://developer.android.com/guide/topics/connectivity/bluetooth-
搭配: TI SensorTag CC2541
l 兩顆按鈕
l 陀螺儀
l 加速計
l 溫濕感測
l 氣壓計
l 磁力計
l IR溫度感測器
Coding Steps
1. Use BLE Permissions
2. Setup BLE
3. Scan LE device
4. Connect to GATT Server
5. Discovery Services
6. Read Data
l Read Characteristic(Attrubutes)
l Receiving notification
簡易型簡報器
實際的應用案例
http://shopping.pchome.com.tw/prod/CBAFJ0-
http://24h.pchome.com.tw/prod/DGBT4W-
Oral-B
August Smart Lock
http://www.august.com/
iBeacon
Zuli
https://www.kickstarter.com/projects/zuli/zuli-smartplugs
https://www.youtube.com/watch?v=g8h_i8qv1FY
Mimo Kimono
http://mimobaby.com/

More Related Content

Viewers also liked

QM-065-從管理角度探討
QM-065-從管理角度探討QM-065-從管理角度探討
QM-065-從管理角度探討
handbook
 
2004ASAP從社會福利角度看菸害防制
2004ASAP從社會福利角度看菸害防制 2004ASAP從社會福利角度看菸害防制
2004ASAP從社會福利角度看菸害防制
None
 

Viewers also liked (20)

QM-065-從管理角度探討
QM-065-從管理角度探討QM-065-從管理角度探討
QM-065-從管理角度探討
 
怎麼看電影Day2 筆記整理 230116
怎麼看電影Day2  筆記整理 230116怎麼看電影Day2  筆記整理 230116
怎麼看電影Day2 筆記整理 230116
 
TechShanghai2016 - 从全局角度实现IC、封装和PCB的协同优化
TechShanghai2016 - 从全局角度实现IC、封装和PCB的协同优化TechShanghai2016 - 从全局角度实现IC、封装和PCB的协同优化
TechShanghai2016 - 从全局角度实现IC、封装和PCB的协同优化
 
igdshare 110220: 以傳統程式開發者角度切入 Unity3D
igdshare 110220: 以傳統程式開發者角度切入 Unity3Digdshare 110220: 以傳統程式開發者角度切入 Unity3D
igdshare 110220: 以傳統程式開發者角度切入 Unity3D
 
我的BDD實踐
我的BDD實踐我的BDD實踐
我的BDD實踐
 
2016 05 17_如何自企業經營角度,以最小成本、最大戰力,作出國防兵力的調整
2016 05 17_如何自企業經營角度,以最小成本、最大戰力,作出國防兵力的調整2016 05 17_如何自企業經營角度,以最小成本、最大戰力,作出國防兵力的調整
2016 05 17_如何自企業經營角度,以最小成本、最大戰力,作出國防兵力的調整
 
LWC18 編目館員看RDA的各種角度 報告人:國立臺灣大學圖書館書目服務組李明錦組長
LWC18 編目館員看RDA的各種角度 報告人:國立臺灣大學圖書館書目服務組李明錦組長LWC18 編目館員看RDA的各種角度 報告人:國立臺灣大學圖書館書目服務組李明錦組長
LWC18 編目館員看RDA的各種角度 報告人:國立臺灣大學圖書館書目服務組李明錦組長
 
2004ASAP從社會福利角度看菸害防制
2004ASAP從社會福利角度看菸害防制 2004ASAP從社會福利角度看菸害防制
2004ASAP從社會福利角度看菸害防制
 
淺談測試Part2
淺談測試Part2淺談測試Part2
淺談測試Part2
 
等速圓周運動 速率-加速度-數學方程
等速圓周運動 速率-加速度-數學方程等速圓周運動 速率-加速度-數學方程
等速圓周運動 速率-加速度-數學方程
 
功夫微講堂第四卷
功夫微講堂第四卷功夫微講堂第四卷
功夫微講堂第四卷
 
邏輯性簡報建構法課程簡介 / 商業簡報網-韓明文講師
邏輯性簡報建構法課程簡介 / 商業簡報網-韓明文講師邏輯性簡報建構法課程簡介 / 商業簡報網-韓明文講師
邏輯性簡報建構法課程簡介 / 商業簡報網-韓明文講師
 
從open data角度談網站api應用
從open data角度談網站api應用從open data角度談網站api應用
從open data角度談網站api應用
 
Everything About Bluetooth (淺談藍牙 4.0) - Central 篇
Everything About Bluetooth (淺談藍牙 4.0) - Central 篇Everything About Bluetooth (淺談藍牙 4.0) - Central 篇
Everything About Bluetooth (淺談藍牙 4.0) - Central 篇
 
Epidemiologia cáncer (1)
Epidemiologia cáncer (1)Epidemiologia cáncer (1)
Epidemiologia cáncer (1)
 
Understanding cancer
Understanding cancerUnderstanding cancer
Understanding cancer
 
Introduction to Bluetooth Low Energy
Introduction to Bluetooth Low EnergyIntroduction to Bluetooth Low Energy
Introduction to Bluetooth Low Energy
 
Hormonal treatment of breast cancer
Hormonal treatment of breast cancerHormonal treatment of breast cancer
Hormonal treatment of breast cancer
 
Cervical Cancer Educational Presentation
Cervical Cancer Educational PresentationCervical Cancer Educational Presentation
Cervical Cancer Educational Presentation
 
Pancreas Cancer
Pancreas CancerPancreas Cancer
Pancreas Cancer
 

Similar to 從App developer角度來介紹BLE

Ble boise codecamp
Ble boise codecampBle boise codecamp
Ble boise codecamp
Chip Keyes
 
Bluetooth
BluetoothBluetooth
Bluetooth
shwet28
 
R K 2 Bluetooth Technologies
R K 2  Bluetooth  TechnologiesR K 2  Bluetooth  Technologies
R K 2 Bluetooth Technologies
Saurav Kumar
 
Bluetooth Intro
Bluetooth IntroBluetooth Intro
Bluetooth Intro
amit_monty
 
Bluetooth Technology -- detailed explanation
Bluetooth Technology -- detailed explanation Bluetooth Technology -- detailed explanation
Bluetooth Technology -- detailed explanation
Siva Pradeep Bolisetti
 
Jim seymour, alcatel lucent lte and lte-advanced
Jim seymour, alcatel lucent lte and lte-advancedJim seymour, alcatel lucent lte and lte-advanced
Jim seymour, alcatel lucent lte and lte-advanced
meenumecc
 

Similar to 從App developer角度來介紹BLE (20)

[May/2017] Bluetooth 5.0 Overview & Wi-Fi/BT Coexistence Evaluations
[May/2017] Bluetooth 5.0 Overview & Wi-Fi/BT Coexistence Evaluations[May/2017] Bluetooth 5.0 Overview & Wi-Fi/BT Coexistence Evaluations
[May/2017] Bluetooth 5.0 Overview & Wi-Fi/BT Coexistence Evaluations
 
Bluetooth 17 18
Bluetooth 17 18Bluetooth 17 18
Bluetooth 17 18
 
Bluetooth
BluetoothBluetooth
Bluetooth
 
Bluetooth
BluetoothBluetooth
Bluetooth
 
Ble boise codecamp
Ble boise codecampBle boise codecamp
Ble boise codecamp
 
Bluetooth 4.0 specification
Bluetooth 4.0 specificationBluetooth 4.0 specification
Bluetooth 4.0 specification
 
Bluetooth
BluetoothBluetooth
Bluetooth
 
Bluetooth Reinvented. Smart connectivity in consumer devices: Bluetooth Low ...
Bluetooth Reinvented.  Smart connectivity in consumer devices: Bluetooth Low ...Bluetooth Reinvented.  Smart connectivity in consumer devices: Bluetooth Low ...
Bluetooth Reinvented. Smart connectivity in consumer devices: Bluetooth Low ...
 
R K 2 Bluetooth Technologies
R K 2  Bluetooth  TechnologiesR K 2  Bluetooth  Technologies
R K 2 Bluetooth Technologies
 
Bluetooth
BluetoothBluetooth
Bluetooth
 
MobiNear BlueNFC
MobiNear BlueNFCMobiNear BlueNFC
MobiNear BlueNFC
 
Bluetooth
Bluetooth Bluetooth
Bluetooth
 
Gda ipsoc blr_hic_final
Gda ipsoc blr_hic_finalGda ipsoc blr_hic_final
Gda ipsoc blr_hic_final
 
BLUETOOTH TECHNOLOGY
BLUETOOTH TECHNOLOGYBLUETOOTH TECHNOLOGY
BLUETOOTH TECHNOLOGY
 
Ims Sdp Lte Market
Ims Sdp Lte MarketIms Sdp Lte Market
Ims Sdp Lte Market
 
Bluetooth technology
Bluetooth technologyBluetooth technology
Bluetooth technology
 
Bluetooth Intro
Bluetooth IntroBluetooth Intro
Bluetooth Intro
 
MobiNear BlueNFC Cartes2009
MobiNear BlueNFC Cartes2009MobiNear BlueNFC Cartes2009
MobiNear BlueNFC Cartes2009
 
Bluetooth Technology -- detailed explanation
Bluetooth Technology -- detailed explanation Bluetooth Technology -- detailed explanation
Bluetooth Technology -- detailed explanation
 
Jim seymour, alcatel lucent lte and lte-advanced
Jim seymour, alcatel lucent lte and lte-advancedJim seymour, alcatel lucent lte and lte-advanced
Jim seymour, alcatel lucent lte and lte-advanced
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 

從App developer角度來介紹BLE