wireless communication - zigbee, bluetooth
Post on 12-Sep-2021
6 Views
Preview:
TRANSCRIPT
Wireless Communication - Zigbee, Bluetooth
Amarjeet Singh
February 19, 2012
Logistics
2
Sample exam paper on the course website Derived from mid term exam of last year – will give you an idea
of what can be asked in the exam Will create projects for those who did not get it since all topics were
over Will create the presentation schedule for students by this weekend
Revision from last class - I
3
UART What are specific example interfaces? RS-232:
How do you make a minimum interface (with/without handshaking)?
How will you support RS-232 with UART in your microcontroller?
RS-422: How is it different from RS-232? How is it extended to support multi-device bus?
Infrared: How is it different from RS-232? What bit-encodings are used in infrared?
Revision from last class - II
4
USB: What does a USB packet contain? What are different types of token packets? What are different types of handshake packets? What are different types of data transfers supported? How is bandwidth distribution done in USB across different
types of transfers?
IEEE 802 Wireless Space
Data Rate (Mbps)
Ra
nge
ZigBee
802.15.4
15.4c 802.15.3
802.15.3c WPAN
WLAN
WMAN
WWAN
WiFi
802.11
0.01 0.1 1 10 100 1000
Bluetooth
802.15.1
IEEE 802.22
WiMax
IEEE 802.16
IEEE 802.20
IEEE 802.15.4
Approved by IEEE in 2003 with revision in 2006 for Wireless Sensor Networks
Specifies only 2 OSI layers - Physical (PHY) and Medium Access Control (MAC)
Only direct, single hop communication possible
Two types of devices are defined: RFD - Reduced Functionality Device
Contains limited features Can only communicate to FFD Requires little power, memory and processing
resources FFD - Full Functionality Device
Full set of features - capable to act as network coordinator
Communicate to both FFD and RFD Higher power, memory and processing resources
IEEE 802.15.4 Data Transfer Models
Star: Network Nodes (FFDs, RFDs) are connected to a
coordinator node (FFD)
Peer-to-peer: FFDs can communicate to all devices in
transmissions range RFDs can talk to FFDs they are associated with
IEEE 802.15.4 Physical Layer
Available in 3 frequency bands
2.4 GHz is most commonly used Available worldwide without license
Frequency (MHz)
Number of channels
Data rates (kbps)
2450 16 250
915 10 40, 250
868 1 20,100
Unlicensed Availability
Worldwide
America, Australia
Europe
Typical device (0 dB power) can transmit up to 200 meters outside and 30 meters inside
IEEE 802.15.4 MAC Layer
Key MAC layer responsibilities are: Data framing: Data to be sent is encapsulated in MAC frame
that is passed to RF transceiver Device addressing: Each device identified by 64-bit long MAC
address Channel Sense Management (CSMA-CA): Device scans
preconfigured channels and chooses one with least activity “listen before send” principle for managing access to single
physical channel among multiple devices
Device Association/Disassociation: Upon higher layer requests, MAC layer enters/leaves network
Zigbee Specification
Two lowest layers (PHY and MAC) are equal to those in IEEE 802.15.4
Higher layers in Zigbee stack are specified to allow efficient communication within entire network and on the application level
Routing mechanisms on network layer allow multi-hop data transmission, selection of best suitable path and rerouting
Application framework provides interface to enable simultaneous execution of multiple applications
Zigbee Node Types
Coordinator: Only mandatory node type in the network; Acts as root node and performs multiple network management activities
Only FFD in 802.15.4 terminology can act as network coordinator
Router: A 802.15.4 FFD node not acting as network coordinator;
Used to extend network coverage area beyond transmission range of single device; Increase network reliability by creating additional data routing paths
End device: Correspond to RFD in 802.15.4; Can directly
communicate with a single coordinator/router Node addressing: Each node that joins the zigbee network gets a 16
bit network address (How many bits was the MAC address?) Communication at network level is performed based on this
address; Direct communication between two neighboring devices is based on MAC address
Zigbee Network Topologies
Extends IEEE 802.15.4 transfer models by specifying tree and mesh topologies
Star Topology: Corresponds to 802.15.4 star topology Do you need a network layer in this case?
Tree Topology: Based on 802.15.4 peer-to-peer model Routers/Coordinators can have child nodes Direct communication possible in terms of parent-child Hierarchical routing without alternate paths
Star Topology Tree Topology
What will happen if a link fails in tree network?
Zigbee Network Topologies
Mesh Topology: Based on 802.15.4 peer-to-peer model Routers/Coordinators can have child nodes Direct communication possible between any FFD (coordinator/router)
in transmission range End device can only communicate with its parent Optimum and dynamic routing with alternate paths
Mesh Topology
ZigBee Mesh Networking
ZigBee Mesh Networking
ZigBee Mesh Networking
ZigBee Mesh Networking
ZigBee Mesh Networking
Zigbee Application Operation - I
Each application instance running on a node is a unique network entity where messages can originate/terminate
Termed as endpoint and has a unique address Each node can have up to 240 endpoints - A
endpoint is identified by network address of the node and its endpoint address on the node
Endpoint 0 reserved for Zigbee Device Object (ZDO)
This application has multiple roles - defines type of node (coordinator, router, end-point), initializes the node and participates in network creation
Zigbee Application Operation - II
Binding: Process of establishing a relationship between nodes that can communicate e.g. in Home Automation, which switches control which lights
Binding between two applications is specified by: Network address and endpoint of application where data is generated Network address and endpoint of receiving application Stored in a binding table (can be stored locally or on the coordinator
node) Binding types:
One-to-one One-to-many Many-to-one
Can you think of application scenarios in light control for different binding types?
Zigbee Operation - I
Network is initialized by the coordinator who pre-configures a number of network properties :
Network Depth - Maximum number of hops from coordinator to the farthest end-device
What is the network depth of star topology? Maximum number of child devices allowed per router Maximum number of child routers
Zigbee Operation - II
Forming a zigbee network by the coordinator Search for a suitable radio channel Start the network assigning a PAN ID to the network - can be pre-
determined or obtained dynamically Assigns itself the network id of 0x0000 Ready to respond to queries from other devices
Join process by other nodes: Search for network: Scan the available channels and find operating
networks (separated by their PAN IDs) Select parent: from (possibly) multiple routers and coordinator in
range Send join request Accept or reject join request (by the coordinator/routers)
Zigbee Operation - III
Message propagation: Message contains two destination addresses - Address of final
destination, Address of next hop node Are any of these obvious for any network topology?
Route discovery mechanism
Route discovery broadcast is sent by parent router of source end device - Contains the network address of destination end device
All routers receive the broadcast Parent router of destination end device replies back to parent router of
source end device As the reply traverses back, the hop count and signal quality measure
for each hop are recorded - Each router in the path can build a routing table containing best path to destination end device
Eventually each router in the path will have entry in the routing table
Zigbee Network Reliability
Zigbee employs a range of techniques for reliable communication Channel Selection: On initialization, channels with least activity are
selected CSMA-CA (Listen Before Sending): Before transmitting, node listens to
the channel to check if it is clear Data coding: Applies a coding mechanism ensuring higher probability
of successful transmission even in case of simultaneous transfer Acknowledgements: Receiving device acknowledges the successful
receipt of a message; retransmission if ack is not received in time Route discovery: In mesh network, possibility of finding an alternate
route if the default route is down Several mechanisms to ensure security:
Access control lists: Only pre-defined nodes can join the network 128-bit AES based Encryption Message freshness timers: Timed-out messages are rejected,
preventing message replay attacks
Can you give an example of replay attack?
Radio Characteristics Comparison
ZigBee technology relies
upon IEEE 802.15.4, which
has excellent performance
in low SNR environments
Advanced Metering Application
Building/Home Automation
Bluetooth Characteristics (I)
Short range radio links intended to replace cables No line of sight required unlike IrDA Short range: 0-30 feet (10 meters) with power consumption of 4
dBm (2.5 mW) Distance can be increased by amplifying the power
Operates in the unlicensed band at 2.4 GHz also used by other devices such as 802.11, garage door openers, microwave etc.
Higher probability of interference Bluetooth channel is divided into time slots each 625 uS in length
Devices hop through these timeslots making 1600 hops per second
Bluetooth Characteristics (II)
Uses 79 channels in the frequency range 2.402 - 2.480 GHz Uses Frequency Hop Spread Spectrum (FHSS) to avoid
interference Transmitter hops between available frequencies according to specified
algorithm Transmitter operates in sync with receiver A short burst of data is transmitted on a narrowband Transmitter then tunes to another frequency and transmits again -
capable of hopping its frequency over a given bandwidth several times a second
Requires much wider bandwidth than required to transmit the same information using one carrier frequency
Bluetooth Characteristics (III)
Supports two kinds of links Asynchronous Connectionless (ACL) for data transmission Synchronous Connection Oriented (SCO) for audio/video
Maximum effective rate around 700 kbps in asymmetric ACL link Symmetric ACL allows data rates of around 400 kbps
Piconets
Nodes can assume the role of master or slave One or more slaves can connect to a master, forming a piconet The master sets the hopping pattern for the piconet, and all
slaves must synchronize to that pattern: All units share the same channel
Maximum of 7 slaves controlled by a master (How many address bits are required?)
Bluetooth radios are symmetric - same device can act as both master and slave
Slaves are not allowed to talk to each other directly Other operational states (low power)
Parked: Device does not participate in the piconet, synchronized to the master and can be quickly reactivated
Standby: Device does not participate in the piconet, occasionally monitoring, not synchronized
Master
P
SB
SB
SB
Operational States
Slave
Parked*
Standby*
* Low power states
A piconet
M
S
S
S
S
Operational States
Initially, devices know only about themselves No synchronization Everyone monitors in standby mode (performs inquiry or page
scan for 10 ms every 1.28 seconds Power consumption in standby mode is reduced by over 98% All devices have the capability of serving as master or slave
Devices in this illustration are in the same mode but are not synchronized or coordinated - listening at different times and on different frequencies
D
A E
B C
F H
G
Forming a Piconet (I)
Unit establishing the piconet automatically becomes the master It sends an inquiry to discover other devices out there
Inquiry procedure: Enables a device to discover which devices are in range and determine the addresses and clocks for devices
Paging procedure: Establishes an actual connection; only bluetooth device address is required to setup the connection
Master and slave exchange packet using channel access code and master clock
Addressing Active devices are assigned a 3-bit active member address
(AMA) Parked devices are assigned an 8-bit parked member address
(PMA) Standby devices do not need an address
Forming a Piconet (II)
D
A
10 meters
H M
N
L
P
O
Q
B
C
F
K J
G
I
E
H
Note that a device can be “Undiscoverable”
Inquiry
disconnected
connecting
active
detach
standby
inquiry page
Transmit
AMA
Connected
AMA
Park
PMA
Hold
AMA
Sniff
AMA low power
States
Device in standby listens periodically
If a device wants to establish a piconet, it sends an inquiry, broadcast over all wake-up carriers
It will become the master of the piconet
If inquiry was successful, device enters page mode
Devices in standby may respond to the inquiry with its device address
It will become a slave to that master
standby
inquiry page
Transmit
AMA
Connected
AMA
Park
PMA
Hold
AMA
Sniff
AMA
Connecting to a Piconet
After receiving a response from devices, the master can connect to each device individually
An AMA is assigned
Slaves synchronize to the hopping sequence established by the master
In active state, master and slaves listen, transmit and receive
A disconnect procedure allows devices to return to standby mode
standby
inquiry page
Transmit
AMA
Connected
AMA
Park
PMA
Hold
AMA
Sniff
AMA
Page and Connect States
Sniff state
Slaves listen to the piconet at a reduced rate
Master designates certain slots to transmit to slaves in sniff state
Hold state
Only internal timer is running
Slave stops ACL transmission, but can exchange SCO packets
Park state
Slave releases its AMA
Still FH synchronized and wakes up periodically to listen to beacon
standby
inquiry page
Transmit
AMA
Connected
AMA
Park
PMA
Hold
AMA
Sniff
AMA
Low Power States
Piconets with overlapping coverage use different hopping sequences
Collisions may occur when multiple piconets use the same carrier frequency at the same time
Higher probability of collision with more piconets
Devices can participate in multiple piconets simultaneously, creating a scatternet
A device can only be the master of one piconet at a time
A device may serve as master in one piconet and slave in another
A device may serve as slave in multiple piconets
Scatternets (I)
J
F
I
E
A
G
D
M
O B
L
H
K
C
N
P
Q
Scatternets (II)
top related