l Internet
l BLE (Bluetooth Low Energy)
l Bluetooth Smartl Bluetooth 4.0 (June 2010)l Bluetooth 4.1 (Dec 2013)l 低成本 (?)l 範圍 : ~ 100ml 省電 : 鈕扣電池可以撐 1 年以上l 速度 : 理論上限 (1Mbit/s), App (270Kbit/s)
Overview
l Broadcast & connectionl Short packetsl Client/Server 架構l Everything has STATEl 非同步傳送資料
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 ??
l GATT Based Profiles
l 2.4G Hzl 40 channelsl 3 advertising channell Fixed rate: 1 Mbit/sl 高斯頻移鍵控 (GFSK)l Frequency Hopping (AFH)
l Bluetooth Device Addressl 48-bit (Public/Random)
l 4 rolesl Advertiser & Scannerl Master & Slave
l 1 format 2 types packetsl Advertising & Data
l Connection (7.5ms~4s)l 27bytes, but ~20 bytes
l Advertising (20ms ~ 10.24s) l 31 bytes data payloadl Active/Passive scanning
l 搭起友誼的橋樑
l 協定多工器l 封包重組與分配l Data payload: 23 bytesl Similar to TCP
l Initiator → Responderl Central → Peripheral (GAP)
l Security Proceduresl Pairingl Bondingl Encryption Re-establishment
l Pairing Algorithmsl Just Worksl Passkey Displayl Out Of Band
l Client->Serverl Request → Responsel Strict Sequencing
l Server Initiated l Indication/Confirmationl Notfiication
l Handle l Typel (UUID)
l Attribute Value l Permissions
l 2B 2/4/16B l 0~512B
l Control layerl Roles
l Broascaster & Observerl Central & Peripheral
l GAP Service(GATT)l Device namel Apprearancel PPCP
l Data Layerl Roles
l Client & Serverl BluetoothBaseUUID
l xxxxxxxx-0000-1000-8000-00805F9B34FB
l Shortened UUID(16 or 32 bit)
l First Releasel JellyBean MR 4.3 (API 18)
l Peripheral Model Android L (Coming Soon)
http://developer.android.com/guide/topics/connectivity/bluetooth-le.html
搭配 : TI SensorTag CC2541
l 兩顆按鈕l 陀螺儀l 加速計l 溫濕感測l 氣壓計l 磁力計l IR 溫度感測器
Coding Steps
1. Use BLE Permissions2. Setup BLE3. Scan LE device4. Connect to GATT Server5. Discovery Services6. Read Data
l Read Characteristic(Attrubutes)l Receiving notification
簡易型簡報器
實際的應用案例
http://shopping.pchome.com.tw/prod/CBAFJ0-A90051821
http://24h.pchome.com.tw/prod/DGBT4W-A80478018
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/