NETW 1010 IOT Technologies Bluetooth Low Energy BLE

NETW 1010 IOT Technologies: Bluetooth Low Energy (BLE) Dr. Eng. Tallal Elshabrawy Spring 2020

Bluetooth Low Energy (BLE) Battery Lifetime Years BLE RFID Months BLE Dr. Tallal Elshabrawy IEEE 802. 15. 4 Communication Range Days Few Meters Tens-Hundreds of Meters Kiliometers

How much Energy does Traditional Bluetooth Use? Ø Traditional Bluetooth is connection oriented. When a device is connected, a link is maintained, even if there is no data flowing. BLE Ø Sniff modes allow devices to sleep, reducing power consumption to give months of battery life Ø Peak transmit current is typically around 25 m. A Dr. Tallal Elshabrawy Ø Even though it has been independently shown to be lower power than other radio standards, it is still not low enough power for coin cells and energy harvesting applications 3

What is Bluetooth Low Energy? Bluetooth low energy is a NEW, open, short range radio technology Ø Blank sheet of paper design BLE Ø Different to Bluetooth classic (BR/EDR) Ø Optimized for ultra low power Dr. Tallal Elshabrawy Ø Enable coin cell battery use cases Ø< 20 m. A peak current Ø< 5 u. A average current 4

Basic Concepts of Bluetooth 4. 0 Everything is optimized for lowest power consumption Ø Short packets reduce TX peak current BLE Ø Short packets reduce RX time Ø Less RF channels to improve discovery and connection time Dr. Tallal Elshabrawy Ø Simple state machine Ø Single protocol Ø Etc. 5

Bluetooth Low Energy Factsheet BLE Dr. Tallal Elshabrawy Range: ~ 150 meters open field Output Power: ~ 10 m. W (10 d. Bm) Max Current: ~ 15 m. A Latency: 3 ms Topology: Star Connections: > 2 billion Modulation: GFSK @ 2. 4 GHz Robustness: Adaptive Frequency Hopping, 24 bit CRC Security: 128 bit AES CCM Sleep current: ~ 1μA Modes: Broadcast, Connection, Event Data Models, Reads, Writes 6

Bluetooth Low Energy Factsheet (2) BLE Ø Data Throughput Ø For Bluetooth low energy, data throughput is not a meaningful parameter. It does not support streaming. Ø It has a data rate of 1 Mbps, but is not optimized for file transfer. Dr. Tallal Elshabrawy Ø It is designed for sending small chunks of data (exposing state) 7

Designed for Exposing State 23. 2˚C BLE PLAY >> 60. 5 km/h Gate 10 BOARDING 12: 23 pm 3. 2 k. Wh Network Available Ø It’s good at small, discrete data transfers. Dr. Tallal Elshabrawy Ø Data can triggered by local events. Ø Data can be read at any time by a client. 8

BLE Growth Drivers BLE Dr. Tallal Elshabrawy Source : https : //www. bluetooth. com/markets/phone-pc

Classic Bluetooth vs BLE (Key Difference) Classical Bluetooth BLE + Dr. Tallal Elshabrawy Strict Set of Use Cases Freedom for Developers through Low-Level APIs

Bluetooth Versions and Device Types BLE Dr. Tallal Elshabrawy http: //www. compel. ru/wordpress/wp-content/uploads/2013/06/Bluetooth-Low-Energy-BLE. pdf

BLE Dr. Tallal Elshabrawy http: //www. compel. ru/wordpress/wpcontent/uploads/2013/06/Bluetooth-Low-Energy-BLE. pdf

BLE Hardware Configurations Application: User Application Host: Upper Layers of Bluetooth Protocol Stack Controller: Lower Layers of Bluetooth Protocol Stack Host Controller. Interface: Interoperability of Hosts and Controllers BLE Dr. Tallal Elshabrawy

BLE Protocol Stack BLE Dr. Tallal Elshabrawy

BLE Protocol Stack BLE Dr. Tallal Elshabrawy Generic Access Profile (GAP) Ø Defines the generic procedures related to discovery of Bluetooth devices and link management aspects of connecting to Bluetooth devices. Ø Includes common format requirements for parameters accessible on the user interface level. Ø Broadcaster role Ø Observer role Ø Peripheral role: Ø Central role

BLE Profile Roles BLE Dr. Tallal Elshabrawy http: //www. compel. ru/wordpress/wpcontent/uploads/2013/06/Bluetooth-Low-Energy-BLE. pdf

BLE Protocol Stack BLE Dr. Tallal Elshabrawy Generic Attribute Profile (GATT) Ø Defines a generic service framework using the ATT protocol layer. Ø Defines the procedures for Ø Service, Characteristic, and Descriptor discovery Ø Reading, writing, notifying, and indicating Characteristics, as well as, Ø Configuring the broadcast of Characteristics.

BLE Protocol Stack BLE Dr. Tallal Elshabrawy GATT Roles Ø GATT Client: Ø Device that wants data. Initiates commands and requests towards the GATT Server. Ø Receive responses, indications, and notifications sent by the GATT Server. Ø GATT Server: Ø Device that has the data Ø Accepts incoming commands and requests from the GATT Client Ø sends responses, indications, and notifications to a GATT Client.

BLE Protocol Stack BLE Dr. Tallal Elshabrawy Attribute Protocol (ATT) The Attribute Protocol layer Ø A Client/Server architecture above the BLE logical transport channel. Ø Allows a device referred to as the GATT Server to expose a set of attributes and their associated values to a peer device referred to as the GATT Client. Ø These attributes exposed by the GATT Server can be discovered, read, and written by a GATT Client, and can be indicated and notified by the GATT Server.

BLE Protocol Stack BLE Security Manager Protocol (SMP) Ø Defines the procedures and behavior to manage pairing, authentication, and encryption between the devices. Dr. Tallal Elshabrawy

BLE Protocol Stack BLE Logical Link Control Adaptation Protocol (L 2 CAP) Ø Channel multiplexing, which manages three fixed channels. Ø Two channels are dedicated for higher protocol layers like ATT, SMP. Ø One channel is used for the LE -L 2 CAP protocol signaling channel for its own use. Dr. Tallal Elshabrawy

BLE Physical Layer

BLE Modulation GFSK with Modulation rate of 1 Mbps BLE Channel Bandwidth of 2 MHz FSK Modulation Dr. Tallal Elshabrawy

Communication Channels BLE Dr. Tallal Elshabrawy Ø 2. 4 GHz ISM Band Ø 37 channels for connection data Ø Last three channels (37, 38, and 39) used as advertising channels to set up connections and to send broadcast data

Advertising Channels Locations Advertising channels avoid 802. 11 nonoverlapping channels BLE Dr. Tallal Elshabrawy

Frequency Hopping during Connections CONNECTION_REQ specifies: BLE Ø hop. Increment (h. I) Random Number 5 – 16 Dr. Tallal Elshabrawy Ø Channel Map (Ch. M) Ø 40 bits for Used Channels Ø Ch 37, 38, 39 set to 0 Ø The rest 37 bits could take 1 (used) or 0 (not used) Ø At least two used channels in Ch. M

Frequency Hopping during Connections For each connection event: Ø unmapped. Channel u. Ch = (h. I + last. Unmapped. Channel) mod 37 BLE Ø last. Unmapped. Channel is set to 0 for the first connection event Ø Two Possibilities Ø u. Ch belongs to Ch. M Transmission over u. Ch Dr. Tallal Elshabrawy Ø u. Ch does not belong to Ch. M remapping index = u. Ch mod num. Used. Ch (taken from the ascending order of used channels)

BLE Link Layer

Possible Roles for BLE Devices 1. Advertiser BLE 2. Scanner 3. Master Dr. Tallal Elshabrawy 4. Slave

Advertising & Scanning Ø To broadcast connectionless data and/or to discover slaves BLE Ø Up to 31 bytes of advertising data payload Ø Advertising interval ranges from 20 ms to 10. 24 s Dr. Tallal Elshabrawy Ø Scan interval: frequency of scanning Ø Scan window: scanning duration

Advertising & Scanning Example BLE Dr. Tallal Elshabrawy

Passive & Active Scanning Passive: Scanner only listens to advertised packets Active Scanners can issue a scan request for a second packet BLE Dr. Tallal Elshabrawy

Advertising Packet Types Connectable A scanner can initiate a connection upon reception of such an advertising packet Non-Connectable A scanner cannot initiate a connection (packet is intended for broadcast only) Scannable A scanner can issue a scan request upon reception of such an advertising packet Non-scannable A scanner cannot issue a scan request upon reception of such an advertising packet Directed contains only the advertiser’s and the target scanner’s Bluetooth addresses in its payload. No user data is allowed Undirected A packet of this type is not targeted at any particular scanner, and it can contain user data in its payload. Connectability BLE Scannability Dr. Tallal Elshabrawy Directivity

Advertising Packet Types BLE Dr. Tallal Elshabrawy

BLE Connections Some Key variables communicated by master during connection establishment Ø Frequency hop increment Ø Connection Interval (7. 5 ms – 4 s) BLE Dr. Tallal Elshabrawy

BLE communicating Data Packets Ø Data packets have a usable data payload of 27 bytes BLE Ø All packets received are checked against a 24 -bit CRC Ø Retransmissions are requested when the error checking detects a transmission failure. Dr. Tallal Elshabrawy Ø No upper limit for retransmissions;

BLE White Lists Ø Specifies device addresses of interest to the advertiser or the scanner. BLE Ø Any advertising (if a scanner) or connection request (if an advertiser) packets received from devices whose Bluetooth Address is not present in the white list will simply be dropped. Dr. Tallal Elshabrawy

Bluetooth 4. x versus Bluetooth 5. 0 BLE Dr. Tallal Elshabrawy
- Slides: 38