TNE090 Lecture 4 - weber.itn.liu.se

8
1/22/2013 1 Lecture 4 IEEE standard for wireless sensor IEEE standard for wireless sensor network – IEEE 802.15.4 MAC layer Jingcheng Zhang Linköping University 2013-01-22 1 Content General description: wireless sensor network architecture, topology and function overview IEEE 802 15 4 S ifi ti i d IEEE 802.15.4 Specification: service, message and command frame, function description Example: How is IEEE 802.15.4 utilized in ZigBee protocol MAC association Orphan request Data polling Data Request Lab 1 introduction 2 How much information is contained in IEEE 802.15.4? 323 pages in version 2006 202 pages amendment released in 2007 202 pages amendment released in 2007 How can we read this document? Do not try to remember everything, use it as a reference Clearly know the structure of the document so you know where to find it 3 Fully understand the general description part Get the general idea of each function presented in the document What else can we get by reading standard? The standard shows the best way of description in technical language shows the best way of description in technical language shows the best pattern to draw the message flow shows the best way to organize the document when describing the system show the most logical way to design the system shows you the optimized way to communicate with people by using document. (It is so difficult!) 4

Transcript of TNE090 Lecture 4 - weber.itn.liu.se

1/22/2013

1

Lecture 4IEEE standard for wireless sensorIEEE standard for wireless sensor

network – IEEE 802.15.4 MAC layer

Jingcheng Zhang

Linköping University

2013-01-22

1

ContentGeneral description: wireless sensor network architecture, topology and function overview

IEEE 802 15 4 S ifi ti i dIEEE 802.15.4 Specification: service, message and command frame, function description

Example: How is IEEE 802.15.4 utilized in ZigBee protocolMAC associationOrphan requestData pollingData Request

Lab 1 introduction

2

How much information is contained in IEEE 802.15.4?

323 pages in version 2006 202 pages amendment released in 2007202 pages amendment released in 2007

How can we read this document?Do not try to remember everything, use it as a referenceClearly know the structure of the document so you know where to find it

3

Fully understand the general description partGet the general idea of each function presented in the document

What else can we get by reading standard?

The standardshows the best way of description in technical languageshows the best way of description in technical languageshows the best pattern to draw the message flowshows the best way to organize the document when describing the systemshow the most logical way to design the system

shows you the optimized way to communicate with people by using document. (It is so difficult!)

4

1/22/2013

2

Flash back: Which layers are we talking about this time?

5

• MLDE-SAP• MLME-SAP• PD-SAP• PLME-SAP

Goal of IEEE802.15.4 standard

IEEE Std 802.15.4 defined the protocol and compatibleinterconnection for data communication devices usinginterconnection for data communication devices usinglow-data-rate, low-power, and low-complexity short-rangeradio frequency (RF) transmissions in a wireless personalarea network (WPAN).low-data-ratelow-powerlow-complexityshort rangeshort-range

6

IntroductionThe main objectives of an LR-WPAN are ease of installation, reliable datatransfer, short-range operation, extremely low cost, and a reasonable batterylife, while maintaining a simple and flexible protocol.

Some of the characteristics of an LR WPAN are as follows:Some of the characteristics of an LR-WPAN are as follows:— Over-the-air data rates of 250 kb/s, 100kb/s, 40 kb/s, and 20 kb/s— Star or peer-to-peer operation— Allocated 16-bit short or 64-bit extended addresses— Optional allocation of guaranteed time slots (GTSs)— Carrier sense multiple access with collision avoidance (CSMA-CA)channel access— Fully acknowledged protocol for transfer reliability

Low power consumption

7

— Low power consumption— Energy detection (ED)— Link quality indication (LQI)— 16 channels in the 2450 MHz band, 30 channels in the 915 MHz band,and 3 channels in the868 MHz band

Topology• Two kinds of devices:

• FFD: Full function device• RFD: Reduced function device

8

1/22/2013

3

Special example - Cluster Tree network(not the same cluster tree definition in ZigBee)

9

IEEE 802.15.4 device architecture

10

Function description of PHYThe PHY provides two services: the PHY data serviceand the PHY management service interfacing to thephysical layer management entity (PLME) service accesspoint (SAP) (known as the PLME SAP) The PHY datapoint (SAP) (known as the PLME-SAP). The PHY dataservice enables the transmission and reception of PHYprotocol data units (PPDUs) across the physical radiochannel.The features of the PHY are activation and deactivationof the radio transceiver, energy detection, link qualityidentification, channel selection, clear channel assess-ment and transmitting as well as receiving packetsg g pacross the physical medium.The radio operates at one or more of the followingunlicensed bands:

868–868.6 MHz (e.g., Europe)902–928 MHz (e.g., North America)2400–2483.5 MHz (worldwide)

11

Function description of MAC

The MAC sublayer provides two services: the MAC dataservice and the MAC management service interfacing toservice and the MAC management service interfacing tothe MAC sublayer management entity (MLME) serviceaccess point (SAP) (known as MLME-SAP). The MACdata service enables the transmission and reception ofMAC protocol data units (MPDUs) across the PHY dataservice.The features of the MAC sublayer are beaconmanagement, channel access, GTS management, framevalidation, acknowledged frame delivery, association,and disassociation. In addition, the MAC sub-layerprovides interfaces which can be used to implementapplication-appropriate security mechanisms.

12

1/22/2013

4

Functional overview – Beacon (not utilized in ZigBee)

13

Data transfer model- Data transfer to a coordinator

14

Data transfer model- Data transfer from a coordinator

15

Frame structure

The frame structures have been designed to keep thecomplexity to a minimum while at the same time making themsufficiently robust for transmission on a noisy channel. Each

i t l l dd t th t t ith lsuccessive protocol layer adds to the structure with layer-specific headers and footers. This standard defines four framestructures:

A beacon frame, used by a coordinator to transmit beaconsA data frame, used for all transfers of dataAn acknowledgment frame, used for confirming successful framereceptionA MAC command frame, used for handling all MAC peer entity

l fcontrol transfers

16

1/22/2013

5

Frame field definition

17

Frame field definition

18

Improving probability of successful delivery

CSMA-CA mechanismSynchronized: Wait random slotU h i d W it d tiUn-synchronized: Wait random time

Frame acknowledgment

Data verificationFCS :16 bit of CRC

19

Concept of primitives

•Request: The request primitive is passed from the N-user to the N-layer to request that a service is initiated.•Indication: The indication primitive is passed from the N-layer to the N-user to indicate an internal N layer event that is significant to the N user This event may be

20

indicate an internal N-layer event that is significant to the N-user. This event may be logically related to a remote service request, or it may be caused by an N-layer internal event.•Response: The response primitive is passed from the N-user to the N-layer to complete a procedure previously invoked by an indication primitive.•Confirm: The confirm primitive is passed from the N-layer to the N-user to convey the results of one or more associated previous service requests.

1/22/2013

6

PHY service specifications

21

MAC sub-layer specificationThis clause specifies the MAC sublayer of this standard. The MAC sublayerhandles all access to the physical radio channel and is responsible for the following tasks:

Generating network beacons if the device is a coordinator (not utilized in ZigBee)

Synchronizing to network beacons (not utilized in ZigBee)Supporting PAN association and disassociationSupporting device securityEmploying the CSMA-CA mechanism for channel accessHandling and maintaining the GTS mechanism (Not utilized in ZigBee)Providing a reliable link between two peer MAC entities

22

MAC primitives

23

MLME-ASSOCIATE.request

The MLME-ASSOCIATE.request primitive allows a device to request an association with a coordinator.

Why there is no Logical Channel information in the frame?

24

1/22/2013

7

MLME-ASSOCIATE.response

25

MLME-ORPHAN.Indication

26

MLME-ORPHAN.Response

27

MLME-POLL.request

28

1/22/2013

8

MCPD-Data.Request

29

Lab 1 introduction

First HalfIntroduction of IDE: IAR WB 810 for 8051Introduction of the sniffer softwareIntroduction of Z-Stack from TI

File structureConfigurationImplement your first application

Second HalfUnderstanding MAC frames within the ZigBee message flow

Beacon RequestA i i RAssociation RequestOrphan ResponseData Polling

Try to transmit message using ZigBee even before you know it.

30

Tack så mycket!

www.liu.se

31