Wi-Fi By Jay, Mihai, and Ryan March 24, 2016 1

advertisement
Wi-Fi
By Jay, Mihai, and Ryan
March 24, 2016
1
❖ Overview
➢ History
➢ The Big Picture
❖ IEEE 802.11 Standard
➢ Headers
➢ Payload
AGENDA
❖ Properties of Wi-Fi
➢ Electromagnetic Spectrum
➢ Interference
➢ Range and Throughput
➢ Security and Safety
❖ Wi-Fi with Arduino
❖ Comparisons
2
The World of Wi-Fi
3
Wait a sec….What about Bluetooth and Zigbee?
❖ Currently unsuitable for
internet connectivity
❖ Slow data rate
❖ Time sensitive data may
be an issue
4
The History of Wi-Fi
1971 - ALOHAnet connected the Hawaiian Islands
1975 - The FCC released the ISM (Industrial,
Scientific, and Medical) Radio Bands to the public
1991 - NCR and AT&T created the precursor to the
IEEE standard, and released the first WaveLAN
wireless products
1997 - The first IEEE Wi-Fi protocol was released
1999 - The Wi-Fi Alliance was created to hold the
“Wi-Fi” trademarks
5
Wi-Fi Overview
● The Wi-Fi Alliance defines Wi-Fi
as any wireless local area
network product (WLAN) based
on the IEEE 802.11 standards.
● Transmits data through EM
waves
6
The
BIG Picture
7
The IEEE 802.11 Standard
Defines a set of specifications for implementing a
WLAN computer communication line
Provide the foundation for the Wi-Fi brand wireless
communication network
Specifies use of the 900 MHz, 2.4, 3.6, 5, and 60 GHz
ISM Radio Bands
In the U.S. the 2.4 and 5 GHz bands are used, but the
frequency used varies by country
Specifies the datagrams to be used for Wi-Fi wireless
communication
8
The IEEE 802.11 Standard - Datagrams
9
Datagram - Preamble and PLCP Header
10
Datagrams - Preamble and PLCP Header
Preamble
Allows for synchronization between devices
Tells receiving device that a transmission is
beginning
PLCP (Physical Layer Convergence Protocol)
Header
● Specifies the length and transmission rate
● Contains error correction
● Contains encoding scheme information
● For maximum compatibility, it is transmitted at
the lowest commonly supported rate
11
Datagram - Protocol Data Unit
12
Datagram - Protocol Data Unit
13
Datagrams - Header
● Specifies the form and function of the frame
○ Control, Management, Data
● MAC Addresses - Final Destination, Original
Source, Receiver, Transmitter
● Sequence Control - Assists in reconstructing
unordered frames from the same packet
14
Datagram - Protocol Data Unit
15
Datagrams - Management Frames
● Allow for the maintenance of communication
● Authentication Frame - Used to connect a
device to an access point
● Deauthentication Frame - Used to disconnect a
device from an access point
● There’s a whole list of other Management
Frames on the IEEE 802.11 Wikipedia page too
16
Datagrams - Control and Data Frames
Control Frames
Allow for exchange of Data Frames
between devices
Additional overhead for data frames
Acknowledgment (ACK) Frame Acknowledge a frame has been received
Request to Send (RTS) Frame - Request
time to send data
Data Frames
Data Frames carry packets of data
Data can be from web pages, files, or any
number of other things
Up to 2312 bytes at a time
One set of data may be sent over multiple
datagrams
Clear to Send (CTS) Frame - Approve time
to to send data
17
Datagram - Protocol Data Unit
18
Datagrams - Frame Check Sequence (FCS)
Error Detecting Scheme
Contains a number that is calculated by the source
node based on the data in the frame
Final destination node recalculates the number
Not an error correcting scheme
19
Electromagnetic Spectrum
In the U.S., Wi-Fi is transmitted at 2.4 GHz
or 5 GHz
Each wave transmitted at 2.4 GHz is about
12 cm long
Wi-Fi waves have difficulty passing through
dense objects such as buildings and the
ground
The 2.4 GHz band is shared by many
consumer products, including microwaves
20
Interference
● Choose the correct WLAN channel to
minimize interference
● In the US there are 14 channels
designated in the 2.4 Ghz range spaced 5
MHz apart
○ Effectively only 3 non overlapping
channels (1,6, and 11)
● However, signals are designed to partially
overlap
● Wider channel
○ More data being sent
● Bluetooth technology
● Zigbee
● Consumer Appliances
21
Range and Throughput
● Wi-Fi range varies widely with many
factors
○
Power, frequency band, antenna,
modulation type
● Generally, indoors, Wi-Fi has a range of
around 150 feet, and outdoors it has a
range of around 300 feet
● With specialized equipment, Wi-Fi can
have a range of over 250 miles
● Throughput, or the rate at which the
data is transferred, also varies widely
● The further away from an access point,
the lower the throughput possible
22
Security and Safety
● Wi-Fi is not as secure as wired networks
● Most access points default to not
encrypting data
● Common encryption methods include
Wireless Equivalent Privacy (WEP), Wi-Fi
Protected Access (WPA), and Wi-Fi
Protected Access II (WPA2)
● Wi-Fi does not pose a risk to human
health and safety
● According to the World Health
Organization, “there is no risk from low
level, long-term exposure to Wi-Fi
networks”
23
Connecting an Arduino to the Internet - Hardware
The Arduino Wi-Fi shield (right) allows an Arduino to be connected
to the internet using the 802.11 wireless specification
link
The Wi-Fi shield is physically connected to the main Arduino board
and gives the board Wi-Fi functionality
Arduino communicates with both the Wi-Fi shield's processor and
SD card using the SPI bus
Onboard microSD card slot can be used to store files
24
Connecting an Arduino to the Internet - Software
● Include the WiFi101 library
● Library contains all the code one would need to:
○
Scan networks
○
Connect with no encryption
○
Connect with WEP
○
Connect with WPA
○
Establish a Web Server
○
And much more
● Provides an in depth template with only minor changes needed by
user
#include <SPI.h>
#include <WiFi101.h>
void setup() {
//Initialize serial and wait for port to
open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect.
Needed for native USB port only
}
// scan for existing networks:
Serial.println("Scanning available
networks...");
listNetworks();
}
25
Comparison
Wi-Fi
Bluetooth
ZigBee
Data Rate
11 & 54 Mbps
1 Mbps
250 Kbps & 40 Kbps
Range
50-100 meters
10 meters
10-100 meters
Frequency
2.4 & 5 GHz
2.4 GHz
2.4 GHz & 915 MHz
Complexity
High
Medium
Low
Power
High
Medium
Very Low
Security
Most
Mid
Least
Primary Devices
Computers, Servers,
Phones
Phones, Peripheral
Devices, Automation
Devices
373 Projects, Sensors, Slow
Communication
26
Comparison
Wi-Fi
Bluetooth
ZigBee
Data Rate
11 & 54 Mbps
1 Mbps
250 Kbps & 40 Kbps
Range
50-100 meters
10 meters
10-100 meters
Frequency
2.4 & 5 GHz
2.4 GHz
2.4 GHz & 915 MHz
Complexity
High
Medium
Low
Power
High
Medium
Very Low
Security
Most
Mid
Least
Primary Devices
Computers, Servers,
Phones
Phones, Peripheral
Devices, Automation
Devices
373 Projects, Sensors, Slow
Communication
27
Comparison
Wi-Fi
Bluetooth
ZigBee
Data Rate
11 & 54 Mbps
1 Mbps
250 Kbps & 40 Kbps
Range
50-100 meters
10 meters
10-100 meters
Frequency
2.4 & 5 GHz
2.4 GHz
2.4 GHz & 915 MHz
Complexity
High
Medium
Low
Power
High
Medium
Very Low
Security
Most
Mid
Least
Primary Devices
Computers, Servers,
Phones
Phones, Peripheral
Devices, Automation
Devices
373 Projects, Sensors, Slow
Communication
28
Comparison
Wi-Fi
Bluetooth
ZigBee
Data Rate
11 & 54 Mbps
1 Mbps
250 Kbps & 40 Kbps
Range
50-100 meters
10 meters
10-100 meters
Frequency
2.4 & 5 GHz
2.4 GHz
2.4 GHz & 915 MHz
Complexity
High
Medium
Low
Power
High
Medium
Very Low
Security
Most
Mid
Least
Primary Devices
Computers, Servers,
Phones
Phones, Peripheral
Devices, Automation
Devices
373 Projects, Sensors, Slow
Communication
29
Comparison
Wi-Fi
Bluetooth
ZigBee
Data Rate
11 & 54 Mbps
1 Mbps
250 Kbps & 40 Kbps
Range
50-100 meters
10 meters
10-100 meters
Frequency
2.4 & 5 GHz
2.4 GHz
2.4 GHz & 915 MHz
Complexity
High
Medium
Low
Power
High
Medium
Very Low
Security
Most
Mid
Least
Primary Devices
Computers, Servers,
Phones
Phones, Peripheral
Devices, Automation
Devices
373 Projects, Sensors, Slow
Communication
30
Comparison
Wi-Fi
Bluetooth
ZigBee
Data Rate
11 & 54 Mbps
1 Mbps
250 Kbps & 40 Kbps
Range
50-100 meters
10 meters
10-100 meters
Frequency
2.4 & 5 GHz
2.4 GHz
2.4 GHz & 915 MHz
Complexity
High
Medium
Low
Power
High
Medium
Very Low
Security
Most
Mid
Least
Primary Devices
Computers, Servers,
Phones
Phones, Peripheral
Devices, Automation
Devices
373 Projects, Sensors, Slow
Communication
31
Questions?
32
The IEEE 802.11 Standard - Datagrams
33
Datagrams - Frame Control
●
●
●
●
●
●
●
●
●
●
●
Specifies the form and function of the frame
Protocol Version - Currently 00 (2 bits)
Type - Specifies the WLAN frame type, either management,
control, or data (2 bits)
Subtype - Further specifies the WLAN frame type. Type and
Subtype together specify the exact frame type (4 bits)
ToDS and FromDS - They are useful to identify the address fields
(1 bit each)
More Fragments - Set to a 1 if the packet is spread over multiple
frames. All but the last frame of the packet transmission will have
this set to a 1 (1 bit)
Retry - Set to a 1 when the frame is a retransmission (1 bit)
Power Management - Indicates the power management state of
the frame sender (1 bit)
More Data - used in power save mode to indicate to the station
that more frames are buffered on the AP (1 bit)
Protected Frame - Set to a 1 if the frame body is encrypted (1 bit)
○
Wi-Fi Protected Access (WPA)
○
Wi-Fi Protected Access II (WPA2)
○
Wired Equivalent Privacy (WEP)
Order - Set to a 1 if the packet frames are being sent in strict
order (1 bit)
34
Download