Professional Documents
Culture Documents
Unit III B
Unit III B
Unit III B
Bluetooth overview
i. Bluetooth is a short-range wireless technology standard that is used for exchanging data
between fixed and mobile devices over short distances using Ultra high frequency radio
waves in the ISM (industrial, scientific and medical) bands, from 2.402 to 2.48 GHz, and
building personal area networks (PANs).
ii. It is mainly used as an alternative to wire connections, to exchange files between nearby
portable devices and connect cell phones and music players with wireless headphones. In the
most widely used mode, transmission power is limited to 2.5 milliwatts, giving it a very short
range of up to 10 metres (33 ft).
a. Bluetooth links
i. To provide effective mechanisms for the data transfer over a Bluetooth link, there are
number of protocols and different types of link. There are two main types of Bluetooth link
that are available and can be set up:
SCO Synchronous Connection Orientated communications link
ACL Asynchronous Connectionless communications Link
The Bluetooth link that is used is determined by the type of Bluetooth data transfer required.
i. SCO: The SCO or Synchronous Connection Orientated communications link is used where
data is to be streamed rather than transferred in a framed format. The SCO can operate
alongside the ACL channels
ii. ACL: The ACL or Asynchronous Connectionless Communications Link is possible the
most widely used form of Bluetooth link. The ACL Bluetooth link is used for carrying
framed data - i.e. data submitted from an application to logical link control and adaptation
protocol channel. The channel may support either unidirectional or bidirectional Bluetooth
data transfer.
c. Bluetooth pairing
i. The devices can connect easily and quickly, known as Bluetooth pairing. Once Bluetooth
pairing has occurred two devices may communicate with each other.
ii. Bluetooth pairing is generally initiated manually by a device user. The Bluetooth link for
the device is made visible to other devices. They may then be paired.
1
iii. The Bluetooth pairing process is typically triggered automatically the first time a device
receives a connection request from a device with which it is not yet paired. In order that
Bluetooth pairing may occur, a password has to be exchanged between the two devices. This
password or "Passkey" as it is more correctly termed is a code shared by both Bluetooth
devices. It is used to ensure that both users have agreed to pair with each other.
iv. The process of Bluetooth pairing is summarised below:
a. Bluetooth device looks for other Bluetooth devices in range
b. Two Bluetooth devices find each other
c. Prompt for Passkey
Device 1 sends passkey: The initiating device, Device 1 sends the passkey that has been
entered to Device 2.
Device 2 sends passkey: The passkeys are compared and if they are both the same, a trusted
pair is formed, Bluetooth pairing is established.
d. Communication is established
2
Bluetooth Key Versions
Bluetooth 1.0 and 1.0B
Products weren't able to exchange and make use of information. The condition of being
anonymous wasn't possible and preventing certain services from using Bluetooth
environments
Bluetooth 1.1
i. Ratified as IEEE Standard 802.15.1
ii. Many errors found in the v1.0B specifications were fixed.
iii. Added possibility of non-encrypted channels.
iv. Received Signal Strength Indicator (RSSI).
Bluetooth 1.2
Major enhancements include:
Faster Connection and Discovery
Adaptive frequency-hopping spread spectrum (AFH), which improves resistance to radio
frequency interference by avoiding the use of crowded frequencies in the hopping
sequence.
Higher transmission speeds in practice, up to 721 kbit/s.
Extended Synchronous Connections (eSCO), which improve voice quality of audio links.
Host Controller Interface (HCI) operation with three-wire UART.
Ratified as IEEE Standard 802.15.1
3
In a single-mode implementation, only the low energy protocol stack is implemented.
In a dual-mode implementation, Bluetooth Smart functionality is integrated into an
existing Classic Bluetooth controller.
Compared to Classic Bluetooth, Bluetooth Low Energy is intended to provide considerably
reduced power consumption and cost while maintaining a similar communication range.
Consider table 1 for more comparison.
Bluetooth 4.1
Bluetooth v4.1 is an incremental software update to Bluetooth Specification v4.0, and not a
hardware update. Adds new features that improve consumer usability. These include
increased co-existence support for LTE, bulk data exchange rates and helps the developer
innovation by allowing devices to support multiple roles simultaneously.
Bluetooth 4.2
Bluetooth 4.2 Introduces features for the Internet of Things.
The major areas of improvement are:
Low Energy Secure Connection with Data Packet Length Extension
Link Layer Privacy with Extended Scanner Filter Policies
Internet Protocol Support Profile (IPSP) for Bluetooth Smart things to support connected
home
Bluetooth 5
The increase in transmissions could be important for Internet of Things devices, where many
nodes connect throughout a whole house. Bluetooth 5 increases capacity of connectionless
services such as location-relevant navigation of low-energy Bluetooth connections.
The major areas of improvement are:
Bluetooth 5.1
The major areas of improvement is Angle of Arrival (AoA) and Angle of Departure (AoD)
which are used for locating and tracking of devices
Bluetooth 5.2
Enhanced Attribute Protocol (EATT), an improved version of the Attribute Protocol
(ATT)
Table 1: Comparition of Bluetooth Low Energy (LE) to Bluetooth Classic
Bluetooth Low Energy (LE) Bluetooth Classic
Frequency 2.4GHz ISM Band 2.4GHz ISM Band
Band
Channels 40 channels with 2 MHz spacing 79 channels with 1 MHz spacing
4
Data Transports Asynchronous Connection-oriented Asynchronous Connection-oriented
Isochronous Connection-oriented Synchronous Connection-oriented
Asynchronous Connectionless
Synchronous Connectionless
Isochronous Connectionless
Communication Point-to-Point Point-to-Point
Topologies Broadcast
Mesh
Positioning Presence: Advertising None
Features Direction: RSSI, HADM(Coming)
Distance: Direction
Finding (AoA/AoD)
The standard uses a technique called frequency hopping spread spectrum, in which the radio
hops between channels on each connection event using the following formula:
channel = (curr_channel + hop) mod 37
The value of the hop is communicated when the connection is established and is therefore
different for every new established connection. The modulation chosen to encode the
bitstream over the air is Gaussian Frequency Shift Keying (GFSK), the same modulation used
by classic Bluetooth. The modulation rate for Bluetooth Low Energy is fixed at 1 Mbit/s,
which is therefore the upper physical throughput limit for the technology.
2. Link Layer
The Link Layer is directly interfaces with the PHY, and it is usually implemented as a
combination of custom hardware and software.
The Link Layer defines the following roles:
Advertiser: A device sending advertising packets.
Scanner: A device scanning for advertising packets.
Master: A device that initiates a connection and manages it later.
6
Slave: A device that accepts a connection request and follows the master’s timing. These
roles can be logically grouped into two pairs: advertiser and scanner
A BLE device can be a master, a slave, or both, depending on the use case and requirements.
Devices that initiate connections will be masters and devices that advertise their availability
and accept connections will be slaves. A master can connect to multiple slaves and a slave
can be connected to multiple masters. Typically, devices such as smartphones or tablets tend
to act as a master, while smaller, simpler, and memory-constrained devices such as
standalone sensors usually adopt the slave role.
7
5. Attribute Protocol (ATT)
i. The Attribute Protocol (ATT) is a simple client/server stateless protocol based on attributes
presented by a device. In BLE, each device is a client, a server, or both, irrespective of
whether it’s a master or slave.
ii. A client requests data from a server, and a server sends data to clients. The protocol is
strict when it comes to its sequencing: if a request is still pending (no response for it has been
yet received) no further requests can be sent until the response is received and processed.
iii. ATT operations includes Error Handling, Error Response, Server Configuration, Find
Information (Find Information Request/Response), Read Operations (Read by Type
Request/Response, Read Request/Response, Read Multiple Request/Response, Read by
Group Type Request/Response), Write Operations (Write Request/Response, Write
Command, Queued Writes, Prepare Write Request/Response, Execute Write
Request/Response), Server Initiated.
6. Security Manager Protocol (SMP)
The Security Manager (SM) is a protocol and security algorithms designed to provide the
Bluetooth protocol stack with the ability to generate and exchange security keys.
This allow the peers to communicate securely over an encrypted link, to trust the identity of
the remote device.
The Security Manager defines two roles:
Initiator
Always communicates to the Link Layer master and therefore to the GAP central.
Responder
Always corresponds to the Link Layer slave and therefore the GAP peripheral.
Security Procedures
The Security Manager provides support for the following three procedures:
Pairing
The procedure by which a temporary common security encryption key is generated to be able
to switch to a secure, encrypted link. This temporary key is not stored and is therefore not
reusable in subsequent connections.
Bonding
A sequence of pairing followed by the generation and exchange of permanent security keys
and stored in nonvolatile memory and therefore creating a permanent bond between two
devices, which will allow them to quickly set up a secure link in later connections without
having to perform a bonding procedure again.
Encryption Reestablishment
After a bonding procedure is complete, keys might have been stored on both sides of the
connection. If encryption keys have been stored, this procedure defines to use those keys in
later connections to reestablish.
9
viii. Up to four programmable logic blocks, known as universal digital blocks (UDBs)
ix. CapSense and segment LCD drive
x. Low-power operating modes: Sleep, Deep-Sleep, Hibernate, and Stop
xi. Programming and debug system through serial wire debug (SWD)
1. CPU System
i. Processor: The heart of the PSoC 4 is a 32-bit Cortex-M0 CPU core running up to 48MHz.
It is optimized for low-power operation. It uses 16-bit instructions and executes a subset of
the Thumb-2 instruction set.
ii. Interrupt Controller: The CPU subsystem of PSoC includes a nested vectored interrupt
controller (NVIC) with 32 interrupt inputs and a wakeup interrupt controller (WIC), which
can wake the processor from deep-sleep mode. The Cortex-M0 implements non-maskable
interrupt (NMI) input.
2. Memory
The PSoC 4 memory subsystem consists of flash and SRAM. A supervisory ROM,
containing boot and configuration routines.
i. Flash: The PSoC 4 has a flash module with a flash read accelerator tightly coupled to the
CPU to improve average access times from the flash block.
ii. SRAM: The PSoC 4 provide SRAM, which is engaged during hibernate mode.
3. System-Wide Resources
i. Clocking System: The clock system for the PSoC 4100/4200 consists of the internal main
oscillator (IMO) and internal low-speed oscillator (ILO) as internal clocks and has provision
for an external clock. The default IMO frequency is 24 MHz and it can be adjusted between 3
MHz and 48 MHz in steps of 1 MHz. The ILO is a low-power, less accurate oscillator and is
used to generate clocks for peripheral operation in deep-sleep mode. Its clock frequency is 32
kHz with ±60 percent accuracy.
ii. Power System: The PSoC 4100/4200 operates with a single external supply over the range
of 1.71 V to 5.5 V. PSoC 4100/4200 has several low-power modes – sleep, deep-sleep,
hibernate, and stop modes – besides the default active mode.
iii. GPIO: Every GPIO in PSoC are capable to disables of input and output. A high-speed I/O
matrix is used to multiplex between various signals that may connect to an I/O pin.
4. Programmable Digital
The PSoC 4200 has up to four universal digital block (UDB). Each UDB contains structured
data-path logic and uncommitted programmable logic devices (PLD) logic with flexible
interconnect. The UDB array provides a switched routing fabric called the Digital System
Interconnect (DSI). The DSI allows routing of signals from peripherals and ports to and
within the UDBs.
5. Analog System
i. SAR ADC: PSoC 4 has a configurable SAR ADC. The ADC provides the choice of three
internal voltage references (VDD, VDD/2, and VREF) and an external reference through a
GPIO pin.
ii. Continuous Time Block mini (CTBm): The CTBm block provides continuous time
functionality at the entry and exit points of the analog subsystem. The CTBm has two high-
performance opamps.
6. Special Function Peripherals
i. LCD Segment Drive: The PSoC 4 has an LCD controller. It uses full digital methods
(digital correlation and PWM) to drive the LCD segments.
10
ii. CapSense: PSoC 4 devices has the CapSense feature, which allows you to use the
capacitive properties of your fingers to toggle buttons, sliders, and wheels
7. Program and Debug
PSoC 4 devices support programming and debug features of the device via the on-chip SWD
(Serial Wire Debug) interface. The SWD interface is also fully compatible with industry
standard third-party tools.
Additional information
Bluetooth profiles
Overviews of the more commonly used Bluetooth profiles are tabulated below:
11
SUMMARY OF MAIN BLUETOOTH PROFILES
BLUETOOTH DETAILS
PROFILE
The overall profile may be considered to have the following actions:
1. Image Push: This function allows the sending of an image from a
device controlled by the user.
2. Image Pull: This function within the Bluetooth profile allows
browsing nd retrieval of images from a remote device, i.e. pulling
images from a remote source.
3. Advanced Image Printing: This provides for the printing of images
using a number of advanced options.
4. Automatic Archive: This function enables the automatic backup of
all new images from a target.
5. Remote Camera: This function allows the remote control of a
camera by an initiator.
6. Remote Display: This allows for the Imaging Initiator to push
images to another device for display.
Basic Printing This Bluetooth profile allows devices to send text, e-mails, v-cards, images
Profile (BPP) or other information to printers based on print jobs.
As would be expected te Basic Printing Profile, BPP defines two roles:
1. Printer: This is the device that manipulates the data to be printed.
Typically this would be a physical printer.
2. Sender: This is a device, possible a mobile phone or other form of
user equipment, UE, that needs to print some data, but without
wanting the full overhead of a print driver.
The advantage of using the Basic Print Profile, BPP rather than the HCRP
is that it does not need any printer-specific drivers. This makes it
particularly applicable for use with embedded devices such as mobile
phones and digital cameras.
Common ISDN This Bluetooth profile details the way in which ISDN traffic can be
Access Profile transferred via a Bluetooth wireless connection. It is typically used in
(CIP) Bluetooth enabled office equipment that is ISDN enabled.
The CIP defines two roles within the Bluetooth profile:
1. Access Point (AP): This node is connected to the external network
and acts as an endpoint for it. It handles all the interworking
associated with the external ISDN
2. ISDN Client (IC): This is the remote node accessing the Access
Point via the Bluetooth wireless network or link
Cordless This Bluetooth profile defines how a cordless phone can be implemented
Telephony using Bluetooth. This Bluetooth profile is aimed at use for either a
Profile (CTP) dedicated cordless phone or a mobile phone acting as a cordless phone
when close to a CTP enabled base station. The aim of this Bluetooth profile
was to allow a mobile phone to use a Bluetooth CTP gateway connected to
a landline when within the home or office, and then use the mobile phone
network when elsewhere.
Two roles are defined within this Bluetooth profile:
1. Terminal (TL): This is the user equipment, and may be a cordless
phone or a mobile phone, etc.
2. Gateway (GW): The gateway acts as the access point for the
12
SUMMARY OF MAIN BLUETOOTH PROFILES
BLUETOOTH DETAILS
PROFILE
terminal to the landline or other network.
Dial-Up This Bluetooth profile details a standard for accessing the Internet and other
Network Profile dial-up services via a Bluetooth system. This may be required when
(DUN) accessing the Internet from a laptop by when using a mobile phone, PDA,
etc as a wireless dial-up modem.
This user Bluetooth profile defines two roles for the Bluetooth nodes:
1. Gateway (GW): This is the Bluetooth node or device that provides
the access to the public network and ultimately the Internet.
2. Data Terminal (DT): This is the remote node that interfaces with
the Gateway via the Bluetooth wireless link.
Fax Profile This Bluetooth profile defines how a FAX gateway device can be used.
(FAX) This Bluetooth profile may be needed when a personal computer uses a
mobile phone as a FAX gateway to send a FAX.
There are two roles for this Bluetooth profile
1. Gateway (GW): This is the Bluetooth enabled device that provides
facsimile services.
2. Data Terminal (DT): This device connects via the Bluetooth
wireless link to be able to send its FAX.
File Transfer This Bluetooth profile details the way in which folders and files on a server
Profile (FTP) can be browsed by a client device. This Bluetooth profile may be used for
transferring files wirelessly between two PCs or laptops, or browsing and
retrieving files on a server.
Two roles are defined for this Bluetooth profile:
1. Client: This is the device that initiates the operation and pushes or
pulls the files to or from the server.
2. Server: This is the target device and it is remote from the device
that pushes or pulls the files.
General This Bluetooth profile provides the basis for the A2DP and VDP Bluetooth
Audio/Video profiles. These are used for systems designed for distributing video and
Distribution audio streams using Bluetooth technology. This may be used in a variety of
Profile scenarios, e.g. with a set of wireless stereo headphones and a music player -
(GAVDP) the music player sends messages to the headphones to establish a
connection or adjust the stream of music, or vise versa.
Two roles are defined within this Bluetooth profile:
1. Initiator (INT): This device initiates the signalling procedure.
2. Acceptor (ACP): This device responds to the incoming requests
from the initiator.
Generic Object This Bluetooth profile is used to transfer an object from one device to
Exchange Profile another. One example may be in the exchange of vCards between devices
(GOEP) such as mobile phones, PDAs, etc.
Two roles are defined within this Bluetooth profile:
1. Server: For this Bluetooth profile, this is the device that provides
an object exchange server for which data objects can be pushed or
pulled.
2. Client: This is the device that can pushes or pulls data to and from
13
SUMMARY OF MAIN BLUETOOTH PROFILES
BLUETOOTH DETAILS
PROFILE
the server.
Hands-Free The HFP Bluetooth profile details the way in which a gateway device may
Profile (HFP) be used to place and receive calls for a hands-free device. This profile adds
considerable additional functionality over the original Headset Profile,
HSP, allowing remote control, etc. The Bluetooth profile defines two roles:
1. Audio Gateway (AG): The audio gateway is normally the mobile
phone of car kit and it provides connectivity to the source of the
voice data.
2. Hands-Free Unit (HF): This is the device which acts as the remote
audio input and output mechanism for the Audio Gateway. It also
provides some remote control means.
The Handsfree Bluetooth profile uses a CVSD codec for voice transmission
cross the Bluetooth link and it also defines a number of voice control
features including volume.
Hard Copy This Bluetooth profile defines how driver-based printing is achieved over a
Cable Bluetooth link. As might be expected, it is used for wireless links for
Replacement printing and scanning.
Profile (HCRP) Two roles are defined within this Bluetooth profile:
1. Server: This is the server device that offers the HRCP service -
typically it is a printer.
2. Client: The client is a device containing a print driver on which the
client device wishes to print - typically this may be a laptop or other
computer wishing to print documents.
Headset Profile The Bluetooth Headset Profile details how a Bluetooth enabled headset
(HSP) communicates with a Bluetooth enabled device. As might be anticipated the
Bluetooth Headset Profile was aimed at defining how Bluetooth headsets
may connect to a mobile phone or installed car kit. It defines two roles:
1. Audio Gateway: The device that is the gateway of the audio both
for input and output. This would typically be a mobile phone, car
kit, or a PC.
2. Headset: The Headset is defined within the Bluetooth Headset
Profile as the device acting as the remote audio input and output
connected to the gateway via the Bluetooth link.
Human Interface This Bluetooth profile details the protocols, procedures and features to be
Device Profile used by Bluetooth keyboards, mice, pointing and gaming devices and
(HID) remote monitoring devices.
Two roles are defined within this Bluetooth profile:
1. Human Interface Device (HID): The device providing the human
data input and output to and from the host. Typical examples may
be a keyboard or a mouse.
2. Host: The device using the services of a Human Interface Device.
This may typically be a computer or laptop, etc
Intercom Profile This profile details the way in which two Bluetooth enabled mobile phones
(ICP) in the same network can communicate directly with each other, i.e. acting
as an intercom. As the intercom usage is completely symmetrical, there are
14
SUMMARY OF MAIN BLUETOOTH PROFILES
BLUETOOTH DETAILS
PROFILE
no specific roles defined for this Bluetooth profile. However when using
the Intercom Profile, the devices at either end of the link will be denoted as
a Terminal (TL).
Object Push This Bluetooth profile details the roles of a push server and a push client.
Profile (OPP) These roles need to interoperate with the server and client device roles
defined within the GOEP Bluetooth profile.
The OPP defines two roles:
1. Push Server: This is the device within this Bluetooth profile that
provides an object exchange server
2. Push Client: This device pushes and pulls objects to and from the
Push Server and initiates the actions.
Personal Area This Bluetooth profile details the way in which two or more Bluetooth
Networking enabled devices can form an ad-hoc network. It also details how the same
Profile (PAN) mechanism can be used to access a remote network through a network
access point.
The PAN is somewhat more complicated than other Bluetooth profiles and
requires the definition of three roles:
1. Network Access Point (NAP) and NAP Service: In view of the
similarities with Ethernet networks, the NAP can be considered as
being equivalent an Ethernet bridge to support network services.
2. Group Ad-hoc Network (GN) and GN Service: - A Bluetooth
device that supports the GN service is able to forward Ethernet
packets to each of the Bluetooth devices that are connected within
the PAN.
3. PAN User (PANU) and PANU Service: As the name indicates the
PANU is the Bluetooth device that uses either the NAP or the GN
service
Service The SDAP is a Bluetooth profile that describes how an application should
Discovery use the Service Discovery Procedure, SDP to discover services on a remote
Application device. SDAP can adopt a variety of approaches to managing the device
Profile (SDAP) discovery via Inquiry and Inquiry Scan and service discovery via SDP. The
ideas contained in the SDAP specification augment the basic specifications
provided in GAP, SDP, and the basic processes of device discovery.
The SDAP defines two roles as given below:
1. Local Device (LocDev): This is the Bluetooth deveice that initiates
the service discovery procedure.
2. Remote Device (RemDev): There may be one or more RemDevs
and these are any device that participates in the service discovery
process by responding to the service inquiries it may receive from a
LocDev.
Service Port This Bluetooth profile details the way in which virtual serial ports may be
Profile (SPP) set up and how two Bluetooth enabled devices may connect.
This Bluetooth profile defines two roles for communication to proceed:
1. Device A: The Device A is recognised as the device that initiates
the formation of a connection to another device. It may also be
15
SUMMARY OF MAIN BLUETOOTH PROFILES
BLUETOOTH DETAILS
PROFILE
thought of as the Initiator.
2. Device B: This may be thought of as the Acceptor and it is the
device that responds to an Initiation process.
Synchronization This Bluetooth profile is used in conjunction with GOEP to enable
Profile (SYNC) synchronization of calendar and address information (personal information
manager (PIM) items) between Bluetooth enabled devices.
There are two main roles within this Bluetooth profile:
1. IrMC Server: The device that takes on the role of object exchange
server will become the IrMC Server. Typically this device will be
the mobile phone, PDA, etc.
2. IrMC Client: This device is typically a PC, and it is the device that
contains the sync engine and pulls and pushes the PIM data to and
from the IrMC server.
Video This Bluetooth profile details how a Bluetooth enabled device is able to
Distribution stream video over a Bluetooth link. It could be used in a variety of
Profile (VDP) scenarios such as streaming video data from a storage areas such as on a PC
to a mobile player, or from a video camera to a television, etc.
There are two roles defined within this Bluetooth profile:
1. Source (SRC): As the name suggests the SRC is the origination
point of the streamed video on the piconet.
2. Sink (SNK): Within this Bluetooth profile, the SNK is the
destination for the digital video stream on the same piconet as the
SRC.
Bluetooth has over twenty different profiles that cover a host of different types of Bluetooth
enabled devices from mobile phones to printers, headset, microphones, laptops, vehicles and
with Bluetooth now being used for IoT / M2M applications, it also covers the variety of
devices likely to be encountered in these scenarios as well.
16