Network Layer Overview
Network Layer Overview
TM
ZigBee Stack
ZigBee is built upon the foundations provided by the IEEE 802.15.4 standard.
APSSE-SAP NLSE-SAP
Application Framework
ZPUI
Application Object 1
[On Endpoint 1] APSDE-SAP
NLME-SAP
802.15.4 Architecture:
PHY Frequency Options Network Structure 802.15.4 Device Types Locating Networks Joining / Rejoining Networks Direct / Indirect Data Transmission
Channels
Capable of being the PAN Coordinator Implements processing of Association Request Implements processing of Orphan Notification Implements processing of Start Request Implements processing of Disassociation Notification
Can only associate and communicate with a FFD Reduced stack removes optional components
BEACON BEACON
ScanDuration
CMD_BEACON_REQUEST
Channel n+1
BEACON
ScanDuration
BEACON
MLME_SCAN_confirm( Descriptors )
MAC / PHY
MLME_ASSOCIATE_request() CMD_ASSOCIATE_REQUEST
aResponseWaitTime
ScanDuration
CMD_ORPHAN_NOTIFICATION
Channel n+1
ScanDuration
CMD_COORD_REALIGNMENT
MLME_SCAN_confirm( Descriptors )
Data Transmission:
Direct (FFD
FFD, or RFD
FFD)
The receiving device has its receiver on (RxOnIdle) The data packet can be set unsolicited The MAC schedules it for immediate delivery (using CSMA-CA)
Indirect (FFD
RFD)
The receiving device is asleep with its receiver off The data packet has to be requested (Polled) The FFD MAC stores it for later retrieval by the RFD.
10
802.15.4 Summary
Star network topology Devices communicate only with the Coordinator In-direct data transmission enables small, power efficient, inexpensive solutions to be implemented. But 802.15.4 does not provide multi-hop networking 802.15.4 does not provide mesh networking Enter ZigBee
11
ZigBee Stack
ZigBee is built upon the foundations provided by the IEEE 802.15.4 standard.
APSSE-SAP NLSE-SAP
Application Framework
ZPUI
Application Object 1
[On Endpoint 1] APSDE-SAP
NLME-SAP
ZigBee Device Types Stack Profile, Network Rules Network Management and Addressing Message Routing Route Discovery and Maintenance Security
13
14
15
First one on the scene Selects the time and place (Channel, PANId, Stack Profile)
Acts as IEEE 802.15.4 2003 PAN coordinator (FFD). Also performs as router once network is formed. Not necessarily a dedicated device can
16
Acts as IEEE 802.15.4 2003 coordinator (FFD). Manages local address allocation / de-allocation Participates in multi-hop / mesh routing of messages.
Looks after its ZEDs when it comes to broadcasting and routing messages Maintains Neighbor Table to allow Neighbor Routing
17
RxOnIdle is off
18
Looks for other wireless devices on the channel Looks for other 802.15.4 networks on the channel Weights up channels based on noise level and PANs
19
Stack Profile
20
21
Depth, Capacity
Starts a router
22
nwkMaxDepth
nwkMaxChildren
23
NLDE-DATA.indication
Source Address
24
Tree Routing:
The address tells you where the destination is Simple equation gives route up or route down If LocalAddr < DestAddr < LocalAddr + CSkip(d-1) Route Down Else Route Up
Address 0x0 Depth 0 Depth 1 Depth 2 Depth 3 0x7FFF 0xFFFF
CSkip d= 1 CSkip d= 2
25
Neighbour Routing:
A ZC or ZR maintains a table of devices in its neighbourhood If the target device is physically in range it can send the message directly.
Address 0x0 Depth 0 Depth 1 Depth 2 Depth 3 0x7FFF 0xFFFF
Devices Neighbourhood
26
Mesh Routing:
ZC or ZR maintains a routing table of next hop addresses If the target device has a routing table entry then the message can be sent using this route.
Address 0x0 Depth 0 Depth 1 Depth 2 Depth 3 0x7FFF 0xFFFF
Thats great, but where do the routing table entries come from?
27
command frame
Specialized broadcast frame transmitted throughout the network. Path cost is computed by intermediary nodes on receipt
Nodes pass on the route request if new or better route request Intended destination responds to the route request command frame
Unicast frame, returns along the reverse path Reports the path cost
Nodes pass on the route reply and update their routing tables
28
See if the destination is in the Neighbour Table Check for a Routing Table entry Finally resort to Tree Routing
29
Transmit broadcast message Rebroadcast by local ZRs if it is new. Time & radius limited. ZRs store messages for sleeping ZEDs ZRs issue broadcasts on behalf of sleeping ZEDs
30
The Stack Profile defines the security level in use. Uses Network Key unless Link Key has been applied. Tool box offers both authentication and encryption facilities. Auxiliary Header and Message Integrity Code add overhead to the packet.
nibSecurityLevel 0 1 2 3 4 5 6 7 Security Suite NONE MIC-32 MIC-64 MIC-128 ENC ENC-MIC-32 ENC-MIC-64 ENC-MIN-128
31
32
33
Any Questions
Any Questions
34
Contact Details
Ian Marsden Integration UK Ltd Director, Software Engineering
[email protected] DDI: +44 (0) 1737 227721 Tel: +44 (0) 1737 227722 www.integration.com Cell: +44 (0) 7920 105537 Fax: +44 (0) 1737 227744
35