46
Short-range wireless communication technologies Course T-110.5111 Fall 2014 Computer Networks II – Advanced Features Mario Di Francesco Department of Computer Science and Engineering, Aalto University October 27, 2014 Partially based on slides by Matti Siekkinen, reused with permission For classroom use only, no unauthorized distribution

Short-range wireless communication technologies

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Short-range wireless communication technologies

Short-range wireless communicationtechnologiesCourse T-110.5111 Fall 2014Computer Networks II – Advanced Features

Mario Di Francesco

Department of Computer Science and Engineering, Aalto University

October 27, 2014

Partially based on slides by Matti Siekkinen, reused with permissionFor classroom use only, no unauthorized distribution

Page 2: Short-range wireless communication technologies

Summary of the last two weeks

Lecture 6� IEEE 802.15.4 and ZigBee

– network topologies and channel access methods– overview of higher-level features

� wireless sensor networks– taxonomy of energy conservation techniques– beyond sensors: smartphones and Internet-connected objects

Exam week� (practical) work for the assignment� preparation of the report

Short-range wireless communication technologies 2/46M. Di Francesco October 27, 2014Aalto University T-110.5111

Page 3: Short-range wireless communication technologies

Learning outcomes

� Identify short-range wireless communication technologiesused in real products

� List the most important technologieswith specific reference to mobile devices

� Describe the physical and medium accesslayers of relevant technologies

� Compare the different optionsbased on application-specific criteria

� Reflect upon communication technologies beyond radio signals

Short-range wireless communication technologies 3/46M. Di Francesco October 27, 2014Aalto University T-110.5111

Page 4: Short-range wireless communication technologies

Short-range wireless technologies

Major features� distance limited to a few meters or even less� mostly for local network access and

interconnection of personal devices– thus also called personal area networks– special case: body area networks

� usually (but not necessarily) based on radio signals

Several standards� most of them using the unlicensed

Industrial, Scientific and Medical (ISM) frequency bands� availability depends on the actual country� most of them available worldwide

Short-range wireless communication technologies 4/46M. Di Francesco October 27, 2014Aalto University T-110.5111

Page 5: Short-range wireless communication technologies

Source: iFixit Nexus 7 Teardownhttps://www.ifixit.com/Teardown/Nexus+7+Teardown/9623

Page 6: Short-range wireless communication technologies

Identifying technologies� product specifications

– Wi-Fi 802.11a/b/g/n– NFC (Android Beam)– Bluetooth 4.0

� chipsets� antennas

Example

WiFi

Near-Field Communication(NFC)

Global Positioning System(GPS)

Source: iFixit Nexus 7 Teardown

Page 7: Short-range wireless communication technologies

Most important technologies

WiFi� already addressed in a previous lecture

Bluetooth� different versions of the standard

– “regular” Bluetooth or Bluetooth Classic (versions 2 – 3)– Bluetooth Low Energy (BLE) or Bluetooth Smart (version 4)

Near-Field Communication (NFC)� a Radio Frequency Identification (RFID) technology� also supports a (bi-directional) peer-to-peer mode

Short-range wireless communication technologies 7/46M. Di Francesco October 27, 2014Aalto University T-110.5111

Page 8: Short-range wireless communication technologies

Origin of Bluetooth

Special interest group� formed in 1998� by Nokia, Ericsson, Intel,

IBM and Toshiba� as a cable replacement

technology

Name� nickname of Harold

Blåtand Gormsen,King of Denmark(940–985 A.D.)

Image source: http://en.wikipedia.org/wiki/File:Bluetooth.svg

Short-range wireless communication technologies 8/46M. Di Francesco October 27, 2014Aalto University T-110.5111

Page 9: Short-range wireless communication technologies

Bluetooth protocol stack (1 of 3)

2.3.2 Bluetooth Technological Overview

The Bluetooth SIG was formed in May 1998 by the so-called promoter companies, con-sisting of Ericsson, IBM, Intel, Nokia, and Toshiba, and later on 3Com, Lucent, Mi-crosoft, and Motorola. The SIG also contains associate members; participating entitiespay membership fees and, in turn, can vote or propose modifications for the specificationsto come. Adopter companies can join the SIG for free but can only access the oncomingspecifications if these have reached a given evolutional level. The name Bluetooth sup-posedly comes from a Scandinavian history-enthusiast engineer involved in the earlystages of developing and researching this short-range technology, and the name stuck; no-body being able to propose a better one. Bluetooth was the nickname for Harold Blå-tand—“Bluetooth,”—King of Denmark (940–985 A.D.). Bluetooth conquered both Nor-way and Denmark, uniting the Danes and converting them to Christianity. One of themajor goals of the Bluetooth standard is to unite the “communication worlds” of devices,computers, and peripherals and to convert “the wired” into wireless; thus, the analogy.

The Bluetooth specification defines functions for all the layers of the ISO-OSI 7-layerarchitecture; the protocol stack of Bluetooth is depicted in Figure 2.3. Bluetooth is de-signed so that a single chip can implement the bottom three layers with a serial (RS-232,USB, or similar) interface connecting the chip to the controller host through the so-calledHCI (Host Controller Interface).

2.3.2.1 The RF Layer. The physical or RF Layer (Radio Frequency) of Bluetooth isbuilt on a synchronous fast-frequency-hopping paradigm with a symbol rate of 1 Mbpsoperating in the publicly available 2.4 GHz ISM band. In a normal operation mode, Blue-tooth units will change the carrier frequency (hop) 1600 times a second over 79 differentcarrier frequencies separated 1 MHz apart, starting with 2.402 GHz. (Since the 2.4 GHzISM band is not equally available in all countries, e.g., France and Spain, Bluetooth en-ables the operation on a reduced band with only 23 different carrier frequencies.) Themodulation scheme employed is similar to that of GSM, that is, GFSK (Gaussian Fre-

60 OFF-THE-SHELF ENABLERS OF AD HOC NETWORKS

Figure 2.3. Simplified Bluetooth protocol stack.

Applications

Profiles

SDP RFCOMM Telephony

L2CAP

HCI Host

Audio

SCO Baseband

Link Manager

ACL

HCI Client

UART, USB

IEEE802.15.1

RF

c02.qxd 2/17/2004 9:26 AM Page 60

Source: Gergely V. Záruba and Sajal K. Das, “Off-the-shelf enablers of ad hoc networks”, AdHoc Networking, IEEE Press + John Wiley and Sons, August 2004 [Chapter 2, p. 60]

Short-range wireless communication technologies 9/46M. Di Francesco October 27, 2014Aalto University T-110.5111

Page 10: Short-range wireless communication technologies

Bluetooth protocol stack (2 of 3)

Baseband layer� medium access and radio frequency control layer

Link manager� piconet management

– attachment (detachment) of slaves and low-power modes– setting the connection type (see slide 22)

� link configuration– quality of service negotiation– power-control parameters– accepted packet types (e.g., multislot packets)

� security– authentication through the pairing process– (symmetric) encryption

Short-range wireless communication technologies 10/46M. Di Francesco October 27, 2014Aalto University T-110.5111

Page 11: Short-range wireless communication technologies

Bluetooth protocol stack (3 of 3)

Logical link control and adaptation protocol layer (L2CAP)� link control sublayer

– protocol multiplexing– segmentation and reassembly– group management

Higher layers� service discovery protocol (SDP)� serial line emulation protocol (RFCOMM)

Profiles� standardized services for Bluetooth links

– headset, local area network, file transfer and synchronization

Short-range wireless communication technologies 11/46M. Di Francesco October 27, 2014Aalto University T-110.5111

Page 12: Short-range wireless communication technologies

Physical layer

Radio channels� 2.4 GHz ISM band� 79 distinct channels with 1 MHz separation

Frequency hopping spread spectrum� a certain channel is used for a short time� channel are switched at 1,600 hops/s� the hopping sequence is pseudo-random

and unique for each network� adaptive frequency hopping

– devices keep track of the channel quality– channels with high interference are removed

from the hopping sequence

Short-range wireless communication technologies 12/46M. Di Francesco October 27, 2014Aalto University T-110.5111

Page 13: Short-range wireless communication technologies

Adaptive frequency hopping... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...

Time (slots)

Freq

uenc

y (c

hann

els)

good channel bad channel “banned” channel

Short-range wireless communication technologies 13/46M. Di Francesco October 27, 2014Aalto University T-110.5111

Page 14: Short-range wireless communication technologies

Device roles and network types

Master� establishes the

hopping sequence� decides when other

devices communicate� only one master

for each network

Slave� connects to the master� up to 7 active slaves for

each network

Piconet� a master and all the slaves

which are synchronized toits hopping sequence

� maximum 8 active devices(plus inactive ones)

Scatternet� different overlapping

piconets sharing at leastone (bridge) device

Short-range wireless communication technologies 14/46M. Di Francesco October 27, 2014Aalto University T-110.5111

Page 15: Short-range wireless communication technologies

Piconets and scatternets

tiated Beacon window and address the slave to be awaked with the device address orparked address. Parked slaves will also receive an opportunity during the Beacon win-dow to inform the master that they need to be woken up.

Although the main communication unit in Bluetooth is a point-to-multipoint Piconet,the specification allows nodes to participate in more than one Piconet semisimultaneously(note that a node can be a master in only one Piconet), switching between its roles of thedifferent Piconets acting as bridges between Piconets, likely using the Hold mode toschedule between the several Piconets. Two or more overlapping Piconets interconnectedwith bridges in such manner form a Scatternet. Although a Piconet’s topology is a star-shaped point-to-multipoint structure with only a single link between a master and any ofits slaves (single-hop), a Scatternet can represent any type of the possible topologies and,thus, can be used to establish a multihop or ad hoc network (a possible Scatternet is de-picted in Figure 2.4). Other than describing the possibility of forming Scatternets, theBluetooth specification does not address how Scatternets or ad hoc networks should beestablished; it solely provides the possibility to employ Bluetooth as the basis for ad hocnetworking.

2.3.2.3 Link Manager. The Link Manager (LM) layer of Bluetooth fulfils part of thefunctionality of the Logical Link Control sublayer of the OSI-7 architecture. The mainfunctions of the LM are: Piconet management, link configuration, and providing security,that is, authentication and encryption. Right after a slave has been put into a Connectionmode, an ACL link is established between master and slave to manage the Piconet. Man-agement functions include the attachment and detachment of slaves, negotiating piconetparameters, a possible change in the roles (when a slave becomes the new master of thePiconet), the establishment of SCO or ACL links, and the handling of the low-powermodes. The management functions are based on a request–response communicationscheme between the master and the slave, whereby the master requests some parameter tobe changed and the slave either accepts it or challenges it.

The link configuration tasks consist of (i) quality of service negotiations, whereby themaximum polling time is negotiated in a request–response manner and broadcast parame-ters are set up; (ii) negotiation of power-control parameters; (iii) negotiation of acceptedpacket types at both sides, with determination of whether multislot packets will be al-lowed.

2.3 WIRELESS PAN TECHNOLOGIES 63

Figure 2.4. A Bluetooth Scatternet consisting of three Piconets.

Piconets

slave/slave bridgemaster/slave bridge

master-slave relation:

c02.qxd 2/17/2004 9:26 AM Page 63

Note� a bridge is either a master or a slave in the piconets it belongs to

Source: Gergely V. Záruba and Sajal K. Das, “Off-the-shelf enablers of ad hoc networks”, AdHoc Networking, IEEE Press + John Wiley and Sons, August 2004 [Chapter 2, p. 63]

Short-range wireless communication technologies 15/46M. Di Francesco October 27, 2014Aalto University T-110.5111

Page 16: Short-range wireless communication technologies

Multiple access scheme

Contention-free token-based access� the master decides which slave communicates in a slot� polling scheme

– actual details not specified by the standard– baseline: round robin scheduling

Time division duplexing� slots are numbered according to the clock of the master

and correspond to different frequency channels� the duration of a slot is 625 µs� the master uses even slots, slaves use odd slots

Short-range wireless communication technologies 16/46M. Di Francesco October 27, 2014Aalto University T-110.5111

Page 17: Short-range wireless communication technologies

Time division duplexingMulti-slot packet transmission

� slaves can use three or five consecutive slotsfor long messages– in this case the channel does not change

until the master gets the token backBLUETOOTH 119

to higher-level protocols and applications to transmit and re-ceive their messages. The main features supported by L2CAPare:

(i) protocol multiplexing: the L2CAP uses a protocol typefield to distinguish between upper layer protocols;

(ii) segmentation and reassembly: this feature uses two bitsin the payload header, and is required because the Base-band packet size is smaller than the usual size of packetsused by higher layer protocols;

(iii) group management, i.e., the capability to map transpar-ently groups of addresses, i.e., groups of devices, ontopiconets without the need of knowing the Baseband rou-tines;

(iv) quality of service assurance: the L2CAP connection es-tablishment permits the exchange of quality of serviceparameters, and the L2CAP would monitor the resourceto assure the respect of agreed QoS.

The LMP protocol is responsible for the set-up and man-agement of physical links. The management of physical linksconsists of several activities: (i) putting a slave in a particularoperating state (i.e., sniff, hold or park mode), (ii) monitor-ing the status of the physical channel and assuring a prefixedQuality of Service (e.g., LMP settles transmission power, themaximum poll interval, etc.). LMP also implements securitycapabilities at link level.

Finally, RFCOMM is a serial line emulation protocol, i.e.,a cable replacement protocol. It emulates RS-232 control anddata signals over Bluetooth Baseband, providing transport ca-pabilities for upper level services that use serial line as trans-port mechanism.

The other protocols presented in the figure are application-oriented protocol enabling applications to run over Bluetoothdevices. In addition to this protocol layers, the Specificationalso defines a Host Controller Interface that provides a com-mand interface to the baseband controller, link manager, andaccess to hardware status and control registers.

2.1.1. The Bluetooth physical layerA Bluetooth unit consists of a radio unit operating in the2.4 GHz band. In this band are defined 79 different Radio Fre-quency (RF) channels that are spaced of 1 MHz. The physicallayer utilizes as technique of transmission a frequency hop-ping spread spectrum (FHSS) where the hopping sequence isa pseudo-random sequence of 79-hop length, and it is uniquefor each ad hoc network we can establish. Therefore, the es-tablishment of a physical channel is associated to the defin-ition of a channel frequency hopping sequence which has avery long period length and which does not show repetitivepatterns over short time interval. It’s possible to do it by ex-ploiting the actual value of master clock and its unique Blue-tooth device address, a 48-bit address compliant to the IEEE802 standard. The FHSS system has been chosen to reducethe interference of nearby system operating in the same rangeof frequency (for example, IEEE 802.11 WLANs) and make

Figure 2. Multi-slot packet transmissions.

the link robust [8,9]. The nominal rate of hopping between toconsecutive RF is 1600 hop/s.

A Time Division Duplex (TDD) scheme of transmission isadopted. The channel is divided into time slots, each 625 µsin length, and each slot corresponds to a different RF hop fre-quency. The time slots are numbered according to the Blue-tooth clock of the master. The master can transmit in evennumbered time slots. Odd numbered time slots are reservedfor slaves’ transmissions. The frame structure is shown infigure 2. The transmission of a packet nominally covers asingle slot, but it may last up to five consecutive time slots.For multi-slots packets the RF hop frequency to be used forthe entire packet is the RF hop frequency assigned to the timeslot in which the transmission has begun. The changing ofRF used after transmitting or receiving a packet reduces theinterference from signals coming from other radio modules.

The Bluetooth antenna has a nominal power that permit arange for radio link from 10 cm to 10 m. This range can beextended up to 100 m increasing the transmit power.

2.1.2. The Bluetooth Baseband layerThe Baseband layer is responsible for: (i) the set-up of thephysical connections between master and slaves; (ii) the send-ing and receiving of different packets upon the physical chan-nel (channel access); (iii) the synchronization of devices be-longing to a piconet on master clock, and (iv) the manage-ment of the different power saving state which the device canstay in. In the following we will describe in depth points (i)and (ii).

Connections’ type. There are two types of physical linksthat can be established between Bluetooth devices: a Syn-chronous Connection-Oriented (SCO) link, and an Asynchro-nous Connectionless (ACL) link. The first type of physi-cal link is a point-to-point, symmetric connection betweenthe master and a specific slave. It is used to deliver delay-sensitive traffic, mainly voice. In fact the SCO link rate is64 kbps and it is settled by reserving a couple of consecutiveslots for master-to-slave transmission and immediate slave-to-master response. The SCO link can be considered as a circuit-switched connection between the master and the slave. Thesecond kind of physical link, the ACL link, is a connectionbetween the master and all slaves participating to the piconet,and it can be considered as a packet-switched connection be-tween the Bluetooth devices that supports point-to-multipointtransmissions from the master to the slaves. The ACL chan-nel guarantees the reliable delivery of data: a fast Automatic

Source: Raffaele Bruno, Marco Conti, and Enrico Gregori, “Bluetooth: Architecture, Protocolsand Scheduling Algorithms”, Cluster Computing, 5(2):117–131, April 2002

Short-range wireless communication technologies 17/46M. Di Francesco October 27, 2014Aalto University T-110.5111

Page 18: Short-range wireless communication technologies

Frame structure

Different data rates� basic data rate of 1 Mbps� enhanced data rates of 2 and 3 Mbps

Short-range wireless communication technologies 18/46M. Di Francesco October 27, 2014Aalto University T-110.5111

Page 19: Short-range wireless communication technologies

Establishing a Piconet

Device discovery� inquiry process

Device pairing� paging process

Parameter negotiation� initiated by the link manager to set up the connection

ID ID FHS ID ID FHS ID POLL NULL

M

S INQUIRY SCAN BACKOFF

INQUIRY

INQUIRY RESPONSE

PAGE

PAGE SCAN

MASTER RESPONSE

SLAVE RESPONSE

CONNECTION

CONN

Short-range wireless communication technologies 19/46M. Di Francesco October 27, 2014Aalto University T-110.5111

Page 20: Short-range wireless communication technologies

Inquiry phase

Inquiry scan� performed by the device willing to be discovered� periodically listens for inquiry packets

on a special inquiry hopping sequence of 32 frequencies

Inquiry� sends an inquiry packet with a specific inquiry access code� the code indicates who should respond

– either generic or dedicated to certain type of devices

Inquiry response� sends a response packet containing the responding device

address after receiving inquiry message during the inquiry scan� sends the corresponding inquiry hopping response sequence

Short-range wireless communication technologies 20/46M. Di Francesco October 27, 2014Aalto University T-110.5111

Page 21: Short-range wireless communication technologies

Paging phase

Page� master sends a page message to the (addressed) slave� sends a special page hopping sequence of 32 frequencies� master uses the clock information from slave to be paged

Page scan� slave enters page scan state to receive page packets� slave listens to packets addressed to its own address

Page response� entered by the slave upon receiving a page message� send back a page response containing its own address� use frequencies from corresponding page response sequence

– for each page hop there is a corresponding page response hop

Short-range wireless communication technologies 21/46M. Di Francesco October 27, 2014Aalto University T-110.5111

Page 22: Short-range wireless communication technologies

Connection types

Synchronous connection oriented� point-to-point symmetric link between master and a slave� for delay-sensitive traffic (e.g., voice)� reserved slots with maximum rate of 64 kbps

Asynchronous connectionless� point-to-multipoint link between master and all slaves� less priority than the synchronous connection oriented links� reliable message delivery via automatic repeat request (ARQ)

Short-range wireless communication technologies 22/46M. Di Francesco October 27, 2014Aalto University T-110.5111

Page 23: Short-range wireless communication technologies

Bluetooth low energy

History� project initiated by Nokia� Bluetooth Low End Extension (2004)� WiBree (2006)� part of Bluetooth 4.0 (2009)

Features� very low-power and cheap� for a limited amount of data� two implementations

– single mode for low-power devices (e.g., sensors)– dual mode for less constrained devices

Short-range wireless communication technologies 23/46M. Di Francesco October 27, 2014Aalto University T-110.5111

Page 24: Short-range wireless communication technologies

BLE channels

40 channels with 2 MHz spacing

data (non-interfering) data (possibly interfering) advertising

Source: Rolf Nilsson, “Shaping the Wireless Future with Low Energy Applications and Systems”

Short-range wireless communication technologies 24/46M. Di Francesco October 27, 2014Aalto University T-110.5111

Page 25: Short-range wireless communication technologies

BLE features

Protocol stack� simpler: only a few layers

– L2CAP, link layer and physical layer– completely different medium access

� less states– Standby, Advertising, Scanning, Initiating, and Connection

� low-power achieved through a low duty-cycle– devices wake-up periodically for connection events and then sleep

Market availability� besides devkits, recently appeared in off-the-shelf smartphones

– iPhone 4S and 5, iPad 3rd gen, Samsung Galaxy S3� the real (standard) sensor network communication technology

Short-range wireless communication technologies 25/46M. Di Francesco October 27, 2014Aalto University T-110.5111

Page 26: Short-range wireless communication technologies

Conventional radios and tags

Radio transceiver� transmitter and receiver hardware

– powered by an external source, usually a battery– complex signal processing eventually

through an external microcontroller

Radio tag� a possibly battery-less means of identification� radio version of a barcode

– machine-readable description of an object

Image source: Example barcode from Wikimwedia Commons

Short-range wireless communication technologies 26/46M. Di Francesco October 27, 2014Aalto University T-110.5111

Page 27: Short-range wireless communication technologies

Enablers of battery-less communications

Electromagnetic backscatter (radiative coupling)� similar to radar systems

– transmitter sends electromagnetic waves– waves bounce back from an object– transmitter extracts information about the object

based on the reflected signal� up to a few meters range, mostly used in the 915 MHz band

Inductive coupling� similar to a transformer but without a magnetic core

– magnetic flux propagates through free-space– induces a current in the coil of the receiver

� less than one meter range, mostly used in the 13.56 kHz band

Short-range wireless communication technologies 27/46M. Di Francesco October 27, 2014Aalto University T-110.5111

Page 28: Short-range wireless communication technologies

Electromagnetic backscatter

Source: Daniel M. Dobkin, “The RF in RFID – Passive UHF RFID in Practice”, Newnes, Firstedition (September 2007) [Chapter 3 – Radio Basics For UHF RFID, p. 69]

Short-range wireless communication technologies 28/46M. Di Francesco October 27, 2014Aalto University T-110.5111

Page 29: Short-range wireless communication technologies

Load modulation

Note� the modulating signal for the transistor has a low frequency

– much lower than the carrier frequency– modulation circuitery in the tag is cost and power effective

Source: Daniel M. Dobkin, “The RF in RFID – Passive UHF RFID in Practice”, Newnes, Firstedition (September 2007) [Chapter 3 – Radio Basics For UHF RFID, p. 70]

Short-range wireless communication technologies 29/46M. Di Francesco October 27, 2014Aalto University T-110.5111

Page 30: Short-range wireless communication technologies

Inductive coupling

Note� similar scheme for load modulation

Image source: Gorferay Card Services Contactless Card

Short-range wireless communication technologies 30/46M. Di Francesco October 27, 2014Aalto University T-110.5111

Page 31: Short-range wireless communication technologies

RFID roles and communication modes

Initiator� tag reader or� tag reader/writer� probes nearby tags

and waits for a reply

Target� tag� replies back to the initiator

once probed� limited amount of memory� usually less than 1 kB

Passive� exchanges between a

reader/writer and abattery-less tag

� purely based onbackscatter/coupling

Active� exchanges between a

reader/writer and abattery-powered tag

� extends thecommunication range

Short-range wireless communication technologies 31/46M. Di Francesco October 27, 2014Aalto University T-110.5111

Page 32: Short-range wireless communication technologies

RFID standards

ISO-11784� frequency range between 129 and 139.4 kHz� designed for animal tracking with suitable data fields

EM4100� operting frequency of 125 kHz� designed for proximity cards with only a unique identifier

ISO-14443� operting frequency of 13.56 MHz� designed for payment systems and smart cards� different formats

– MIFARE Ultralight and DESFire, ePassports, EMV contactless cards– ISO-14443A tags are compatible with NFC

Short-range wireless communication technologies 32/46M. Di Francesco October 27, 2014Aalto University T-110.5111

Page 33: Short-range wireless communication technologies

Near field communication

Communication modes� same as RFIDs (i.e., initiator and target)� NFC device is usually more powerful than RFIDs

and can also be programmed

Operating modes

reader/writer as the corresponding RFID initiator

card-emulation as the corresponding RFID tag

peer-to-peer bi-directional data exchange

Physical layer� inductive coupling, frequency range of 13.56 MHz� radio specification according to the ISO-14443-2 standard

Short-range wireless communication technologies 33/46M. Di Francesco October 27, 2014Aalto University T-110.5111

Page 34: Short-range wireless communication technologies

NFC protocol stack

Source: Tom Igoe, Don Coleman, and Brian Jepson, “Beginning NFC”, O’Reilly Media, Firstedition (January 2014) [Chapter 2 – NFC and RFID, p. 16]

Short-range wireless communication technologies 34/46M. Di Francesco October 27, 2014Aalto University T-110.5111

Page 35: Short-range wireless communication technologies

NFC Data Exchange Format (NDEF)

Data exchange in NFC� messages are composed of different NDEF records� different record types for different purposes

– applications should know what to do with them

Well-known NDEF record types

simple text a string with metadata (e.g., language and encoding)

URIs a uniform resource indicator

smart posters may include a URI but also other data

signatures trusted data originator

Short-range wireless communication technologies 35/46M. Di Francesco October 27, 2014Aalto University T-110.5111

Page 36: Short-range wireless communication technologies

NFC tag types

# Features Examples

1 based on ISO-14443A, read-only or read/write,96 B to 2 kB of memory, data rate of 106 kbps,no mechanism to prevent collision

Topaz,BCM20203

2 based on ISO-14443A and similar to Type 1,with additional anti-collision mechanisms

MifareUltralight

3 based on ISO-18092 and JIS-X-6319-4 with noauthentication and encryption, read-only orread/write, up to 1 MB per exchange, data ratesof 212 and 424 kbps, anti-collision mechanisms

Sony FeliCa

4 based on ISO-14443A and similar to Type 1; 2, 4or 8 kB of memory, up to 32 kB for exchange; datarates of 106, 212 and 424 kbps; anti-collision

NXP DESFire,SmartMX-JCOP

Short-range wireless communication technologies 36/46M. Di Francesco October 27, 2014Aalto University T-110.5111

Page 37: Short-range wireless communication technologies

NFC peer-to-peer mode

Logical link control protocol (LLCP)� compact data-link protocol based on IEEE 802.2� two service types

– connectionless with no reliability nor flow-control mechanisms– connection-oriented in-order and reliable delivery, flow-control

� link management, segmentation and reassembly,and protocol multiplexing

Simple NDEF exchange protocol (SNEP)� request-and-response protocol based on LLCP

– connection-oriented transport mode� the Android implementation is called Android Beam

Short-range wireless communication technologies 37/46M. Di Francesco October 27, 2014Aalto University T-110.5111

Page 38: Short-range wireless communication technologies

Card emulation mode

Basics� device acts as a tag, namely, as a contactless smart card

– it relies on an external reader/writer (initiator)� emulation of specific smart cards is implemented in software

Security issues� smart cards contain sensitive or valuable information

which should be adequately protected– is your bank fine with your phone pretending to be a payment card?

� secure element or secure access component– custom hardware with some processing capabilities– performs some cryptographic functions

Short-range wireless communication technologies 38/46M. Di Francesco October 27, 2014Aalto University T-110.5111

Page 39: Short-range wireless communication technologies

ANT

Basic features� proprietary ultra-low power wireless sensor network protocol� operating in the 2.4 GHz ISM band with a data rate of 1 Mbps� supports peer-to-peer, star, tree and mesh topologies

ANT channels� a master and a slave form a (synchronous, bi-directional) channel

Page 14 of 134 ANT Message Protocol and Usage, Rev 5.1

thisisant.com

Figure 5-2. Channel communication showing forward and reverse directions. Not to scale.

The available channel types are listed and described in section 5.2.1. Each channel type must also be configured with the desired channel parameters (e.g. RF frequency, channel period and channel ID) and any additional features such as single channel encryption.

The ANT data types determine the way that the data will be sent between the two nodes of an ANT channel and are described in section 5.4. There are four data types: broadcast, acknowledged, burst and advanced burst message transfers. Each time the host application sends a data message to ANT for transmission, it specifies the data type along with the message data. Details on the host to ANT interface and messaging will be described in later sections.

Data messages are transferred between nodes in one of two directions:

1. Forward Direction (Master -> Slave)

2. Reverse Direction (Slave -> Master)

All data types can be transmitted in both directions, except across transmit/receive only channels.

5.2 Channel Configuration In order for two ANT devices to communicate, they require a common channel configuration that includes information related to the operating parameters of a channel. The following information is required to define a channel configuration.

x Channel Type (section 5.2.1)

o Optional Extended Assignment (section 5.2.1.4)

x RF Frequency (section 5.2.2)

x Channel ID (section 5.2.3)

o Transmission Type (section 5.2.3.1)

o Device Type (section 5.2.3.2)

o Device Number (section 5.2.3.3)

x Channel Period (section 5.2.4)

x Network (section 5.2.5)

Although the configuration of a specific channel can remain constant throughout its connection, most parameters may be changed while the channel is open. Also, it should be noted that a master can maintain multiple channels that differ in terms of channel configuration parameters. Further information on which channel parameters must be set prior to opening a channel, may or may not be changed during an open channel, and resulting implications, can be found in section 5.3.

MASTER

SLAVE

Tch TchTch

time

time

Forward Direction

Reverse DirectionChannel Timeslot (Always) (Optional)

Image source: “ANT Message Protocol and Usage” document

Short-range wireless communication technologies 39/46M. Di Francesco October 27, 2014Aalto University T-110.5111

Page 40: Short-range wireless communication technologies

ANT+

Device profile� network rules for a specific use-case

– bicycle power, speed and cadence, multi-sport speed and distance– muscle oxygen monitor, blood pressure, heart rate monitor

� ANT+ is a managed network using device profiles– participating devices use a network key– obtaining a key requires to join the ANT+ alliance as a member

Commercial adoption� mostly targeting fitness and wellbeing

– Adidas miCoach, Suunto Ambit, Garmin GPS devices� many off-the-shelf smartphones have an ANT transceiver

– Sony Xperia Z3, Samsung Galaxy S4/S5

Short-range wireless communication technologies 40/46M. Di Francesco October 27, 2014Aalto University T-110.5111

Page 41: Short-range wireless communication technologies

Non-radio tags (1 of 2)

Bi-dimensional barcodes� leverage smartphone camera for visual data communication� long range (if the code is big enough) but need line-of-sight

Aztec Data Matrix Maxi Code QR code

Quick-response (QR) codes� widely used, different levels of robustness with error correction

Image source: Two-dimensional (2D) from Wikimwedia Commons

Short-range wireless communication technologies 41/46M. Di Francesco October 27, 2014Aalto University T-110.5111

Page 42: Short-range wireless communication technologies

Non-radio tags (2 of 2)

Magnetic key Acoustic codes

Source: H. Bojinov and D. Boneh, “Mobile token-based authentication on a budget”, the 12th

Workshop on Mobile Computing Systems and Applications (HotMobile ’11), pp. 14–19, 2011

Short-range wireless communication technologies 42/46M. Di Francesco October 27, 2014Aalto University T-110.5111

Page 43: Short-range wireless communication technologies

Acoustic communication

Audio-based networking� smartphones have

speakers andmicrophones– recent platforms have

very low-power hardware� audio can easily

manipulated by software– encode data into

the audio streams– either audible or not

Anil Madhavapeddy, Richard Sharp, David Scott, and Alastair Tse, “Audio networking: the for-gotten wireless technology”, IEEE Pervasive Computing, 4(3):55–60, July 2005

Short-range wireless communication technologies 43/46M. Di Francesco October 27, 2014Aalto University T-110.5111

Page 44: Short-range wireless communication technologies

Capacitive communications

Touch screen� major input device

in smartphones� based on capacitive

sensors

Can transfer data?� apparently yes� custom hardware

– realizes high-frequency“screen tapping”

� very slow: up to 5 bps

Source: Tam Vu et al., “Distinguishing users with capacitive touch communication”, the 18th

international conference on mobile computing and networking (Mobicom ’12), pp. 197–208, 2012

Short-range wireless communication technologies 44/46M. Di Francesco October 27, 2014Aalto University T-110.5111

Page 45: Short-range wireless communication technologies

Summary and agendaToday’s lecture

� short-range wireless communications– definition and overview– technologies for mobile devices

� Bluetooth Classic and Low Energy� Near Field Communication (NFC)

– backscattering and Radio Frequency Identification (RFID)– peer-to-peer and card emulation modes

Next lecture� Monday, November 3, 2014� topic: mobile (cellular) networks

First assignment deadline� Friday, October 31, 2014 at 16:00 EET

Short-range wireless communication technologies 45/46M. Di Francesco October 27, 2014Aalto University T-110.5111

Page 46: Short-range wireless communication technologies

Further study

Suggested activities� study the additional redading material in Noppa� find research articles related to the topics in the lecture� write a simple Android application using Bluetooth and (or) NFC

Curriculum development� Seminar on Internetworking (T-110.5191)� Special Assignment in Networking and Security (T-110.6101)� Applications and Services in Internet (T-110.5150)� Mobile Cloud Computing (T-110.5121)

Short-range wireless communication technologies 46/46M. Di Francesco October 27, 2014Aalto University T-110.5111