Top Banner

of 13

Lecture 5 - Wlan-wpan(1)

Apr 08, 2018

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • 8/6/2019 Lecture 5 - Wlan-wpan(1)

    1/13

    Carrier Sense Multiple Access

    Every station senses the carrier beforetransmitting. If the station detects carrier it deferstransmissionCarrier sense attempts to avoid collision bytesting the signal strength in the vicinity of thetransmitter

    Capture occurs when a receiver is in the reception range oftwo transmitting stations but is able to cleanly receive signalfrom the closer stationInterference occurs when a receiver is in the range of onetransmitting station and slightly out-of-range of anothertransmitting station, but is unable to cleanly receive thecloser stations signalA collision occurs when a receiver is in the reception range oftwo transmitting stations, and is unable to cleanly receivesignal from either station

    B EC DA

    Hidden Station Problem

    A transmits to BC cannot hear A, and transmits data to B

    Problems with CSMA

    A B EDC

    Exposed Station Problem

    C transmits to DB wants to transmit to A, but it refrains for fear of collision

    Problems with CSMA

  • 8/6/2019 Lecture 5 - Wlan-wpan(1)

    2/13

    S1S5

    S3

    S6

    S4

    S2RTS

    Range of S1 Range of S2

    Collision Avoidance Protocol

    (a) S1 sends a Request To Send (RTS) to S2. Any station hearing the RTSmust remain silent long enough for S2 to send CTS back to S1

    S1S5

    S3

    S6

    S4

    S2CTS

    Range of S1 Range of S2

    (b) S2 responds by sending a Clear To Send to S1. Any station hearing CTSmust remain silent for the duration of a data frame which follows CTS

    Collision Avoidance Protocol

    The Basic CSMA/CA Procedure

    S1 sends RTS to S2 including thelength of proposed data.

    S2 replies with CTS alsoincluding the data length.Any station overhearing an RTSdefers all transmissions untilafter the CTS.Any station overhearing a CTSdefers for the length of theexpected data transmission.On receiving the CTS, station S1immediately sends its data.

    S1 S2

    RTS

    CTS

    Data

    ACK for speedy recoveryfrom errors

    IEEE 802.11 - MAC Architecture

    802.11 PHY802.11MAC

    LLCIP

    TCPApplication

    802.11 PHY802.11MAC

    802.3 PHY802.3MAC

    802.3 PHY802.3MAC

    LLCIP

    TCPApplication

    LLC

    Point CoordinationFunction (PCF)

    Distributed Coordination Function (DCF)

    MACExtent

    Used for contentionservices and basis forPCF

    Required forcontention-freeservices

    The MAC sublayer is responsible for channel allocation procedures, PDUaddressing, frame formatting, error checking, fragmentation and reassembly.

    The transmission medium canoperate in the contention mode

    exclusively, or can alternatebetween contention period (CP)and contention free period (CFP).

  • 8/6/2019 Lecture 5 - Wlan-wpan(1)

    3/13

    802.11 Architecture Basic BuildingBlocks

    A Basic Service Set (BSS) is a set of stations thatcommunicate with on another.

    An Independent BSS (IBSS) is a BSS when all the station in theBSS are mobile stations and there is no connection to a wirenetwork. All stations communicate directly with one another. Thereis no relay function in an IBSSInfrastructure BSS. When a BSS includes an access point (AP), theBSS is no longer independent and is called an infrastructure BSS,but referred to simply as a BSS. In an infrastructure BSS, all MSscommunicate with one another via the AP. The AP provides both theconnection to the wired LAN, if any, and the local relay function forthe BSS.

    STA

    STA

    STAAn independent BSS

    Architecture: Extended Service Set(ESS)

    Extended Service Set: Multiple BSSs that are integrated together using APand distribution system. The distribution system (DS) is the mechanism bywhich one AP communicates with another to exchange frames for stations intheir BSSs, forward frames to follow MSs from one BSS to another, andexchange frames with wired networks, if any.An ESS is a set of infrastructure BSSs, where the APs communicate amongthemselves to forward traffic from MSs from one BSS to another.To the outside world, the ESS and all its MSs appears to be a single MAC-layer network where all stations are physically stationary.

    STASTA

    AP

    STA STA

    AP

    IEEE 802.X

    Portal

    Distribution System (DS)

    Examples Usage of the Services

    a

    b

    c

    d

    e

    f

    a) Authenticate and associate with AP1b) Pre-authenticate with AP2

    c) Reassociate with AP2d) Disassociate with AP1e) AP2 may disassociate with all stations (out of service)f) Authenticate and associate with AP3

    AP1

    AP2

    AP3

    MAC Layer

    Duration field indicates the amount of time after theend of the present frame the channel will be allocated

    for successful transmission of the data ormanagement frame.Type: control, data, management (scanning)Subtype: RTS, CTS

    FrameControl

    DurationCon. ID

    Addres s1 Addre ss2 Addres s3SequenceControl CRC

    FrameBody

    Address4

    ProtocolVersion

    Type Subtype To DS From DS LastFragment

    MoreData

    PowerMgt

    Retry WEPOrder

    Octets:

    2 2 6 6 6 2 6 0-2312 4

    Bits:

    2 2 4 1 1 1 1 1 1 1 1

    Standard IEEE 802.11 frame format

  • 8/6/2019 Lecture 5 - Wlan-wpan(1)

    4/13

    Frame Format

    ToDS = 0; FromDS = 0From STA to STA within a BSS

    Address1=Destination as wellas receiver

    Address2=Source as well astransmitter

    ToDS = 1; FromDS = 0From STA to another STA via AP

    Address1=AP that receivesthe frame

    Address2=Source as well astransmitter

    Address3=Ultimatedestination

    ToDS = 0; FromDS = 1From an AP to a destination STA

    Address1=Destination as wellas receiver

    Address2=AP that transmitsthe frame

    Address3=Source of MACframe

    ToDS = 1; FromDS = 1Between 2 Access Points

    Address1=Receiver AP Address2=Sender Address3=Destination STA Address4= Source STA

    The frame contains 4 addresses. The interpretation of thesedepends on the setting of ToDS and FromDS bits:

    Distributed Coordination Function(DCF)

    DCF supports contention services. Each station

    with an MSDU (MAC layer Service Data Unit)queued for transmission must contend for access tothe channel and, once the MSDU is transmitted,must recontend for access to the channel for allsubsequent frames.DCF is based on Carrier Sense Multiple Accesswith Collision Avoidance (CSMA/CA).

    Carrier is sensed at both the air interface (physicalcarrier sensing), the MAC sublayer (virtual carriersensing)

    DCF: Carrier Sensing

    Physical carrier sensing detects the presence ofother STAs by analyzing all detected frames,and also detects activities in the channel viarelative signal strength from other sources.Virtual carrier sensing is done by sendingduration information in the header of RTS, CTS,and data frames.The channel is marked busy if either thephysical or virtual carrier sensing mechanisms

    indicate the channel is busy.

    DCF: Priority

    Priority access to the wireless medium iscontrolled through the used of interframe space

    (IFS) time intervals between transmission offrames.Short IFS ( SIFS - smallest/highest priority)Point Coordination Function IFS ( PIFS )Distributed Coordination Function IFS ( DIFS -largest/lowest priority)

  • 8/6/2019 Lecture 5 - Wlan-wpan(1)

    5/13

    Transmission of an MPDU without RTS/CTS(1)

    When a station senses the channel is idle, the station waitsfor a DIFS period and samples the channel again. If thechannel is still idle, the station transmits an MPDU(Medium Protocol Data Unit)The receiving station calculates the checksum anddetermines whether the packet is received correctly.

    Data

    ACK

    DIFS

    DIFS

    SIFS

    NAV

    Defer AccessBackoff after defer

    Source

    Destination

    Other

    Transmission of an MPDU without RTS/CTS (2)

    Upon receipt of a correct packet, the receiving stationwaits for a SIFS interval and transmits an ACK frame back to the source station.

    When the data is transmitted, the duration field is used tolet all stations in the BSS know how long the medium will be busy. All stations hearing the data frame adjust theirNAV ( Net Allocation Vector) based on the duration fieldvalue, which includes the SIFS interval and the ACK.

    DIFSData

    ACK

    DIFS

    SIFS

    NAV

    Defer AccessBackoff after defer

    Source

    Destination

    Other

    Transmission of an MPDU usingRTS/CTS [1]

    The RTS (20 bytes) and CTS (14 bytes) controlframes are used by a station to reserve channel

    bandwidth prior to the transmission of an MPDUand to minimize the amount of bandwidth wastedwhen collisions occur.

    RTS

    ACK

    DIFS

    NAV (RTS)

    Defer AccessBackoff started

    Source

    Destination

    Other

    CTS

    SIFS

    Data

    SIFS

    DIFS

    NAV (CTS)NAV (data)

    SIFS

    Transmission of an MPDU usingRTS/CTS [2] [For further reading]

    The RTS control frame is first transmitted by the sourcestation (after successfully contending for the channel)with a data or management frame queued fortransmission to a specified destination.All stations in the BSS, hearing the RTS packet, read theduration field and set their NAVs accordingly.The destination station responds to the RTS with a CTSpacket after an SIFS idle period has elapsed.Stations hearing the CTS packet look at the durationfield and again update their NAVsUpon successful reception of the CTS, the source stationis virtually assured that the medium reserved for thetransmission of its MPDU.Note that stations are capable of updating their NAVs based on both RTS and CTS, which helps to combat thehidden terminal problem .

  • 8/6/2019 Lecture 5 - Wlan-wpan(1)

    6/13

    Collision Avoidance Random BackoffProcedure

    Slot_Time = IFS interval, different for each physical implementation.If a station with a frame to transmit initially senses the channel to be busy; then the station waits until the channel becomes idle for a DIFSperiod, and then computes a random backoff time (an integer valuethat corresponds to a number of Slot_Times.)Initially, the station computes a backoff time in the range 0-7. Afterthe medium becomes idle after DIFS period, stations decrement their backoff time until the medium becomes busy again OR the timerreaches zero.If the timer has not reached zero and the medium becomes busy, thestation freezes its timer

    When the timer finally decremented to zero, the station transmit itsframe.If two or more stations decrement to zero at the same time, a collisionwill occur, and each station will have to generate a new backoff timein the range 0-15.

    Point Coordination Function (PCF)

    The PCF is required to coexist with the DCF.The PCF is an optional capability, which isconnection-oriented, and provides contention-free (CF) frame transfer.PCF relies on the point coordinator (PC) toperform polling.The function of the PC is performed by theAccess Point (AP or base station) within each

    BSS.

    PCF: Point Coordination Function [1]

    Stations capable of operating in the CFperiod (CFP) are known as CF-awarestations.The method by which polling tables aremaintained and the polling sequence isdetermined, is left to the implementor .

    B PCF DCF B PCF DCF

    CFP CP CPCFP

    CFP repetition interval CFP repetition interval

    NAV NAV

    Point Coordination Function [2]

    The CFP repetition interval (CFP_Rate) is usedto determine the frequency with which the CFPoccurs.Within a repetition interval, a portion of thetime is allocated to contention-free traffic, andthe remainder is provided for contention-basedtraffic.The CFP repetition interval is initiated by a

    beacon frame (B frame).B is used for synchronization and timing.B is transmitted by the AP.

  • 8/6/2019 Lecture 5 - Wlan-wpan(1)

    7/13

    PCF: PC-to-station transmission [1]

    Source

    PIFS

    SIFS

    Contention free period

    SIFS

    B D1 + PollU1 + ACK

    SIFS

    D2 + ACK+ Poll

    SIFS

    U2 + ACK

    PIFS

    D3 + Poll

    SIFS

    U3 + ACK

    SIFS

    CF-End

    NAV

    PCF: PC-to-station transmission [2]

    At the beginning of each CFP repetition interval, allstations in the BSS update their NAV to the maximumlength of the CFP.During the CFP. The only time stations are permitted totransmit is in response to a poll from the PC or from anACK a SIFS interval after receipt of an MPDU.At the start of CFP, the PC (Point Control) senses themedium. If the medium remains idle for a PIFS interval,the PC transmits a beacon frame to initiate the CFP.

    PCF: PC-to-station transmission [3]

    The PC starts CF transmission a SIFS after the beaconframe by sending a CF-Poll (no data), Data, or Data +CF-Poll frame.

    If a CF-aware station receives a CF-Poll (no data) framefrom the PC, the STA can respond to the PC after a SIFSidle period, with a CF-ACK (no data) or a Data + CF-ACK frame.If the PC receives a Data + CF-ACK frame from astation, the PC can send a Data + CF-ACK + CF-Pollframe to a different station, where the CF-ACK portionof the frame is used to acknowledge receipt of theprevious data frame.

    PCF: PC-to-station transmission [4]

    If the PC transmits a CF-Poll (no data) frame andthe station does not have a data frame to transmit,the station sends a Null Function (no data) frame back to the PC.If the PC fails to receive an ACK for a transmitteddata frame, the PC waits for a PIFS interval andcontinues transmitting to the next station in thepolling list.After receiving the poll from the PC, the stationmay choose to transmit a frame to another station inthe BSS.

  • 8/6/2019 Lecture 5 - Wlan-wpan(1)

    8/13

    PCF: PC-to-station transmission [5]

    When the destination station receives the frame, anACK is returned to the source station, and the PC

    waits a PIFS interval following the ACK frame before transmitting any additional frames.The PC may also choose to transmit a frame to anon-CF-aware station. Upon successful receipt ofthe frame, the station would wait a SIFS intervaland reply with a standard ACK frame.Fragmentation and reassembly are also

    accommodated. Reassembly is the responsibility ofthe destination station.

    Roaming: Moving between accesspoints

    A station decides that the current link quality to its APis too poor. It then starts scanning for another AP.Scanning: Active scanning and passive scanningThe station then selects the best AP for roaming andsends an association request to the selected access point.The new AP answers with an associate response.The new AP inform the DS. The DS updates itsdatabase. The DS can also inform the old AP that thestation is no longer within its BSS.

    Wireless Personal Area Network- Bluetooth

    Multiple Access Scheme

    Bluetooth is based on Frequency Hop SpreadSpectrum (FHSS) or also called FH-CDMA (CodeDivision Multiple Access).It operates in the 2.45 GHz band, hops over a set of79 hop carriers (23 hops for France, Spain and Japan)spaced 1 MHz apart. 1600 hops per second.Time between hops = dwell time = 625 microsecond.A large number of pseudo-random hoppingsequences have been defined.All devices using the same hopping sequence with

    the same phase form apiconet

    The particular sequence is determined by the unitthat controls the FH channel, the master.

  • 8/6/2019 Lecture 5 - Wlan-wpan(1)

    9/13

    Master Slave Relationship

    A FH Bluetooth channel is associated with a piconetwhich consists of one device that acts as master, and allother devices (up to 7) act as slaves.A channel in a piconet is totally controlled by the masterthrough polling. The master is the initializing unit thatsets up connection to one or more slave. Any unit can bethe master of a piconetThe Bluetooth device address (BD_ADDR) of the masterspecifies the frequency-hop sequence and the ChannelAccess Code (CAC). Its system clock determines thePHASE in the hopping sequence and sets the timing

    Link Definition

    Link ManagerFIFO

    FIFOLink Controller

    SCO

    ACL

    DataRadio

    Bluetooth offers 2 types of services:SCO: Synchronous connection-oriented link: symmetrical, point-to-point circuit switched connection between a master and a singleslave. The link is established by reservation of duplex slots at regularintervals.ACL: Asynchronous connectionless link: packet switched, point-to-point using polling. The ACL link is a point-to-multipoint link between the master and all the slaves on the piconet. The ACL linkcan use all the remaining slots on the channel not used for SCO links.

    MAC layer Packet Format

    Channel Access Code (CAC) : identifies a piconet and iscontained in all packets over a piconet channel (include ID of themaster)Device Access Code (DAC): for signalling process, paging andpage response (during Paging)

    Inquiry Access Code (IAC): 2 types:General IAC (GIAC), same for all devices, used to determinewhich other devices are in the range (during Inquiry)Dedicated IAC (DIAC), used within a selected group of devices.

    Access code Packet header Payload

    bits72 54 0-2745

    PREAMBLE SYNC WORD TRAILER

    4 4 1

    Packet

    64

    MSB

    MAC layer Packet Format

    AM_ADDR : Active Member Address: 1 master and 7 slavesType: 16 link types can be definedFlow: flow control over ACL link, FLOW=0 => stop trans. temporarilySEQN: bit sequence numberARQN: Automatic Repeat Request Number. ARQN=0 means an erroroccurred and the packet is retransmitted as the next one.HEC: header error checksum, using Forward error correction (FEC)

    Access code Packet header Payload

    bits72 54 0-2745

    AM_ADDR Type Flow ARQN SEQN HEC

    3 4 81 1 1

    Packet

  • 8/6/2019 Lecture 5 - Wlan-wpan(1)

    10/13

    Packet types [for reading only]ID: fixed 68 bits, contains a DAC oran IAC.NULL: 128 bits, contains no

    payload, receiver to inform senderthe status of last transmission,memoryPOLL: requires ACK from thereceiver, used by sender to poll andslave to respond.FHS: used for frequency hop syncwhen a piconet has not been set upor when changed. 144 info bits + 16CRC bits. Includes device addressand current time of sender.DM1 packets support controlmessages for each type ofconnection. One slot.

    SCO: for voice transmission,no CRC, not retransmittedupon errorHV1: high quality voice.Fixed size payload of 240 bits.10 bytes of info protected by a1/3-FEC, No CRCHV2 20 bytes of info,protected by 2/3-FEC.Payload = 240 bits

    HV3 30 bytes of info. No FECDV: data voice, combinationof data and voice information

    Connection Establishment-What makes one device a master

    Any unit can become a master.The master is defined as the device thatinitiates the establishment of the piconet,and slaves are the devices that enter thepiconet at the request of a potentialmaster (p-master).

    In other words, the master had initiatedthe connection via a page, and the slavehad answered the page.

    A state diagram for establishing point-to-point piconet

    SNIFF

    Standby

    HOLDPARK

    Connection

    Page Inquiry

    Unconnected

    Connectingstates

    Active

    Low powerModes

    Detach

    Releasing AM_ADDR Keep AM_ADDR

    How do units find each other, and howdo they make connection?

    Every device, that is not currently participating in apiconet and not switched off, is in a standby mode.A device enters the inquiry mode if it wants eitherto establish a piconet or to be discovered

    To establish a piconet: It scans for other devices within theradio range. It starts the inquiry procedure by sending an inquiryaccess code (IAC) that is common to all Bluetooth devices. TheIAC is broadcast over 32 so-called wake-up carriers in turn.To be discovered: The device enters the inquiry modeperiodically to search for the IAC messages on the wake-upcarriers. It responds to the inquiry by returning a packetcontaining its device address and timing information required by

    the master to initiate a connection. From then on, the deviceacts as slave

  • 8/6/2019 Lecture 5 - Wlan-wpan(1)

    11/13

    If the inquiry is successful, a device enters thepage mode.

    During the page state two different roles aredefined.The master calculates special hopping sequences (based on thedevice addresses received) to contact each device individually.The message contains the masters ID as well as its clock.The slaves answer and synchronize with the masters clock, i.e.,start with the hopping sequence defined by the master. As soonas a device synchronize to the hopping sequence of the piconetit enters the connection state.

    The connection state comprises of the active stateand the low power states: sniff, hold, and park. Alldevices being active must have the 3-bit activemember address (AM_ADDR).

    Simplified explanation of theINQUIRY PROCESS

    p-master 32 hop freq. seq p-master 32-hop freq. seq

    time

    time

    p-slave

    P-master can cycle through the whole 32-hop sequence on 10ms

    (a)

    11.5 ms

    P-slave listens at a particular frequency hop

    (b)

    Networking

    A group of piconets forms a scatternetEach piconet has only one master, all devices in apiconet has to know the identity of the master and

    synchronized with its hopping sequence.A device can participate in other piconets as in thescatternet, but can be a master in only one piconet.Before leaving one piconet, a slave informs the currentmaster that it will be unavailable for a certain amountof time.As soon as a master leaves a piconet, all traffic withinthis piconet is suspended until the master returns.

    Bluetooth Protocol Stack

    Baseband

    Bluetooth Radio

    LMP

    L2CAP

    RFCOMM

    PPP

    IP

    UDP TCP

    WAP

    WAEvCard/vCal

    OBEX ATCommand

    TCS BIN SDP

    Audio

    Host Controller Interface

  • 8/6/2019 Lecture 5 - Wlan-wpan(1)

    12/13

  • 8/6/2019 Lecture 5 - Wlan-wpan(1)

    13/13

    Where Does ZigBee Fit?

    Range

    P e a

    k D a

    t a R a

    t e

    Closer Farther S l o w e r

    F a s

    t e r

    UWBWireless DataApplications

    Sources: WRH + Co

    Matt Maupin

    WirelessVideo

    Applications

    IrDA

    802.11g

    802.11b

    802.11a

    2.5G/3G

    Bluetooth

    ZigBee

    WirelessSensors

    WirelessNetworking

    Wi-Fi

    Protocol Stack Features

    ZigBeeBased upon theinternational IEEE802.15.4 standard

    IEEE STD 802.15.4Designed byMotorola, Philips andother companies PHY LAYER

    MAC LAYER

    NETWORK/SECURTIYLAYERS

    APPLICATION FRAMEWORK

    APPLICATION/PROFILES

    IEEE

    ZigBeeAlliancePlatform

    ApplicationZigBee Platform Stack

    Silicon

    ZigBee

    ZigBee/802.15.4 Technology:General Characteristics

    Data rates of 250 kbps , 20 kbps and 40kpbs.Star or Peer-to-Peer or Mesh operations.Support for low latency devices.CSMA-CA channel access.Dynamic device addressing.Low power consumption.Using Direct Sequence Spread Spectrum CDMA16 channels in the 2.4GHz ISM band, 10channels in the 915MHz ISM band and onechannel in the European 868MHz band.

    Radio Frequency Identification (RFID)

    Source: Scientific American