wireless networked systems - old dominion universitynadeem/classes/cs795-wns-s13/... ·...

55
Wireless Networked Systems CS 795/895 - Spring 2013 Tamer Nadeem Dept. of Computer Science Lec #7: Medium Access Control WPAN, Bluetooth, ZigBee

Upload: others

Post on 17-Mar-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Wireless Networked Systems� �

CS 795/895 - Spring 2013 �

Tamer Nadeem �Dept. of Computer Science�

Lec #7: Medium Access Control�WPAN, Bluetooth, ZigBee

Page 2: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 2 Spring 2013 CS 795/895 - Wireless Networked Systems

Bluetooth

Page 3: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 3 Spring 2013 CS 795/895 - Wireless Networked Systems

Overview

•  Bluetooth is a specification for the use of low power wireless communications over short distance.

•  Although Bluetooth standard utilizes the same 2.4 GHz range of Wi-Fi

•  Compared to Wi-Fi, Bluetooth networking is slower, a bit more limited in range, and supports many fewer devices

Page 4: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems

History

•  In 1994 – need for low power consumption wireless devices to substitute for cable

•  Ericsson – driving force behind Bluetooth •  Pre-Cell phone

•  1998, Ericsson, Nokia, IBM, Toshiba, Intel formed the Bluetooth Special Interest Group (SIG)

•  1999 – Release of Bluetooth protocol

•  2002 – IEEE adopted Bluetooth standard, 802.15 working group

•  Connections will be done seamlessly without need for installations and software drivers

•  Devices can discover other Bluetooth-enabled devices

•  Determine its capabilities and applications, and establish connections for data exchange

Page 5: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 5 Spring 2013 CS 795/895 - Wireless Networked Systems

Bluetooth Usages

Personal Ad-hoc Networks

Cable Replacement

Landline

Data/Voice Access Points

Page 6: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 6 Spring 2013 CS 795/895 - Wireless Networked Systems

Piconets / Scatternet •  Whenever there is a connection between two

Bluetooth devices, a piconet is formed •  Always 1 master and up to 7 active slaves •  Any Bluetooth device can be either a master

or a slave •  Can be a master of one piconet and a slave of

another piconet at the same time (scatternet)

•  Piconet uses centralized Time Division Multiplexing. •  All devices have the same timing and frequency hopping sequence • Every Bluetooth device has its own clock and can be uniquely identified

by its Bluetooth device address •  Slaves in a piconet use master's Bluetooth device address and clock to

determine the frequency hopping sequence

•  No time or frequency synchronization between piconets

Page 7: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 7 Spring 2013 CS 795/895 - Wireless Networked Systems

•  Bluetooth operates in unlicensed Industrial Scientific Medical (ISM) band at 2.4 GHz

•  Band is divided into 79 channels with 1 MHz each •  Bluetooth devices use a Time-Division Duplex (TDD) scheme •  Channel is divided into consecutive slots (each 625 µs) •  One packet can be transmitted per slot •  Subsequent slots are alternatively used for transmitting and receiving

•  Master can send only in EVEN slots while Slave can send only in ODD slots

Bluetooth Communication

Page 8: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 8 Spring 2013 CS 795/895 - Wireless Networked Systems

Frequency Hopping Spread Spectrum (FHSS)

•  Reduce interference, Bluetooth uses Frequency Hopping Spread Spectrum (FHSS) technology

•  During a connection, radio transceivers hop from one channel to another

•  1600 hops per second through 79 1MHz channels

•  One packet is sent on a channel, two devices then retune their frequencies (hop) to send the next packet on a different channel.

•  So, if one frequency channel is blocked, limited disturbance to the Bluetooth communication

•  Allows several Bluetooth networks to run concurrently without interrupting one other

•  Link rate: 1 Mbps, but with overhead, this reduces to 721 kbps •  Typical range for Bluetooth is 10m, can reach up to 100m depending

on the power class of the device

Page 9: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 9 Spring 2013 CS 795/895 - Wireless Networked Systems

Bluetooth Protocol Stack

The Radio is the interface between the on-air channel medium and the Baseband

The Link Controller is responsible for establishing and maintaining links between Bluetooth units

The Baseband layer is responsible for channel coding and decoding

Digitizes signals received by the radio for passing up the stack and it formats the data it receives from the Link Controller for transmission over the channel

Link Manager Protocol (LMP) handles piconet management and link configuration. It also includes link security

Host Controller Interface (HCI) defines uniform methods for accessing and controlling lower layers of the protocol stack, namely baseband and the link manager

Page 10: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 10 Spring 2013 CS 795/895 - Wireless Networked Systems

Telephony Control Protocol Specification (TCS) defines call control signaling for establishing speech and data calls between Bluetooth devices, provides them with telephony services

Bluetooth Protocol Stack

Logical Link Control and Adaptation Protocol (L2CAP) provides connection-oriented and connectionless data services to the other higher level protocol layers

RFCOMM protocol defines a transport protocol for emulating RS-232 serial ports.

Service Discovery Protocol (SDP) defines procedures for discovering services of other devices as well as determining the characteristics of those services.

Wireless Application Protocol (WAP) includes interoperability requirements for Bluetooth

Object Exchange Protocol (OBEX) is for object data exchange over infrared (IR) links

Page 11: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 11 Spring 2013 CS 795/895 - Wireless Networked Systems Bluetooth 11

Bluetooth Transport Protocol Group " Radio Frequency (RF)

" Sending and receiving modulated bit streams

" Baseband " Defines the timing, framing " Flow control on the link.

" Link Manager " Managing the connection states. " Enforcing Fairness among slaves. " Power Management

" Logical Link Control & Adaptation Protocol " Handles multiplexing of higher level protocols " Segmentation & reassembly of large packets " Device discovery & QoS

Page 12: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 12 Spring 2013 CS 795/895 - Wireless Networked Systems Bluetooth 12

Bluetooth Middleware Protocol Group

" Service Discovery Protocol (SDP) " Means for applications to discover device info, services and its

characteristics.

" TCP/IP

" Network Protocols for packet data communication, routing

" RFCOMM

" Cable replacement protocol, emulation of serial ports over wireless network

Page 13: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 13 Spring 2013 CS 795/895 - Wireless Networked Systems Bluetooth 13

Physical Link Types

" Synchronous Connection Oriented (SCO) " Point to Point Full Duplex between Master & Slave " Established once by master & kept alive till released by Master

" Typically used for Voice connection ( to guarantee continuity )

" Master reserves slots used for SCO link on the channel to preserve time sensitive information

" Asynchronous Connection Link (ACL) " It is a momentary link between master and slave. " No slots are reserved.

" It is a Point to Multipoint connection. " Symmetric & Asymmetric links possible

Page 14: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 14 Spring 2013 CS 795/895 - Wireless Networked Systems

Bluetooth State Machine

Page 15: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 15 Spring 2013 CS 795/895 - Wireless Networked Systems Bluetooth 15

Bluetooth State Machine " Inquiry Scan

" A device that wants to be discovered will periodically enter this mode and listen for inquiry packets.

" Inquiry " Device sends an Inquiry packet addressed to GIAC or DIAC " Transmission is repeated on the inquiry hop sequence of

frequencies.

" Inquiry Response " When an inquiry message is received in the inquiry scan state, a

response packet (FHS) containing the responding device address must be sent after a random number of slots.

Page 16: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 16 Spring 2013 CS 795/895 - Wireless Networked Systems

Bluetooth State Machine " Page

" The master uses the clock information, about the slave to be paged, to determine where in the hop sequence, the slave might be listening in the page scan mode.

" The master sends a page message

" Page Scan " The page scan substate can be entered by the slave from the

standby state or the connection state. It listens to packets addressed to its DAC.

" Page Response " On receiving the page message, the slave enters the slave page

response substate. It sends back a page response consisting of its ID packet which contains its DAC, at the frequency for the next slot from the one in which page message was received.

Page 17: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 17 Spring 2013 CS 795/895 - Wireless Networked Systems Bluetooth 17

Power Control Modes " Sniff Mode

" This is a low power mode in which the listening activity of the slave is reduced.

" In the sniff mode, the slave listens for transmissions only at fixed intervals Tsniff, at the offset slot Dsniff for Nsniff times. These parameters are given by the master when it issues the SNIFF command to the slave.

" Hold Mode " Slave temporarily (for Thold sec) does not support ACL packets

on the channel (possible SCO links will still be supported). " By this capacity can be made free to do other things like

scanning, paging, inquiring, or attending another piconet.

" The slave unit keeps its active member address (AM_ADDR).

Page 18: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 18 Spring 2013 CS 795/895 - Wireless Networked Systems Bluetooth 18

Power Control Modes " Park Mode

" This is a very low power mode with very little activity.

" The slave however, stays synchronized to the channel.

" The parked slaves regularly listen for beacon signals at intervals decided by the beacon structure communicated to the slave during the start of parking.

" The parked slave has to be informed about a transmission in a beacon channel which is supported by the master to keep parked slaves in synchronization and send them any other information.

" Any message to be sent to a parked member are sent over the broadcast channel.

" It also helps the master to have more than seven slaves.

Page 19: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 19 Spring 2013 CS 795/895 - Wireless Networked Systems

Functional Overview

•  Standby •  Waiting to join a piconet

•  Inquire •  Ask about radios to connect

to

•  Page •  Connect to a specific radio

•  Connected •  Actively on a piconet (master

or slave)

•  Park/Hold •  Low Power connected states

Inquiry Page

ConnectedAMA

TransmitdataAMA

Ttypical=0.6s

Ttypical=2s

HOLDAMA

PARKPMA

Ttypical=2 ms Ttypical=2 ms

ReleasesAMA

AddressLow Power

States

ActiveStates

Standby

ConnectingStates

UnconnectedStandby

Deta

ch

Page 20: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 20 Spring 2013 CS 795/895 - Wireless Networked Systems

Functional Overview

•  Devices not connected to a piconet are in STANDBY mode, using low power.

•  A connection is made by either a PAGE command if the address is known or by the INQUIRY command followed by a PAGE

•  When a radio sends an INQUIRE command, all the listening radios respond with their FHS packets, which tells the inquiring radio of all the radios in the area.

•  All listening radios perform a page scan and/or an inquiry scan every 1.25 seconds.

•  The master radio sends an FHS to the paged radio.

Page 21: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 21 Spring 2013 CS 795/895 - Wireless Networked Systems

Functional Overview

•  When a radio joins a piconet it is assigned a 3 bit Active Member Address(AMA).

•  Once the piconet has eight radios, the master assigns puts a radio into the PARK mode.

•  This is one of the low power states, in which the radio releases its AMA for a 8 bit PMA (Passive Member Address).

•  The freed AMA can be assigned to another radio wishing to join the piconet.

•  Though upto 256 radios can actively reside on a piconet, only 8 of them with AMA’s can transfer data.

Page 22: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 22 Spring 2013 CS 795/895 - Wireless Networked Systems

•  First, Bluetooth device looks for devices that it might connect to •  Step 1 - the Inquiry Process.

•  Inquiring device, A, sends out an inquiry packet or repeated inquiry packets and waits to receive responses back

•  Discoverable devices in range respond to an inquiry by sending a Frequency Hop Synchronization (FHS) packet, which contains all the information device A needs to connect to the responding device, including the Bluetooth device's address, page scan modes, and clock offset

•  All devices that respond to the inquiry are reported to the host controller of device A.

•  List of all devices discovered is presented to the user - is application-dependent

Ex: Bluetooth Connection with a Device with Dial-up Service

Page 23: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 23 Spring 2013 CS 795/895 - Wireless Networked Systems

Ex: Bluetooth Connection with a Device with Dial-up Service

•  At this point, A knows which devices are in range, but it doesn’t know which devices support dial-up

•  Step 2 - Using information retrieved from inquiry, A now attempts to connect to different devices that responded to its inquiry in order to find out what services they support

•  Depending on the application, device A may either 1) Establish links to all devices that responded to its inquiry and get

information about their services and later on reconnect with one that supports dial-up networking; or

2) Upon seeing that a device supports dial-up networking, directly proceed to setting up a connection with that device without finding out the services from the rest of the devices in the list.

In following slide, second option is adopted.

Page 24: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 24 Spring 2013 CS 795/895 - Wireless Networked Systems

•  Step 2 continued •  Device A wants to find out services of a device, so, device A sends out

paging packets

•  Connectable device will respond and a baseband link can be established between the two devices

•  Following that, a L2CAP connection will be established before they can exchange service information. Information exchange is handled by Service Discovery Protocol

•  Device B responds, “I have dial-up networking service”

•  RFCOMM connection can then be established across the already existing L2CAP link

•  After this, a dial-up networking connection can then be established on top of the RFCOMM connection

•  Laptop can then start using the cell phone to access the phone network without any cables being needed for connections

Ex: Bluetooth Connection with a Device with Dial-up Service

Page 25: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 25 Spring 2013 CS 795/895 - Wireless Networked Systems

Step 1

Step 2

Ex: Bluetooth Connection with a Device with Dial-up Service

Page 26: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 26 Spring 2013 CS 795/895 - Wireless Networked Systems

Bluetooth Inquiry Process •  Uses 32 inquire channels to send out inquiry messages •  Send out inquiry on 32 channels, broken up into 2 inquiry hop trains (16

different channels to transmit packets) •  A device periodically listens for inquiry packets at a single frequency – chosen

out of 16 frequencies •  Stays in the state long enough for a inquiring device to cover 16 frequencies •  Receiver does an inquire scan frequent enough so that it is guaranteed to

wake up during a 16 channel train

D

A

H M N

L

P O

Q

B

C

F

K J

G

I

E

H

Note that a device can be “Undiscoverable” •  Devices that allow themselves to be

discoverable issue an inquiry response

•  Will re-enter inquiry scan state even after responding to an inquire

Page 27: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 27 Spring 2013 CS 795/895 - Wireless Networked Systems

Bluetooth Inquiry Process

•  Each full scan of a 16 channel train takes about 1.28 seconds

•  16 channels * 625us * 128 trains = 1.28 seconds

•  One full 16 channel train takes 10ms.

•  Receiver enters inquiry scan state at least once every 1.28 seconds, and stays in that state for 10ms.

•  The 128 train scan is repeated up to 4 times for each train (10.24 seconds), after which the inquiring device should know everyone nearby

Page 28: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 28 Spring 2013 CS 795/895 - Wireless Networked Systems

Bluetooth Paging Process

•  Step 1: •  Device broadcasts a page message out to the device that it wants to set up

a connection with •  Does this in a similar manner as inquire messages (on 2 frequency trains of 16

frequencies each)

•  Once the device receives a page response, it will stop paging

•  Step 2: In the page response, an acknowledgement is sent back to the master containing the slave ID

•  Step 3: In the master response, the frequency hopping generator is stopped and the master issues an FHS packet to the slave

•  Step 4: The slave issues a final slave response transmission that is aligned to the slave’s native clock

•  Using the data from the FHS packet, the slave calculates adopts the master’s frequency hopping pattern and synchronizes to its clock

Page 29: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 29 Spring 2013 CS 795/895 - Wireless Networked Systems

•  Step 5: •  When the master receives the packet, it jumps back to its frequency

hopping pattern and assigns the slave an Active Member Address (AMA) for the piconet

•  Master sends out a poll packet to ensure that the slave is on its frequency hopping pattern

•  Step 6: •  Once the slave receives the poll packet, the slave replies with any kind of

packet to ensure that it is on the right channel

•  The acknowledgement must be received by the Master within the timeout period

•  At the conclusion of step 6, a new synchronized connection is established between the master and the slave

Bluetooth Paging Process

Page 30: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 30 Spring 2013 CS 795/895 - Wireless Networked Systems 30

Bluetooth Profiles

•  Bluetooth is different from most network protocols.

•  Most network protocols focus defining how the channels are to be used and leave application designers to define what they will be used for.

•  Bluetooth V 1.1 defines 13 specific profiles (applications) that will be supported along with the different protocol stacks for each of them.

•  Generic access profile

•  provides secure channels between the master and slave.

•  Service discovery profile

•  allows devices to discover what services are available from other devices.

•  Serial port profile

•  for applications that need a serial port communication

Page 31: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 31 Spring 2013 CS 795/895 - Wireless Networked Systems 31

•  Generic object exchange profile

•  provide support for the client/server model.

•  note that a slave can be a client or a server.

•  LAN access profile •  is a direct competitor of 802.11. •  allows a Bluetooth device to connect to a fixed network.

•  Dialup access profile •  Ericsson’s original motivation •  allows a notebook computer to communicate to a mobile phone

without wires •  Fax profile

•  allows fax machines to connect to mobile phones wirelessly to send and receive faxes

Bluetooth Profiles

Page 32: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 32 Spring 2013 CS 795/895 - Wireless Networked Systems 32

•  Cordless Telephony Profile

•  connect a cordless telephone handset to a base station without wires.

•  Intercom profile

•  allows two telephones to connect like walkie-talkies

•  Headset Profile

•  good for hands free telephony I.E. while driving a car

•  The last three profiles are for wireless devices to exchange a wide variety of data

•  Object Push profile – for simple objects

•  File transfer profile - general file transfer

•  Synchronization profile - was designed to facilitate the exchange of data in both directions between a P.C. and a P.D.A.

Bluetooth Profiles

Page 33: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 33 Spring 2013 CS 795/895 - Wireless Networked Systems

Interoperability & Profiles

Profiles P

roto

cols

Applications •  Represents default solution

for a usage model

•  Vertical slice through the protocol stack

•  Basis for interoperability and logo requirements

•  Each Bluetooth device supports one or more profiles

Page 34: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 34 Spring 2013 CS 795/895 - Wireless Networked Systems Bluetooth 34

Packet Structure

72 bits 54 bits 0 - 2744 bits

Data Voice CRC

No CRC No retries

header

ARQ

FEC (optional) FEC (optional)

Access Code

Header

Payload

Page 35: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 35 Spring 2013 CS 795/895 - Wireless Networked Systems

Zigbee

Page 36: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 36 Spring 2013 CS 795/895 - Wireless Networked Systems

The ZigBee Alliance Solution

• Targeted at home and building automation and controls, consumer electronics, PC peripherals, medical monitoring, and toys

•  Industry standard through application profiles running over IEEE 802.15.4 radios

• Primary drivers are simplicity, long battery life, networking capabilities, reliability, and cost

• Alliance provides interoperability and certification testing

Page 37: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 37 Spring 2013 CS 795/895 - Wireless Networked Systems

The Wireless Market S

HO

RT

<

R

AN

GE

>

LO

NG

LOW < DATA RATE > HIGH

PAN

LAN

TEXT GRAPHICS INTERNET HI-FI AUDIO

STREAMING VIDEO

DIGITAL VIDEO

MULTI-CHANNEL VIDEO

Bluetooth1

Bluetooth 2 ZigBee

802.11b

802.11a/HL2 & 802.11g

Page 38: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 38 Spring 2013 CS 795/895 - Wireless Networked Systems

Applications

ZigBee Wireless Control that

Simply Works

RESIDENTIAL/ LIGHT

COMMERCIAL CONTROL

CONSUMER ELECTRONICS

TV VCR DVD/CD remote

security HVAC lighting control access control lawn & garden irrigation

PC & PERIPHERALS

INDUSTRIAL CONTROL

asset mgt

process control

environmental energy mgt

PERSONAL HEALTH CARE

BUILDING AUTOMATION

security

HVAC AMR

lighting control access control

mouse keyboard joystick

patient

monitoring

fitness monitoring

Page 39: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 39 Spring 2013 CS 795/895 - Wireless Networked Systems

IEEE 802.15.4 & ZigBee In Context

–  “the software”

–  Network, Security & Application layers

–  Brand management

IEEE 802.15.4 –  “the hardware”

–  Physical & Media Access Control layers

PHY 868MHz / 915MHz / 2.4GHz

MAC

Network Star / Mesh / Cluster-Tree

Security 32- / 64- / 128-bit encryption

Application

API

ZigBee Alliance

IEEE 802.15.4

Customer

Silicon Stack App

Page 40: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 40 Spring 2013 CS 795/895 - Wireless Networked Systems

Development of the Standard •  ZigBee Alliance

•  50+ companies: semiconductor mfrs, IP providers, OEMs, etc.

•  Defining upper layers of protocol stack: from network to application, including application profiles

•  First profiles published mid 2003

•  IEEE 802.15.4 Working Group

•  Defining lower layers of protocol stack: MAC and PHY scheduled for release in April

PHY LAYER 2.4 GHz 915MHz 868 MHz

MAC LAYER MAC LAYER

NETWORK LAYER Star/Cluster/Mesh

APPLICATION INTERFACE

APPLICATIONS

Silicon Application ZigBee Stack

Customer

IEEE 802.15.4

ZigBee Alliance

SECURITY

Page 41: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 41 Spring 2013 CS 795/895 - Wireless Networked Systems

Stack Reference Model

IEEE 802.15.4 PHY

IEEE 802.15.4 MAC (CPS)

ZigBee NWK

MAC (SSCS) 802.2 LLC

IP

API UDP

ZA1 ZA2 … ZAn IA1 IAn

Transmission & reception on the physical radio channel

Channel access, PAN maintenance, reliable data transport

Topology management, MAC management, routing, discovery protocol,

security management

Application interface designed using general profile

End developer applications, designed using application profiles

Page 42: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 42 Spring 2013 CS 795/895 - Wireless Networked Systems

IEEE 802.15.4 Basics

•  802.15.4 is a simple packet data protocol for lightweight wireless networks

•  Channel Access is via Carrier Sense Multiple Access with collision avoidance and optional time slotting

•  Message acknowledgement and an optional beacon structure •  Multi-level security •  Three bands, 27 channels specified

•  2.4 GHz: 16 channels, 250 kbps •  868.3 MHz : 1 channel, 20 kbps •  902-928 MHz: 10 channels, 40 kbps

•  Works well for •  Long battery life, selectable latency for controllers, sensors, remote monitoring

and portable electronics

•  Features of the MAC: Association/dissociation, ACK, frame delivery, channel access mechanism, frame validation, guaranteed time slot management, beacon management, channel scan

Page 43: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 43 Spring 2013 CS 795/895 - Wireless Networked Systems

IEEE 802.15.4 MAC Overview •  Employs 64-bit IEEE & 16-bit short addresses

•  Ultimate network size can reach 264 nodes (more than we’ll probably need…) •  Using local addressing, simple networks of more than 65,000 (2^16) nodes can be

configured, with reduced address overhead

•  Three devices specified •  Network Coordinator •  Full Function Device (FFD) •  Reduced Function Device (RFD)

•  Simple frame structure •  Reliable delivery of data •  Association/disassociation •  AES-128 security •  CSMA-CA channel access •  Optional superframe structure with beacons

Page 44: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 44 Spring 2013 CS 795/895 - Wireless Networked Systems

ZigBee Network Topologies •  Supports multiple network topologies including Star, Cluster Tree

and Mesh

Star

Mesh

Cluster Tree

PAN coordinator Full Function Device Reduced Function Device

Page 45: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 45 Spring 2013 CS 795/895 - Wireless Networked Systems

IEEE 802.15.4 Device Types

•  Three device types •  Network Coordinator

•  Maintains overall network knowledge; most sophisticated of the three types; most memory and computing power

•  Full Function Device •  Carries full 802.15.4 functionality and all features specified by the standard

•  Additional memory, computing power make it ideal for a network router function •  Could also be used in network edge devices (where the network touches the real

world)

•  Reduced Function Device •  Carriers limited (as specified by the standard) functionality to control cost and

complexity

•  General usage will be in network edge devices

•  All of these devices can be no more complicated than the transceiver, a simple 8-bit MCU and a pair of AAA batteries!

Page 46: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 46 Spring 2013 CS 795/895 - Wireless Networked Systems

IEEE 802.15.4 MAC Layer

•  Traffic Type •  Periodic data (e.g. sensors)

•  Intermittent data (e.g. light switch)

•  Repetitive low latency data (e.g. mouse)

•  Frame Types •  Data Frame

•  used for all transfers of data •  Beacon Frame

•  used by a coordinator to transmit beacons •  Acknowledgment Frame

•  used for confirming successful frame reception •  MAC Command Frame

•  used for handling all MAC peer entity control transfers

Page 47: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 47 Spring 2013 CS 795/895 - Wireless Networked Systems

MAC Options

• Two channel access mechanisms •  Non-beacon network

•  Standard ALOHA CSMA-CA communications •  Positive acknowledgement for successfully received packets

•  Beacon-enabled network •  Superframe structure

•  For dedicated bandwidth and low latency •  Set up by network coordinator to transmit beacons at predetermined

intervals •  15ms to 252sec (15.38ms*2n where 0 ≤ n ≤ 14) •  16 equal-width time slots between beacons •  Channel access in each time slot is contention free

•  Three security levels specified •  None •  Access control lists •  Symmetric key employing AES-128

Page 48: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 48 Spring 2013 CS 795/895 - Wireless Networked Systems

PHY frame structure

•  PHY packet fields •  Preamble (32 bits) – synchronization

•  Start of packet delimiter (8 bits) – shall be formatted as “11100101”

•  PHY header (8 bits) –PSDU length

•  PSDU (0 to 127 bytes) – data field

Preamble Start of Packet Delimiter

PHY Header

PHY Service Data Unit (PSDU)

4 Octets 0-127 Bytes

Sync Header PHY Payload

1 Octets 1 Octets

Frame Length (7 bit)

Reserve (1 bit)

Page 49: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 49 Spring 2013 CS 795/895 - Wireless Networked Systems

ZigBee and Bluetooth

•  ZigBee

•  Smaller packets over large network

•  Mostly Static networks with many, infrequently used devices

•  Home automation, toys, remote controls, etc.

•  Bluetooth

•  Larger packets over small network

•  Ad-hoc networks

•  File transfer

•  Screen graphics, pictures, hands-free audio, Mobile phones, headsets, PDAs, etc.

Optimized for different applications

Page 50: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 50 Spring 2013 CS 795/895 - Wireless Networked Systems Copyright 2002 The ZigBee Alliance, Inc.

Air interface

ZigBee

•  DSSS- 11 chips/ symbol

•  62.5 K symbols/s

•  4 Bits/ symbol

•  Peak Information Rate

~128 Kbit/second

Bluetooth •  FHSS

•  1 M Symbol / second

•  Peak Information Rate

~720 Kbit / second

ZigBee and Bluetooth

Page 51: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 51 Spring 2013 CS 795/895 - Wireless Networked Systems

ZigBee and Bluetooth

Silicon

PHY Layer

MAC Layer MAC Layer

Data Link Layer

Network Layer

ZigBee Stack Application

Application Interface

Application

Silicon

RF Baseband

Link Controller Vo

ice

Link Manager Host Control Interface

L2CAP

Telephony Control Protocol

Inte

rcom

H

eads

et

Cor

dles

s G

roup

Cal

l

RFCOMM (Serial Port)

OBEX

Bluetooth Stack Applications

vCar

d vC

al

vNot

e vM

essa

ge

Dia

l-up

Net

wor

king

Fax Service Discovery Protocol

User Interface

Zigbee Bluetooth

Protocol Stack Comparison

Page 52: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 52 Spring 2013 CS 795/895 - Wireless Networked Systems

ZigBee and Bluetooth

Timing Considerations

ZigBee: •  Network join time = 30ms typically •  Sleeping slave changing to active = 15ms typically •  Active slave channel access time = 15ms typically

Bluetooth: •  Network join time = >3s •  Sleeping slave changing to active = 3s typically •  Active slave channel access time = 2ms typically

ZigBee protocol is optimized for timing critical applications

Page 53: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 53 Spring 2013 CS 795/895 - Wireless Networked Systems

Bluetooth ZigBee

AIR INTERFACE FHSS DSSS PROTOCOL STACK 250 kb 28 kb

BATTERY rechargeable non-rechargeable

DEVICES/NETWORK 8 255

LINK RATE 1 Mbps 250 kbps RANGE ~10 meters (w/o pa) ~30 meters

Comparison Overview

ZigBee and Bluetooth

Page 54: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 54 Spring 2013 CS 795/895 - Wireless Networked Systems

Wireless Networking Standards Market Name Standard

GPRS/GSM 1xRTT/CDMA

Wi-Fi™ 802.11b

Bluetooth™ 802.15.1

ZigBee™ 802.15.4

Application Focus

Wide Area Voice & Data

Web, Email, Video

Cable Replacement

Monitoring & Control

System Resources 16MB+ 1MB+ 250KB+ 4KB -

32KB Battery Life (days) 1-7 .5 - 5 1 - 7 100 -

1,000+ Network Size 1 32 7 255 /

65,000 Bandwidth (KB/s)

64 - 128+ 11,000+ 720 20 - 250

Transmission Range (meters)

1,000+ 1 - 100 1 - 10+ 1 - 100+

Success Metrics

Reach, Quality

Speed, Flexibility

Cost, Convenience

Reliability, Power, Cost

Page 55: Wireless Networked Systems - Old Dominion Universitynadeem/classes/cs795-WNS-S13/... · 2013-03-04 · Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems History • In 1994

Page 55 Spring 2013 CS 795/895 - Wireless Networked Systems

Questions