Bluetooth Smart Technology - Meetupfiles.meetup.com/18517946/Introduction to Bluetooth Smart...
Transcript of Bluetooth Smart Technology - Meetupfiles.meetup.com/18517946/Introduction to Bluetooth Smart...
Bluetooth® Smart Technology
Krisztián Kovács | May 26, 2016
2 Silicon Labs Confidential
Silicon Labs:
Global mixed-signal semiconductor company
Founded in 1996; public since 2000 (NASDAQ: SLAB)
~1,200 employees and 12 R&D locations worldwide
Strong track record of innovation and differentiation
Pioneering mixed-signal and RF technologies for the past twenty
years
Fabless model with >6 billion devices shipped and >1,500
patents issued and pending
Introduction
My role:
„Help customers to find their ways within Wireless technologies”
Senior Applications Engineering Director, Wireless product
https://hu.linkedin.com/in/krkovacs
Twitter: @krkovacs_hu
3 Silicon Labs Confidential
Segítünk megismerni a trendi Wireless technológiákat – előadás sorozat
45 perc előadás / 15 perc demó
Minden előadáson kisorsolunk egy develoment Kit-et
Dedikált, magyar nyelvű fórum csatorna:
http://community.silabs.com/Hungary
Megosztani a tapasztalatokat
Kérdésed van, elfelejtettél megkérdezni valamit a meetup-on: mérnökeink válaszolnak!
SZERETNÉL valami másról is hallani? JELEZD a fórumon!
VERSENY:
Oszd meg IoT project ötletedet a magyar fórumon
A legjobb ötletet 3 havonta díjazzuk a következő meetup-on:
A technológiához kapcsolódó development kit-el és IC / modul mintákkal.
Meetup sorozat
4 Silicon Labs Confidential
Április 28: Wireless technológiák - hogyan válasszam ki a megfelelőt?
Demó: egyszerű garázsnyitó 15 perc alatt - lehetséges!
Május 26: BLE technológia rejtelmei - hogyan tudok egy BLE eszközt fejleszteni mobiltelefonhoz
Demó: iBeacon és egy BLE szenzor fejlesztése
Nyáriszünet, ősszel folytatjuk!
Alacsony fogyasztású, embedded WiFi technológia
bemutatása
Demó: hogyan küldjük el a páratartalom és hőmérséklet értéket emailben?
Apple HomeKit: "Siri, turn on the light!"
Demó: hogyan fejlesszünk egy intelligens lámpát HomeKithez
Soron következő témák (1/2)
5 Silicon Labs Confidential
Bluetooth Smart Intro
The Bluetooth Smart Architecture
Radio
Topologies
Device Discovery and Broadcast Data
Connections
Bluetooth Smart Security
Transferring Data - The ATT Protocol
Exposing Data – The GATT Database
Bluetooth Versions
TOPICS
6 Silicon Labs Confidential
1994. Ericsson - Classic Bluetooth (Short distance wireless data exchange)
1998. Bluetooth SIG v1.0 / 1.1 / 1.2 / 2.0 / 2.1 / 3.0 / 4.0 / 4.1 / 4.2 / (5.0) High throughput!
BR(1.2) ~ 700 kbps
EDR – Enhanced Data Rate (2.0) ~ 2.1 Mbps
HS – High Speed (3.0) ~ 24 Mbps
2006. Nokia - Wibree
2010. BT 4.0 Core Spec – Bluetooth Low Energy (BLE) Low current consumption (ave/high) Low bandwidth Not compatible (different design)
Bluetooth Smart Intro
7 Silicon Labs Confidential
BT SIG classifies BT Devices:
BR/EDR = Classic Bluetooth
LE only = BLE = Single Mode LE Device = Bluetooth Smart
Sensors
Low power
Low cost
BR/EDR/LE = Dual Mode Device = Bluetooth Smart Ready
Smart phones, tablets, PCs
Communication with BR/EDR and LE even at the same time
High power consumption
Bluetooth Smart Intro
8 Silicon Labs Confidential
Ultra low power: Ability to run months on coin cell batteries
Lower cost: 2 x lower cost
Reliable and robust – AFH, retransmissions, 24-bit CRCs
Secure – pairing, bonding, privacy, MITM protection and AES-128 encryption
Standardized profiles for key use cases (HR, HID, Glucose, Proximity etc.): Enables profiles to be developed as Apps: fast deployment
Customer specific profiles: no need to wait OS developers
Connectivity to Smart phones, tablets, PCs
Supported by all major platforms - iOS, Android 4.3, Windows 8, OSX and Linux
Bluetooth Smart Intro - Benefits
9 Silicon Labs Confidential
Building blocks:
Application
Host
Upper layers of stack
Controller
Lower layers of stack + radio
Bluetooth Smart Typical Implementations
Application
Host
Controller
Application
Host
Controller
Host
Controller
ApplicationSoC
Dual IC over HCIDual IC with NCP
NCP - Target
NCP - Host
Proprietary Protocol(BGAPI over UART)
HCI over UART/USB
Different use cases:
SoC: low cost sensors / end nodes
Dual IC with NCP: complex system with a host
processor
Dual IC over HCI: smartphones
10 Silicon Labs Confidential
GATT Organization of Attributes into services
ATT Data exchange protocol
SMP Bonding, privacy and encryption
GAP Advertising, device discovery and
connections
L2CAP Data multiplexing, fragmentation and reassembly
HCI Interface between controller and
host.
Link Layer Basic packets, state machine and radio control
Link layer security and privacy
Radio Receives and transmits bits
The Bluetooth Smart Architecture
Blue Gecko Bluetooth Smart radio
Link Layer
API
Application
Attribute Protocol (ATT)
Generic Attribute Profile (GATT)Security Manager
(SM)
Generic Access Profile
(GAP)
L2CAP
11 Silicon Labs Confidential
2.4GHz ISM Band
License free in most countries
Uses Adaptive Frequency Hopping (AFH)
Reliable
Robust
Adapts to interference
Radio 40 channels
3 advertisement channels
37 data channels
2 MHz wide
12 Silicon Labs Confidential
1 Mbps bit rate
Typical throughput <= 100kbps
due to small packets
Changes in 4.2 and 5.0
TX power up to +20 dBm
Was limited by CE and FCC regulations
Addendum 5 (Dec 2016) increases to +20 dBm
Also re-introduces power class designations
Range
0 – 500 meters
Typically 0-50 meters to a smart phone
Radio
Power Class Max Output Power Min Output Power
1 100 mW (+20 dBm) 10 mW (+10 dBm)
1.5 10 mW (+10 dBm)
0.1 mW (-20 dBm)2 2.5 mW (+4 dBm)
3 1 mW (0 dBm)
Core Addendum 5 LE Power Class
13 Silicon Labs Confidential
Advertiser
Only sends out advertisements i.e.
broadcast data
Can allow or disallow connections
Scanner
Only listens for advertisements
Can also connect an advertiser
Slave
Connected to one master (BT 4.0)
Connected to multiple masters (BT 4.1)
Master
Connected to one or multiple slaves
Topologies
14 Silicon Labs Confidential
Device advertisement
Devices advertise themselves
They broadcast advertisement packets on
one, two or three ADV channels
Scanners listen for advertisements to discover devices
Data broadcast
Advertisement can carry up to 31B of data
Typically device name, TX power, supported services
Can also be vendor specific data
Benefits of advertisements
Low power – Radio is active <1ms during
advertisement
Quick – ADV operation takes just 1.3 ms
Flexible - ADV interval ranges from 20ms to 10.2s
Device Discovery & Broadcast Data
15 Silicon Labs Confidential
Connections
Enable reliable data transfer
Connections use ACKs, re-transmits, 24-bit
CRC to ensure correct data delivery
Connections enable the use of encryption
and protection of data confidentiality
Connections
10ms connection interval + ACK allow data to be sent every 20ms.At 20B payload this is about 1000B/sec.
16 Silicon Labs Confidential
Connection interval varies from 7.5ms to 4000ms
Data payload between 20 to 22 bytes (including header)
Connection Properties
Slave devices can use slave latency – enables them to skip N connection
intervals when there is no data to transmit
Connection request
Data
Connection window
Data150us
Connection interval
Master Slave
time
Data Data Data Data Data150us
Connection interval
Connection interval
Connection interval
Connection request Data
Connection window(from 1.25ms to 3998.75 ms)
Data150us Data
Connection interval(7.5ms to 4000ms)
Data150us
Master Slave
time
Data Data150us
Connection interval(7.5ms to 4000ms)
17 Silicon Labs Confidential
Example with acknowledgement:
Connection interval of 20ms
Acknowledged ATT operation : read, write,
indicate
1000ms/(20ms * 2) * 21B = 525B/sec (4200bps)
Throughput
Example without acknowledgement
Connection interval of 20ms
Unacknowledged ATT operation : write no
response, notify
5 packets in a connection interval
1000ms/(20ms) * 21B * 5 = 5250B/sec
(42000bps)
Main factors affecting throughout: Connection interval
The used ATT protocol operation – Acknowledged vs. Unacknowledged
Acknowledged operations must be ACKed, before new one can be sent
One or multiple unacknowledged operations can be made in a single connection interval
Note: below calculation doesn’t take into account some delay / turnaround parameters!
18 Silicon Labs Confidential
The Attribute Protocol is the only data transfer protocol in BLE
Uses Client – Server architecture
Server stores the data
Client requests data from the server
Data is stored in attributes
From 0 up to 64kB
Can be fixed or variable length
Data can be accessed with the following operations
Read - reads data up to 22B
Read long - reads longer than 22B attributes
Write - writes data up to 20B
Write command - Just like write, but no ACK
Indicate - server indicates the data has changed
Notify - server notifies the data has changed
Transfering Data – The ATT Protocol
19 Silicon Labs Confidential
Data is organized and described with the GATT database
Service – Describes a set of data like Health Thermometer
Bluetooth SIG standardized services identified by unique
16-bit UUIDs
Vendor specific services identified by 128-bit UUIDs
Services contain one or more characteristics
Characteristic – Describes data within a service
Describe data like Temperature Measurement
Standardized characteristics identified by unique 16-bit
UUIDs
Vendor specific characteristics identified by 128-bit UUIDs
Characteristic properties
Tell which operations can be used to access the data
(Read, Write, Notify etc.)
Tell which security means must be used to access the data
(bonding, encryption etc.)
Data Organization with the GATT Database
20 Silicon Labs Confidential
Health Thermometer profile
21 Silicon Labs Confidential
The most common threats in wireless communications are: Passive eavesdropping
Man-in-the-Middle (MITM) protection
Privacy
Bluetooth Smart provides three basic security services: Authentication and authorization: Establishing trusted relationships between devices
Encryption and data protection: Protecting data integrity and confidentiality
Privacy and confidentiality: Preventing device tracking
The Bluetooth security model includes five security features: Pairing: the process for creating shared secret keys
Bonding: storing the keys created during pairing so they can be used later
Device authentication: verification of stored keys
Encryption: data confidentiality
Message integrity: protection against data alteration
All security algorithms or mechanisms used in Bluetooth Smart are either FIPS or NIST approved
Note: ecosystem providers don’t use BLE security, but dedicated secure elements Apple – HomeKit, Samsung SmarThings
Bluetooth Smart Security
22 Silicon Labs Confidential
Pairing Is the process of creating trusted relationships between devices
Used to generate and exchange security keys
Used to exchange identity information
Bluetooth Smart uses Secure Simple Pairing (SSP) pairing model Just works For devices without UI. No user interaction required. No MITM protection.
Passkey entry User needs to enter a passkey the remote party displays. Provides MITM protection.
Numeric comparison User needs to confirm passkeys both devices display. Provides MITM protection.
Out-of-band Encryption keys exchanged e.g. using NFC
Bonding Storing of security keys for future use
E.g. authentication of connections or verifying devices identity
Pairing & Bonding
23 Silicon Labs Confidential
Bluetooth v4.2 (highlights)
Security improvements
IPv6 – Enables the use of 6LoWPAN and IPv6 packets over BLE (IPSP)
Bluetooth 5.0 (highlights)
Main target is either longer range or higher data throughput
2Mbps PHY – 2Mbps physical layer for faster data transmission
LE long range – 250kbps and 500kbps PHYs for better sensitivity and longer range connections
Bluetooth MESH capabilities
Simple home automation use cases
Main advantage is the simple installation vs. ZigBee / Thread
Where the Bluetooth Standard is going? Versions
How Silicon Labs can help You?
25 Silicon Labs Confidential
Wireless Gecko SoCs
26 Silicon Labs Confidential
ARM Cortex-M4 MCU
256kB flash & 32kB RAM
Multi-band, multi-protocol radio
Ultra low power
63 uA/MHz (active), 1.4 uA (sleep)
Highly integrated (+20 dBm PA)
Advanced security
Rich peripherals
Multiple package options
Wireless Gecko SoCs
QFN487x7 mm
QFN325x5 mm
WLCSP~3x3 mm
2.4 GHz<1 GHz
27 Silicon Labs Confidential
Wireless Gecko Portfolio
Development ToolsSoCs SDKs and Stacks
Proprietary
Modules
„Not just an SoC, but a complete platform!”
Demo
Feedback?