49
Wireless Communication CS 447– Wireless Embedded Systems

Wireless Communicationclasses.engr.oregonstate.edu/eecs/winter2018/cs447/lectures/lecture_12.pdf802.15.4 MY –16-bit source address •Each radio in WSN must have uniqueMY address,

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Wireless Communicationclasses.engr.oregonstate.edu/eecs/winter2018/cs447/lectures/lecture_12.pdf802.15.4 MY –16-bit source address •Each radio in WSN must have uniqueMY address,

WirelessCommunication

CS447– WirelessEmbeddedSystems

Page 2: Wireless Communicationclasses.engr.oregonstate.edu/eecs/winter2018/cs447/lectures/lecture_12.pdf802.15.4 MY –16-bit source address •Each radio in WSN must have uniqueMY address,

Outline

• 802.11- Wi-Fi• Bluetooth• WiMAX• Cellular• Satellite• 802.15.4

January31,20181

Page 3: Wireless Communicationclasses.engr.oregonstate.edu/eecs/winter2018/cs447/lectures/lecture_12.pdf802.15.4 MY –16-bit source address •Each radio in WSN must have uniqueMY address,

802.11– WiFi

• WLAN– wirelesslocalareanetwork• 2.4GHzradioband(mosttypical)• 14channels• MediaAccessControl(MAC),PhysicalLayer(PHY)standards

January31,20182

Page 4: Wireless Communicationclasses.engr.oregonstate.edu/eecs/winter2018/cs447/lectures/lecture_12.pdf802.15.4 MY –16-bit source address •Each radio in WSN must have uniqueMY address,

802.11– WiFi

• Accesspoint – allowsWiFi devicetoconnecttowirednetwork• APssupportmultipleconnecteddevices

January31,20183

Page 5: Wireless Communicationclasses.engr.oregonstate.edu/eecs/winter2018/cs447/lectures/lecture_12.pdf802.15.4 MY –16-bit source address •Each radio in WSN must have uniqueMY address,

802.11– WiFi

• Ad-hoc– allowsdirectcommunicationbetweendeviceswithout anintermediaryaccesspoint• Aka“ad-hocWiFi”

January31,20184

Page 6: Wireless Communicationclasses.engr.oregonstate.edu/eecs/winter2018/cs447/lectures/lecture_12.pdf802.15.4 MY –16-bit source address •Each radio in WSN must have uniqueMY address,

802.11– WiFi

Wi-Fihasmanymoredetails• Encryption• SSID• Rangeextenders• …

IoT LabhasXbee WiFimodulesyoucanrent• Configurationcanbechallenging..

January31,20185

Page 7: Wireless Communicationclasses.engr.oregonstate.edu/eecs/winter2018/cs447/lectures/lecture_12.pdf802.15.4 MY –16-bit source address •Each radio in WSN must have uniqueMY address,

Outline

• 802.11- Wi-Fi• Bluetooth• WiMAX• Cellular• Satellite• 802.15.4

January31,20186

Page 8: Wireless Communicationclasses.engr.oregonstate.edu/eecs/winter2018/cs447/lectures/lecture_12.pdf802.15.4 MY –16-bit source address •Each radio in WSN must have uniqueMY address,

Bluetooth

• Intendedforshortdistances• 2.4GHzradioband• PAN– PersonalAreaNetwork• IEEE802.15.1standard(historical)• 79designatedchannels• Datarate:~25Mbits /second• Range:~10meters

January31,20187

Page 9: Wireless Communicationclasses.engr.oregonstate.edu/eecs/winter2018/cs447/lectures/lecture_12.pdf802.15.4 MY –16-bit source address •Each radio in WSN must have uniqueMY address,

Bluetooth

• Master/Slavearchitecture• Mastercancommunicatewithupto7devices• Piconet – ad-hocnetworkusingBluetoothtechnology• Round-robin schedulingofslavecomm• Hasbroadcastmode(littleused)

ManyBluetooth“breakout”modulesavailable• E.g.,Sparkfun BlueSMiRF Silver~$25

January31,20188

Page 10: Wireless Communicationclasses.engr.oregonstate.edu/eecs/winter2018/cs447/lectures/lecture_12.pdf802.15.4 MY –16-bit source address •Each radio in WSN must have uniqueMY address,

Outline

• 802.11- Wi-Fi• Bluetooth• WiMAX• Cellular• Satellite• 802.15.4

January31,20189

Page 11: Wireless Communicationclasses.engr.oregonstate.edu/eecs/winter2018/cs447/lectures/lecture_12.pdf802.15.4 MY –16-bit source address •Each radio in WSN must have uniqueMY address,

WiMAX

• WorldwideInteroperabilityforMicrowaveAccess• IEEE802.16standardforPHY,MAClayers• “Lastmilewirelessbroadbandaccess”• NotareplacementforWiFi• AlternativetocableorDSL• Datarate:~30Mbit/sec• Range:~10miles• DoesNOTrequirelineofsight(LOS)

January31,201810

Page 12: Wireless Communicationclasses.engr.oregonstate.edu/eecs/winter2018/cs447/lectures/lecture_12.pdf802.15.4 MY –16-bit source address •Each radio in WSN must have uniqueMY address,

WiMAX

Usages:• BackhaulservicetotransferdatawithinanISPnetwork

• Provideinternetaccessforusersinremotelocations(layingcabletooexpensive)

• Formofmobileinternetaccess(competesw/cellular,satellite)

January31,201811

Page 13: Wireless Communicationclasses.engr.oregonstate.edu/eecs/winter2018/cs447/lectures/lecture_12.pdf802.15.4 MY –16-bit source address •Each radio in WSN must have uniqueMY address,

WiMAX

Howtouse:• Basestations– installedbyserviceproviders• Receivers– installedwithinclients

January31,201812

Page 14: Wireless Communicationclasses.engr.oregonstate.edu/eecs/winter2018/cs447/lectures/lecture_12.pdf802.15.4 MY –16-bit source address •Each radio in WSN must have uniqueMY address,

WiMAX

January31,201813

Page 15: Wireless Communicationclasses.engr.oregonstate.edu/eecs/winter2018/cs447/lectures/lecture_12.pdf802.15.4 MY –16-bit source address •Each radio in WSN must have uniqueMY address,

Outline

• 802.11- Wi-Fi• Bluetooth• WiMAX• Cellular• Satellite• 802.15.4

January31,201814

Page 16: Wireless Communicationclasses.engr.oregonstate.edu/eecs/winter2018/cs447/lectures/lecture_12.pdf802.15.4 MY –16-bit source address •Each radio in WSN must have uniqueMY address,

Cellular

• 2G,3G,4G=>800MHzfrequencyband• Datarate(4G):100Mbits /sec(max)forhighmobility• Datarate(4G):1Gbit /sec(max)forlowmobility• Manyprotocols:GSM,LTE,GPRS

Manycellmodemsavailable:• E.g.,adafruit FONA3G+GPS

January31,201815

Page 17: Wireless Communicationclasses.engr.oregonstate.edu/eecs/winter2018/cs447/lectures/lecture_12.pdf802.15.4 MY –16-bit source address •Each radio in WSN must have uniqueMY address,

Cellular

GSM:GlobalSystemforMobile(Communication)• Europeanstandard• 2nd generationdigitalcellnetworkprotocol• >90%marketshare• 190+countries

January31,201816

Page 18: Wireless Communicationclasses.engr.oregonstate.edu/eecs/winter2018/cs447/lectures/lecture_12.pdf802.15.4 MY –16-bit source address •Each radio in WSN must have uniqueMY address,

Cellular

LTE:Long-TermEvolution• Commonlymarketedas4GLTE• Goal:increasecapacityandspeedofwirelessdatanetworks• Utilizesdigitalsignalprocessingtechniquesandmodulations• LTEincompatiblewith2Gand3Gnetworks• Mustbeonseparateradiospectrum

January31,201817

Page 19: Wireless Communicationclasses.engr.oregonstate.edu/eecs/winter2018/cs447/lectures/lecture_12.pdf802.15.4 MY –16-bit source address •Each radio in WSN must have uniqueMY address,

Cellular

GPRS:GeneralPacketRadioService• Packetorientedmobiledataservice• 2Gand3Gnetworks• ExtendsGSM• SMSmessaging(upto30perminute)• “alwayson”internet

• E.g.,Sparkfun GSM/GPRSModule

January31,201818

Page 20: Wireless Communicationclasses.engr.oregonstate.edu/eecs/winter2018/cs447/lectures/lecture_12.pdf802.15.4 MY –16-bit source address •Each radio in WSN must have uniqueMY address,

Outline

• 802.11- Wi-Fi• Bluetooth• WiMAX• Cellular• Satellite• 802.15.4

January31,201819

Page 21: Wireless Communicationclasses.engr.oregonstate.edu/eecs/winter2018/cs447/lectures/lecture_12.pdf802.15.4 MY –16-bit source address •Each radio in WSN must have uniqueMY address,

Satellite

E.g.,IridiumNetwork• 66activesatellites• Transceiversanywhereonearth’ssurface• Voiceanddatacoverageforsatellitephones• ~$1.00perminuteofphoneuse• SupportsTCP/IP

January31,201820

Page 22: Wireless Communicationclasses.engr.oregonstate.edu/eecs/winter2018/cs447/lectures/lecture_12.pdf802.15.4 MY –16-bit source address •Each radio in WSN must have uniqueMY address,

Satellite

E.g.,Iridium9603• Transceiversarepowerhungry(~1.3Ampsintransmitmode)• Relativelyslowdatarates(~3kbits /sec)• ~1secondround-triplatency

E.g.,Sparkfun RockBLOCK Mk2• Iridium9602brokenout

January31,201821

Page 23: Wireless Communicationclasses.engr.oregonstate.edu/eecs/winter2018/cs447/lectures/lecture_12.pdf802.15.4 MY –16-bit source address •Each radio in WSN must have uniqueMY address,

Outline

• 802.11- Wi-Fi• Bluetooth• WiMAX• Cellular• Satellite• 802.15.4

January31,201822

Page 24: Wireless Communicationclasses.engr.oregonstate.edu/eecs/winter2018/cs447/lectures/lecture_12.pdf802.15.4 MY –16-bit source address •Each radio in WSN must have uniqueMY address,

802.15.4

• Radiosyou’lluse• Reliable• Powerefficient• Lowdatarate• Designedforwirelesssensornetworks(WSNs)• IEEE802.15.4standardforMACandPHY

January31,201823

Page 25: Wireless Communicationclasses.engr.oregonstate.edu/eecs/winter2018/cs447/lectures/lecture_12.pdf802.15.4 MY –16-bit source address •Each radio in WSN must have uniqueMY address,

802.15.4

• 900MHzor2.4GHzfrequencybands• 16-bitaddressing(short)• Ifneeded,64-bitextendedaddressing• Linkqualitymetrics• CarrierSenseMultipleAccesswCollisionAvoidance(CSMA-CA)• Built-inacknowledgements(acks)fortransferreliability

January31,201824

Page 26: Wireless Communicationclasses.engr.oregonstate.edu/eecs/winter2018/cs447/lectures/lecture_12.pdf802.15.4 MY –16-bit source address •Each radio in WSN must have uniqueMY address,

802.15.4

Startopology:• Communicationestablishedbetweendevicesandsinglecentralcontroller(PANcoordinator)

• Controllerroutespacketstoendpoints(viaaddressing)

January31,201825

Page 27: Wireless Communicationclasses.engr.oregonstate.edu/eecs/winter2018/cs447/lectures/lecture_12.pdf802.15.4 MY –16-bit source address •Each radio in WSN must have uniqueMY address,

802.15.4

Peer-to-Peertopology:• Anydeviceabletocommunicatewithanyotherdevicewithinrange• P2Pallowscomplexnetworkformations(e.g.,meshnetwork)• Allowsmultiplehopstoroutemessages(applicationlayer)

January31,201826

Page 28: Wireless Communicationclasses.engr.oregonstate.edu/eecs/winter2018/cs447/lectures/lecture_12.pdf802.15.4 MY –16-bit source address •Each radio in WSN must have uniqueMY address,

802.15.4

PHY– PhysicalLayer• Enablestransmission/receptionofPHYprotocoldataunits(PPDUs)acrossphysicalradiochannel

Features:• Activates/deactivatesofradiotransceiver• Energydetection• Channelselection• Clearchannelassessment• LQI– linkqualityindicator(forRSSI)

January31,201827

Page 29: Wireless Communicationclasses.engr.oregonstate.edu/eecs/winter2018/cs447/lectures/lecture_12.pdf802.15.4 MY –16-bit source address •Each radio in WSN must have uniqueMY address,

802.15.4

MACsublayer• Enablestransmission/receptionofMACprotocoldataunits(MPDUs)acrossthePHYdataservice

Features:• Beaconmanagement• Channelaccess• Framevalidation• Ack• Hooksforapplication-layersecurity

January31,201828

Page 30: Wireless Communicationclasses.engr.oregonstate.edu/eecs/winter2018/cs447/lectures/lecture_12.pdf802.15.4 MY –16-bit source address •Each radio in WSN must have uniqueMY address,

802.15.4

Xbee 802.15.4Series1• Indoorrange:200’• Outdoorrange:4000’• Datathroughput:upto96,000bits/second• UARTdatarate:57,600baud(typical)

• Transmitcurrent:~50mApeak• Receivecurrent:~30mA• Operatingvoltage:3.3V

January31,201829

Page 31: Wireless Communicationclasses.engr.oregonstate.edu/eecs/winter2018/cs447/lectures/lecture_12.pdf802.15.4 MY –16-bit source address •Each radio in WSN must have uniqueMY address,

802.15.4

Xbee 802.15.4Series1• ”Transparent”operatingmode(default)• Actslikeinvisiblewire

OthermodesincludeAPIandCommand(advanced)• APImodeallowsmoreadvancedoperations• E.g.,addressingspecificradiomodules

January31,201830

Page 32: Wireless Communicationclasses.engr.oregonstate.edu/eecs/winter2018/cs447/lectures/lecture_12.pdf802.15.4 MY –16-bit source address •Each radio in WSN must have uniqueMY address,

802.15.4

Xbee 802.15.4Series1• Thisclass:applicationlayeraddressing• Basestationradio“broadcasts”• Allend-pointsreceivepacket• Usesapplicationlevellogictodetermineaddressing…

January31,201831

Page 33: Wireless Communicationclasses.engr.oregonstate.edu/eecs/winter2018/cs447/lectures/lecture_12.pdf802.15.4 MY –16-bit source address •Each radio in WSN must have uniqueMY address,

802.15.4

Xbee 802.15.4Series1• WillconnectXbee radiotocomputerviaUSBdongle• Computerwillactasbasestation

January31,201832

Page 34: Wireless Communicationclasses.engr.oregonstate.edu/eecs/winter2018/cs447/lectures/lecture_12.pdf802.15.4 MY –16-bit source address •Each radio in WSN must have uniqueMY address,

802.15.4

Xbee 802.15.4Series1• WillConnectXbee toArduinowithshield• Arduino(s)actasendpointdevicesforWSN• Shieldhasswitch:DLINE,UART• DLINE – communicateb/tcomputerandArduinoUSB• UART – communicateb/tXbee radio

January31,201833

Page 35: Wireless Communicationclasses.engr.oregonstate.edu/eecs/winter2018/cs447/lectures/lecture_12.pdf802.15.4 MY –16-bit source address •Each radio in WSN must have uniqueMY address,

802.15.4

Xbee 802.15.4Series1• YouMUSTconfiguretheradiosbeforeusing

• X-CTUsoftwarepackagefromDigi• https://www.digi.com/products/xbee-rf-solutions/xctu-software/xctu

Mustsetfollowingparameters:• CH – radiochannel• ID – PANID• MY – unique16-bitaddressforeachradio• DL – 16-bitdestinationaddressforeachradio• BD – serialbaudrate

January31,201834

Page 36: Wireless Communicationclasses.engr.oregonstate.edu/eecs/winter2018/cs447/lectures/lecture_12.pdf802.15.4 MY –16-bit source address •Each radio in WSN must have uniqueMY address,

802.15.4

XCTUsoftwareprimer–• ConnectXbee radiotoXbee USBdongle• ConnectUSBdongletocomputer• Download/openXCTU

January31,201835

Page 37: Wireless Communicationclasses.engr.oregonstate.edu/eecs/winter2018/cs447/lectures/lecture_12.pdf802.15.4 MY –16-bit source address •Each radio in WSN must have uniqueMY address,

Click “Discover Devices”

Page 38: Wireless Communicationclasses.engr.oregonstate.edu/eecs/winter2018/cs447/lectures/lecture_12.pdf802.15.4 MY –16-bit source address •Each radio in WSN must have uniqueMY address,

Select port

Click Next >

Page 39: Wireless Communicationclasses.engr.oregonstate.edu/eecs/winter2018/cs447/lectures/lecture_12.pdf802.15.4 MY –16-bit source address •Each radio in WSN must have uniqueMY address,

Select multiple Baud Rates:960057600115200

Click Finish

Page 40: Wireless Communicationclasses.engr.oregonstate.edu/eecs/winter2018/cs447/lectures/lecture_12.pdf802.15.4 MY –16-bit source address •Each radio in WSN must have uniqueMY address,

January31,201839

XCTU will search for connected radios…

Page 41: Wireless Communicationclasses.engr.oregonstate.edu/eecs/winter2018/cs447/lectures/lecture_12.pdf802.15.4 MY –16-bit source address •Each radio in WSN must have uniqueMY address,

January31,201840

Radio found, select and click “Add selected devices”

Page 42: Wireless Communicationclasses.engr.oregonstate.edu/eecs/winter2018/cs447/lectures/lecture_12.pdf802.15.4 MY –16-bit source address •Each radio in WSN must have uniqueMY address,

January31,201841

Device has been added..

Click on it to configure.

Page 43: Wireless Communicationclasses.engr.oregonstate.edu/eecs/winter2018/cs447/lectures/lecture_12.pdf802.15.4 MY –16-bit source address •Each radio in WSN must have uniqueMY address,

January31,201842

Parameters that can be configured…

Page 44: Wireless Communicationclasses.engr.oregonstate.edu/eecs/winter2018/cs447/lectures/lecture_12.pdf802.15.4 MY –16-bit source address •Each radio in WSN must have uniqueMY address,

January31,201843

E.g., click the ID text field to edit configure the PAN ID of your WSN…

Page 45: Wireless Communicationclasses.engr.oregonstate.edu/eecs/winter2018/cs447/lectures/lecture_12.pdf802.15.4 MY –16-bit source address •Each radio in WSN must have uniqueMY address,

January31,201844

Click Write to configure the radio

Page 46: Wireless Communicationclasses.engr.oregonstate.edu/eecs/winter2018/cs447/lectures/lecture_12.pdf802.15.4 MY –16-bit source address •Each radio in WSN must have uniqueMY address,

January31,201845

Repeat for CH, MY, DL, BD

NOTE: You’ll have to configure allradios in your WSN

Page 47: Wireless Communicationclasses.engr.oregonstate.edu/eecs/winter2018/cs447/lectures/lecture_12.pdf802.15.4 MY –16-bit source address •Each radio in WSN must have uniqueMY address,

802.15.4

CH– channel• sameforallradios inWSN

ID – PANID• sameforallradios inWSN• uniqueforyourteam

BD– baudrate• sameforallradios inWSN(e.g.,57600)

January31,201846

Page 48: Wireless Communicationclasses.engr.oregonstate.edu/eecs/winter2018/cs447/lectures/lecture_12.pdf802.15.4 MY –16-bit source address •Each radio in WSN must have uniqueMY address,

802.15.4

MY– 16-bitsourceaddress• EachradioinWSNmusthaveuniqueMYaddress,e.g.,• 0xBACE forbasestationradio• 0x0001forwirelessnode#1• 0x0002forwirelessnode#2• 0x0003forwirelessnode#3

January31,201847

Page 49: Wireless Communicationclasses.engr.oregonstate.edu/eecs/winter2018/cs447/lectures/lecture_12.pdf802.15.4 MY –16-bit source address •Each radio in WSN must have uniqueMY address,

802.15.4

DL– 16-bitdestinationaddress• Basestationradiomustbroadcast(0xFFFF)• Wirelessnodesmatchbasestation’sMYaddress(e.g.,0xBACE)

January31,201848