Sunteți pe pagina 1din 70

UNIT-IV

BLUETOOTH

Overview
Radio specification
Base band specification
Links manager specification
Logical link control and
Adaptation protocol
Overview
• Initially developed by Ericsson in 1994
• Using 2.4 GHz band (up to 720 kbps, 10m)
• Provide consumer with the ability to do
– Make calls from a wireless headset connected remotely to a
cell phone
– Eliminate cables linking computers to printers, keyboards,
and the mouse
– Hook up MP3 players wirelessly
– Set up home networks
– Call home from a remote location to turn appliances on and
off, set the alarm, and monitor activity
Bluetooth Application Areas
• Data and voice access points
– Real-time voice and data transmissions
• Cable replacement
– Eliminates need for numerous cable attachments
for connection
• Ad hoc networking
– Device with Bluetooth radio can establish
connection with another when in range
Bluetooth Standards Documents
• Core specifications
– Details of various layers of Bluetooth protocol
architecture.
• Profile specifications
– Use of Bluetooth technology to support various
applications.
Protocol Architecture

• Bluetooth is a layered protocol architecture consisting

of:

– Core protocols

– Cable replacement and telephony control protocols

– Adopted protocols
Bluetooth Protocol Stack
Core Protocols
• Radio
– Details of the air interface, including frequency, the use of
frequency hopping, modulation scheme, and transmit
power.
• Baseband
– Concerned with connection establishment within a piconet,
addressing, packet format, timing and power control.
• Link Manager Protocol (LMP)
– Responsible for link setup between Bluetooth devices and
ongoing link management.
• Security aspects: authentication and encryption.
• Control and negotiation of baseband packet sizes.
Core Protocols (cont…)
• Logical Link Control and Adaptation Protocol (L2CAP)
– Adapts upper-layer protocols to the baseband layer.
– Provide both connectionless and connection-oriented
services.

• Service Discovery Protocol (SDP)


– Device information, services, and the characteristics of the
services can be queries to enable the establishment of a
connection between two or more Bluetooth devices.
Bluetooth Protocols
• RFCOMM
– Cable replacement protocol.
– RFCOMM presents a virtual serial port that is designed to
make replacement of cable technologies as transparent as
possible.
– Provides for binary data transport and emulates EIA-232
control signals over the BT baseband layer.
• Telephony Control Protocol (TCS BIN)
– Defines the call control signaling for the establishment of
speech and data calls between BT devices.
Protocol Architecture

• Adopted protocols
– PPP (Point-to-Point Protocol): Internet standard
protocol for transporting IP datagrams over point-
to-point link.

– TCP/UDP/IP

– OBEX (Object Exchange Protocol): used for the


exchange of objects, similar to HTTP.
Usage Models
• Usage model is set of protocols that implement a
particular Bluetooth based application.
• File transfer: Transfer of directories, files, documents,
images etc.
• Internet bridge: PC is wirelessly connected to a
mobile phone to provide dial-up networking and fax
capabilities.
• LAN access: Enabled devices on a piconet to access a
Usage Models
• Synchronization: Device-to-device synch. of
information such as phone book, calendar etc.
• Three-in-one phone: Telephone handset as
cordless, intercom and cellular phone.
• Headset: Act as remote device’s audio input
and output.
Usage Models
Usage Models (cont)
Usage Models (cont)
Piconets and Scatternets
 Piconet
 Basic unit of Bluetooth networking
 Master and one to seven slave devices
 Master determines channel and phase
 Scatternet
 Device in one piconet may exist as master or slave in
another piconet
 Allows many devices to share same area
 Makes efficient use of bandwidth
Piconets
– Basic unit of networking in BT.
– Consisting of a master and from 1 to 7 active slave devices.
– master makes the determination of the channel and phase
that shall be used by all devices on this piconet.
– A slave may only communicate with the master and may
only communicate when granted permission by the master.
– A device in one piconet may also exist as part of another
piconet and may function as either a slave or master in each
piconet.
Master/Slave Relationships
Wireless Network Configurations
Wireless Network Configurations
• Advantage of piconet/scatternet scheme:

– Allows many devices to share the same


physical area.
– Makes efficient use of bandwidth.
Radio Specification
• Classes of transmitters
– Class 1: Outputs 100 mW for maximum range
• Power control mandatory
• Provides greatest distance
– Class 2: Outputs 2.4 mW at maximum
• Power control optional
– Class 3: Nominal output is 1 mW
• Lowest power
Radio & Baseband Parameters
Radio Specification
Baseband Specification
• Frequency Hopping (FH) in Bluetooth
– Provides resistance to interference and
multipath effects.
– Provides a form of multiple access among
co-located devices in different piconets.
Frequency Hopping
• Total bandwidth divided into 79 1MHz physical
channels.
• FH occurs by jumping from one channel to another in
pseudorandom sequence.
• Hopping sequence shared with all devices on piconet.
• Piconet access:
– Bluetooth devices use time division duplex (TDD)
– Access technique is TDMA
– FH-TDD-TDMA
Baseband Specification

1600 hops per second


Baseband Specification (cont)
Baseband Specification (cont)
• Physical links: Link b/w master and slave
– Synchronous connection oriented (SCO)
• Allocates a fixed bandwidth between a point-to-point
connection involving the master and a single slave
• The master maintains the SCO link by using reserved
slots at regular intervals
• The basic unit of reservation is two consecutive slots
(one in each transmission direction)
• The master can support up to 3 simultaneous SCO links,
while a slave can support 2 or 3 SCO links
• SCO packets are never retransmitted
Baseband Specification (cont)

– Asynchronous connectionless (ACL)


• A point-to-multipoint link between the master and all
the slaves in the piconet
• In slots not reserved for SCO links
• The master can exchange packets with any slave on a
per-slot basis
• Only a single ACL link can exist
• For most ACL packets, packet retransmission is applied
Baseband Specification (cont)
Baseband Specification (cont)
Header Format
Bluetooth Packet Fields

• Access code – used for timing synchronization,


offset compensation, paging, and inquiry
• Header – used to identify packet type and carry
protocol control information
• Payload – contains user voice or data and
payload header, if present
Types of Access Codes

• Channel access code (CAC) – identifies a piconet


• Device access code (DAC) – used for paging and
subsequent responses
• Inquiry access code (IAC) – used for inquiry
purposes
Access Code
• Preamble – used for DC compensation
– 0101 if LSB of sync word is 0
– 1010 if LSB of sync word is 1

• Sync word – 64-bits, derived from:


– 7-bit Barker sequence
– Lower address part (LAP)
– Pseudonoise (PN) sequence

• Trailer
– 0101 if MSB of sync word is 1
– 1010 if MSB of sync word is 0
Baseband Specification (cont)
• Packet Header
– AM_ADDR
• 3-bit AM_ADDR contains the “active mode” address
(temporary address assigned to this slave in this
piconet) of one of the slaves
• A transmission from the master to a slave contains
that slave’s address
• A transmission from a slave contains its address
• The value 0 is reserved for a broadcast from the
master to all slaves in the piconet
– Type
• Identifies the type of packet
• For SCO: HV1, HV2, HV3
Baseband Specification (cont)
– Flow
• Provides a 1-bit flow control mechanism for ACL traffic
only
– ARQN
• Provides a 1-bit acknowledgement mechanism for ACL
traffic protected by a CRC
• If the reception was successful, an ACK (ARQN=1) is
returned; otherwise a NAK (ARQN=0) is returned
– SEQN
• Provides a 1-bit sequential numbering scheme
– HEC (Header Error Control)
• An 8-bit error detection code used to protect the packet
Baseband Specification (cont)
Data Payload Header Format
Baseband Specification (cont)

• Payload Format
– Payload header
• An 8-bit header is defined for single-slot packets, and
a 16-bit header is defined for multislot packets

– Payload body: user information

– CRC: 16-bit CRC code on data payload


Baseband Specification (cont)

• Payload Header
– L_CH: identifies the logical channel

– Flow: used to control flow at the L2CAP level

– Length: the number of bytes of data in the


payload, excluding the payload header and CRC
Error Correction Schemes

• 1/3 rate FEC (forward error correction)


– Used on 18-bit packet header, voice field in HV1
packet
• 2/3 rate FEC
– Used in DM packets, data fields of DV packet,
FHS packet and HV2 packet
• ARQ
– Used with DM and DH packets
ARQ Scheme Elements

• Error detection – destination detects errors, discards


packets
• Positive acknowledgment – destination returns positive
ack.
• Retransmission after timeout – source retransmits if
packet unacknowledged
• Negative acknowledgment and retransmission –
destination returns negative ack. to packets with errors,
• Logical Channels
– Five types of logical data channels designed to carry
different types of payload traffic
– 1. Link control (LC)
• Carries low level link control information: ARQ, flow
control, payload characterization.
• The LC channel is carried in every packet except in the ID
packet, which has no packet header.
– 2. Link manager (LM)
• Transports link management information between
participating stations.
• Support LMP traffic and can be carried over either an SCO
or ACL link.
3. User asynchronous (UA)
• Carries asynchronous user data: normally carried over
the ACL link.
4. User isochronous (UI)
• Carries isochronous user data: normally carried over the
ACL link but may be carried in a DV packet on the SCO
link.
5. User synchronous (US)
• Carries synchronous user data.
• This channel is carried over the SCO link.
Channel Control
• States of operation of a piconet during link
establishment and maintenance
• Major states
– Standby – default state
– Connection – device connected
Bluetooth State diagram
Channel Control
• Interim substates for adding new slaves
 Page – used by master to activate a slave
 Page scan – device is listening for a page
 Master response – master receives a page response from slave
 Slave response – slave responds to a page from master
 Inquiry – device has issued an inquiry for identity of devices
within range
 Inquiry scan – device is listening for an inquiry
 Inquiry response – device receives an inquiry response
• Inquiry procedure
– The first step in establishing a piconet is for a potential
master to identify devices in a range that wish to participate
in the piconet.
– Once a device has responded to an Inquiry, it moves to the
page scan state to await a page from the master in order to
establish a connection.

• Page procedure
– Once the master has found devices within its range, it is able
to establish connections to each device, setting up a piconet.
Slave Connection State Modes

• Active – participates in piconet


– Listens, transmits and receives packets
• Sniff – only listens on specified slots
• Hold – does not support ACL packets
– Reduced power status
– May still participate in SCO exchanges
• Park – does not participate on piconet
– Still retained as part of piconet
Bluetooth Audio
• Voice encoding schemes:
– Pulse code modulation (PCM)
– Continuously variable slope delta (CVSD)
modulation
• Choice of scheme made by link manager
– Negotiates most appropriate scheme for
application
Bluetooth Link Security
Link Manager Specification
• Elements:
– Authentication – verify claimed identity
– Encryption – privacy
– Key management and usage
• Security algorithm parameters:
– Unit address
– Secret authentication key
– Secret privacy key
– Random number
LMP PDUs

• General response: accepted PDU, not_accepted


PDU
• Security Service
– Authentication
– Pairing
– Change link key
– Change current link key
– Encryption
LMP PDUs
• Time/synchronization
– Clock offset request
– Slot offset information
– Timing accuracy information request
• Station capability
– LMP version
– Supported features
LMP PDUs
• Mode control
– Switch master/slave role
– Name request
– Detach
– Hold mode
– Sniff mode
– Park mode
– Power control
LMP PDUs
• Mode control (cont.)
– Channel quality-driven change between DM and
DH
– Quality of service
– Control of multislot packets
– Paging scheme
– Link supervision
Link Manager Specification

59
Link Manager Specification (cont)

60
Logical Link Control and Adaptation
Protocol (L2CAP)

• Provides a link-layer protocol between entities with a


number of services
• Relies on lower layer for flow and error control
• Makes use of ACL links, does not support SCO links
• Provides two alternative services to upper-layer
protocols
– Connection service
– Connection-mode service
L2CAP Logical Channels
• Connectionless
– Supports connectionless service
– Each channel is unidirectional
– Used from master to multiple slaves

• Connection-oriented
– Supports connection-oriented service
– Each channel is bidirectional

• Signaling
– Provides for exchange of signaling messages between L2CAP
L2CAP Formats
L2CAP Packet Fields for Connectionless
Service

• Length – length of information payload, PSM fields


• Channel ID – 2, indicating connectionless channel
• Protocol/service multiplexer (PSM) – identifies
higher-layer recipient for payload
– Not included in connection-oriented packets

• Information payload – higher-layer user data


L2CAP Channels
Signaling Packet Payload

• Consists of one or more L2CAP commands,


each with four fields
Code – identifies type of command

Identifier – used to match request with reply

Length – length of data field for this command

Data – additional data for command, if necessary


L2CAP Signaling Command Codes
L2CAP Signaling Commands
• Command reject command
– Sent to reject any command
• Connection commands
– Used to establish new connections
• Configure commands
– Used to establish a logical link transmission
contract between two L2CAP entities
L2CAP Signaling Commands
• Disconnection commands
– Used to terminate logical channel
• Echo commands
– Used to solicit response from remote L2CAP entity
• Information commands
– Used to solicit implementation-specific information
from remote L2CAP entity
Quality of Service
Flow Specification Parameters
• Service type
• Token rate (bytes/second)
• Token bucket size (bytes)
• Peak bandwidth (bytes/second)
• Latency (microseconds)
• Delay variation (microseconds)

S-ar putea să vă placă și