Computer Networks II Advanced Features (T-110.5111) Bluetooth, PhD Assistant Professor DCS Research Group Based on slides previously done by Matti Siekkinen, reused with permission For classroom use only, no unauthorized distribution
Bluetooth Originally as cable replacement technology Follows the main objectives of WPAN technologies low-cost, low-power, short range Main features devices find and connect to each other via inquiry and paging processes pairing for authenticated use of services master and slave devices together form a piconet different application profiles (and stacks) e.g. hands-free, streaming audio and video secure data transfer
Piconets and scatternets A master and up to 7 active slaves form a piconet up to 255 parked nodes in addition Two piconets can be connected to form a scatternet
Bluetooth flavors Version 2 + EDR a.k.a. Classic Enhanced Data Rate (EDR) adds 2 and 3 Mbps rates basic rate is still 1 Mbps Version 3 + HS adds alternate MAC + PHY (Wi-Fi) to provide higher speed data channels Version 4 adds Bluetooth low energy targets embedded low-power devices runs up to two years on coin cell battery
Protocol stack
Layers Radio layer channel access and modulation Link control (or baseband) framing and management of time slots Link manager establishment of logical channels between devices Logical link control and adaptation protocol (L2CAP) framing of variable-length messages and reliability Application profiles span almost the whole stack
Radio layer License-free ISM band at 2.402 2.480 GHz 79 channels 1 MHz wide Channel access Adaptive Frequency-Hopping (AFH) spread spectrum up to 1600 hops/s all nodes of piconet hop synchronously master dictates timing and decides the pseudorandom hop sequence dynamically exclude channels with interference channel map update Three modulations 1-bit symbol per μs for 1Mbps rate 2/3-bit symbol per μs (EDR) for 2/3 Mbps rates (respectively)
Other layers Link control and timeslot management time division multiplexing with 625μs slots master transmission at each even slots and slaves at each odd slot Link manager and link establishment secure simple pairing Synchronous Connection Oriented (SCO) link master and slave set up a periodic schedule real time data (e.g., phone calls) Asynchronous ConnectionLess (ACL) link master polls, slave responds packet data, best effort L2CAP gets packets and outputs frames for the link manager (de)multiplexes data for upper layers
Frame structure Basic data rate specifies the slave Enhanced data rate specifies the master higher rate modulation only here
Establishment of a new connection Inquiry discovers units in range their device addresses and clocks Paging establishes an actual connection M INQUIRY PAGE MASTER RESPONSE CONNECTION ID ID FHS ID ID FHS ID POLL NULL S INQUIRY SCAN BACKOFF INQUIRY RESPONSE PAGE SCAN SLAVE RESPONSE CONN
Inquiry Inquiry Scan performed by device that wants to be discovered periodically listens for inquiry packets on a special inquiry hopping sequence of 32 frequencies Inquiry sends an inquiry packet with a specific inquiry access code the code indicates who should respond either generic or dedicated to certain type of devices Inquiry Response sends a response packet containing the responding device address after receiving inquiry message during the inquiry scan sends to corresponding inquiry hopping response sequence for each inquiry hop there is a corresponding inquiry response hop
Paging Page Master sends a page message to slave s address Send to special page hopping sequence of 32 frequencies Master uses the clock information from slave to be paged Estimate where in the hop sequence slave is listening in page scan mode Send to the frequencies just before and after Page Scan Slave enters page scan state when it wishes to receive page packets Slave listens to packets addressed to its DAC Page Response Upon receiving page message, slave enters page response state Send back a page response containing its DAC Use frequencies from corresponding page response sequence For each page hop there is a corresponding page response hop
Pairing Used to establish a link key e.g. to prevent eavesdropping an man-in-the-middle attacks PIN code pairing (legacy pairing) Secure Simple Pairing Authentication based on shared secret Encryption of data based on shared secret based on SAFER+ block cipher 5478 5478
Bluetooth Low Energy Introduction History Nokia initiated project Bluetooth Low End Extension (2004) WiBree (2006) part of Bluetooth v4.0 (2009) Characteristics very low-power consumption cheap for small amounts of data two implementations single mode for low-power devices (e.g., sensors) dual mode for less constrained devices (including Bluetooth Classic)
Bluetooth Low Energy Technical aspects Radio characteristics same frequency band as Classic but only 40 channels 2 MHz wide AFH similar to Classic and raw data rate of 1 Mbps Simpler stack and protocols only L2CAP, link layer, and PHY reduced number of states Standby, Advertising, Scanning, Initiating, and Connection low-power achieved through a low duty-cycle mechanism periodic wake-ups for connection events and then sleep Market availability besides devkits, recently appeared in off-the-shelf smartphones iphone 4S and 5, ipad 3 rd gen, Samsung Galaxy S3
Computer Networks II Advanced Features (T-110.5111), PhD mario.di.francesco@aalto.fi