computer communication, networks, &...

18
Mobile & Pervasive Computing CSC 332 - Fall 2019 Computer Communication, Networks, & Protocols

Upload: others

Post on 12-Jul-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Computer Communication, Networks, & Protocolscsweb.cs.wfu.edu/~pauca/csc332/8-Communication.pdf · Computer Communications • Computer-to-computer communications • Process in which

Mobile & Pervasive ComputingCSC 332 - Fall 2019

Computer Communication, Networks, & Protocols

Page 2: Computer Communication, Networks, & Protocolscsweb.cs.wfu.edu/~pauca/csc332/8-Communication.pdf · Computer Communications • Computer-to-computer communications • Process in which

Computer Communications• Computer-to-computer communications

• Process in which two or more computers/devices transfer data or instructions

• Elements

• Sending computer/device

• Initiates instruction to transmit data

• Communication hardware

• Connects sending device to a transmission media

• Transmission media

• Link between the devices

• Communication hardware

• Connects the transmission media to the receiving device

• Receiving computer/device

• Accepts transmission of data

• Protocols

• Established rules specifying how communication takes place

Page 3: Computer Communication, Networks, & Protocolscsweb.cs.wfu.edu/~pauca/csc332/8-Communication.pdf · Computer Communications • Computer-to-computer communications • Process in which

Examples• Ethernet communication

• Serial communication

softether.org

Page 4: Computer Communication, Networks, & Protocolscsweb.cs.wfu.edu/~pauca/csc332/8-Communication.pdf · Computer Communications • Computer-to-computer communications • Process in which

Computer Communications• Scale

• Embedded communication

• E.g. between devices and peripherals

• Network communication

• Between computers in a wired or wireless network

Page 5: Computer Communication, Networks, & Protocolscsweb.cs.wfu.edu/~pauca/csc332/8-Communication.pdf · Computer Communications • Computer-to-computer communications • Process in which

Embedded Communication Protocols• Dictate communication between embedded devices

• E.g. microcontroller and sensor, Arduino and computer

• Generally over a physical wire

• Devices must share same protocol to swap data

• Lots of protocols exist, but generally classified as

• Parallel

• Transfer multiple bits at same time

• Require many I/O lines (e.g. wires)

• E.g. transfer 1 byte at the time

• Serial

• Transfer one bit at the time

• Operate on one I/O line

• E.g. stream byte (little endian or big endian) one bit at the time

• Also classified as• Asynchronous, e.g. RS-232, TTL

• Synchronous, e.g. SPI, I2C, 1-Wire

Page 6: Computer Communication, Networks, & Protocolscsweb.cs.wfu.edu/~pauca/csc332/8-Communication.pdf · Computer Communications • Computer-to-computer communications • Process in which

Serial Communication• Asynchronous serial communication

• No signal clock (uses fixed baud rate instead)

• E.g. RS-232 protocol and transistor-transistor logic (TTL)

• Two data lines, Rx and Tx

• RS-232 uses positive and negative voltage (+/- 13V)

• TTL uses 0 to 3V or 5V and ground wire

• Data transmitted in frames

• Start bit, data bits, parity bit, stop bits

• Handled typically by UART hardware

• E.g. FTDI tool

Page 7: Computer Communication, Networks, & Protocolscsweb.cs.wfu.edu/~pauca/csc332/8-Communication.pdf · Computer Communications • Computer-to-computer communications • Process in which

• Serial peripheral interface (SPI)

• Clock signal tells receiver when to sample the data line

• Master generates clock signs

• MOSI: Data sent from master to slave

• MISO: Data sent from slave to master

• SS: slave select

• SS tells receiver to wake up

• Also used with multiple slaves

• Doesn’t require UART

• Programming in Arduino

• Using shiftln() and shiftOut()

• Using the SPI library

Synchronous Serial Communication

Page 8: Computer Communication, Networks, & Protocolscsweb.cs.wfu.edu/~pauca/csc332/8-Communication.pdf · Computer Communications • Computer-to-computer communications • Process in which

Synchronous Serial Communication

• Inter-Integrated Circuit (I2C)

• Also called Two Wire Interface (TWI)

• Allows multiple masters and slaves connected using just two wires

• SPI requires additional pin per slave

• Can support up to 1008 devices

• Hardware a bit more complex than SPI

• Used by

• EEPROM memory

• RAM memory

• Temp, gas, air pollution sensors

• Displays

Page 9: Computer Communication, Networks, & Protocolscsweb.cs.wfu.edu/~pauca/csc332/8-Communication.pdf · Computer Communications • Computer-to-computer communications • Process in which

Network Communication• Computer Network

• Collection of nodes and links between nodes

• Nodes

• Computer/devices sending/receiving data

• Links

• Transmission media, e.g. electrical cable, optical fiber, radio waves

• Network topologies

• Layout or organizational hierarchy between connected nodes

• Communication models

• E.g. client/server, point-to-point

• Governed typically by some communications protocol

Page 10: Computer Communication, Networks, & Protocolscsweb.cs.wfu.edu/~pauca/csc332/8-Communication.pdf · Computer Communications • Computer-to-computer communications • Process in which

Examples

• Our Ubicomp network will have a star topology

Page 11: Computer Communication, Networks, & Protocolscsweb.cs.wfu.edu/~pauca/csc332/8-Communication.pdf · Computer Communications • Computer-to-computer communications • Process in which

Geographic Scale• Wide Area Network (WAN)

• Long distances using leased lines, frame relay, SONET/SDH, cellular networks, microwave

• IEEE 802.16 “WiMAX” is an emerging standard for wireless broadband communication

• Local Area Network (LAN)

• Relative shorter distances, confined to buildings, organizations, etc.

• IEEE 802.11 “WiFi” is a common standard

Page 12: Computer Communication, Networks, & Protocolscsweb.cs.wfu.edu/~pauca/csc332/8-Communication.pdf · Computer Communications • Computer-to-computer communications • Process in which

Geographic Scale• Personal Area Network (PAN)

• Network of devices around a person

• mobile phones, wireless headphone, printers

• IEEE 802.15 family - Bluetooth (802.15.1) and ZigBee (802.15.4 - 10:100 meters)

• Body Area Networks (BAN)

• Devices worn or embedded in the body

• Medical applications

Page 13: Computer Communication, Networks, & Protocolscsweb.cs.wfu.edu/~pauca/csc332/8-Communication.pdf · Computer Communications • Computer-to-computer communications • Process in which

Transmission Media• Transmission media types

• Wired technologies: physical media, e.g.

• Electric cables

• Twisted pair (e.g. ethernet cable), speed 2 Mbits/s - 10 Gbits/s

• Coaxial cable (e.g. cable tv), speed 200 - 500 Mbits/s

• Optical fiber (e.g. undersea cable), speed 100 Mbits/s - 100 Gbits/s

• Wireless technologies: radio or other electromagnetic means, e.g.

• Radio waves, 30 Hz to 300 GHz, long distances

• infrared (300 GHz to 430 THz), short range, requires line-of-sight

• targeted lasers, free-space optical communication

• LiFi (LED), infrared and visible spectra

Page 14: Computer Communication, Networks, & Protocolscsweb.cs.wfu.edu/~pauca/csc332/8-Communication.pdf · Computer Communications • Computer-to-computer communications • Process in which

Radio Bands• Data transmission through radio waves

• Alter the frequency, amplitude or phase

• Frequency or phase modulation are most common

• Radio frequency properties

• signal propagates over the horizon (low frequency)

• Antenna size

• Electronics and shielding requirements

• Susceptibility to reflection

• The radio frequency spectrum is highly controlled

• Different frequency bands are separately allocated, e.g.

• licensed allocations

• unlicensed allocations, e.g. amateur radio for public use

Page 15: Computer Communication, Networks, & Protocolscsweb.cs.wfu.edu/~pauca/csc332/8-Communication.pdf · Computer Communications • Computer-to-computer communications • Process in which

Frequency Bands• VLF, LF 3 - 300 kHz

• Maritime, time signals, beacons, RFID

• MF 300kHz - 3 MHz

• AM, coax, twisted pair

• HF 3 - 30 MHz

• Lowest over horizon radio, short-wave radio, over-horizon radar, RFID, radio-telephones

• VHF 30 - 300 MHz

• FM radio, twisted pair wired use ends

• UHF 300 MHz - 3 GHz

• TV, writes coax use ends, ZigBee, GPS, Bluetooth, microwave oven

• Several other bands in this range, i.e. ISM Bands, GSM-900, GSM-1800

• SHF 3 - 30 GHz

• Satellite, radar, wireless LAN

• 5.8 GHz IEEE 802.11 wireless LANS

• EHF 30 - 300 GHz

• Microwave links

Page 16: Computer Communication, Networks, & Protocolscsweb.cs.wfu.edu/~pauca/csc332/8-Communication.pdf · Computer Communications • Computer-to-computer communications • Process in which

http://theconversation.com/wireless-spectrum-is-for-sale-but-what-is-it-11794

Page 17: Computer Communication, Networks, & Protocolscsweb.cs.wfu.edu/~pauca/csc332/8-Communication.pdf · Computer Communications • Computer-to-computer communications • Process in which

Key Physical Characteristics• Channels

• Bandwidth determined by demand and complexity of signal

• Multiple channels per band for various usages (e.g. up/down links)

• Signal often spread across the full channel width for communication efficiency.

• E.g. direct sequence spread spectrum (DSSS) and frequency hopping

• Propagation of signal

• Inversely proportional to frequency

• Affected also by:

• environment

• transmitted power

• antenna design

• Spatial capacity

• IEEE 802.11 g has capacity <400 kb/s/m2 at 54 Mb/s, communication overhead, max 4 independent networks within a 100 m range

• Bluetooth has capacity <25 kb/s/m2 at 1Mb/s data rate, less overhead, max 20 independent networks within a 10 m range

Page 18: Computer Communication, Networks, & Protocolscsweb.cs.wfu.edu/~pauca/csc332/8-Communication.pdf · Computer Communications • Computer-to-computer communications • Process in which

Communication Challenges• Range

• Reception range

• Detection range

• Interference range, affects spatial capacity and density of transmitters

• Error

• Detecting and correcting error

• Backward error correction (check sum), forward error correction (redundancy), graceful degradation

• Wireless networks

• Overhead of error detection is large

• Interference creates bursty errors, ACK may increase collision opportunities, more messages mean more power usage

• Security

• Physical access control

• Difficult in wireless networks, eavesdropping

• Security requirements

• Limited signal propagation

• Access control for joining networks

• Data encryption

• Privacy/identity patterns

• Identity

• People share devices, equipment, move between networks, multiple identities, etc.