Close or Esc Key

Arduino Projects   |   Raspberry Pi   |   Electronic Circuits   |   AVR   |   PIC   |   8051   |   Electronic Projects

Bluetooth Protocol (Part 2): Types, Data Exchange, Security

Written By: 

Bijal Parikh

Bluetooth Radio

The Bluetooth radio provides an electrical interface for transfer of packets on a modulated carrier frequency using wireless bearer services like CDMA, GSM. The radio operates in the range of 2.4 GHz. It requires an efficient antenna for transmission and reception, a RF front end which includes UP-convertor, down convertor, power controller, GFSK modulator and a transmitter/receiver switch. 

Bluetooth radio modem IC

The radio modem performs the GFSK modulation and demodulation, symbol and frame time recovery. It has a fully integrated radio transceiver and frequency hopping synthesizer on a single chip. In real life system, the signals that travel between antennas are of much higher frequency and they are known radio frequency. So, to decrease the frequency range analog circuits are normally used for down-conversion at receiver end and similarly up-conversion at transmitting end. An analog to digital convertor is present at receiver side to bring signal in digital domain. Then it is passed on to GFSK demodulator. The Bluetooth modulation scheme is GFSK (Gaussian Frequency Shift Keying). Gaussian frequency shift keying (GFSK) is a modulation method for digital communication found in many standards such as Bluetooth, DECT and Wavenis. It minimizes the trans-receiver complexity by using one for positive frequency deviation and zero for negative frequency deviation. The IC also contains Frequency Hopping synthesizer on the same chip.

Bluetooth radio modem IC

RADIO BAND AND CHANNELS

The Bluetooth radio operates in 2.4 GHz ISM band. In US and Europe, a band of 83.5 MHz is available. There are 79 channels spaced 1 MHz apart. Japan, Spain and France use only 23 channels spaced 1 MHz apart.

Baseband

This is the most important part of Bluetooth protocol. Baseband is the physical layer of Bluetooth which manages physical channels and links. Baseband lies on top of Bluetooth radio. Bluetooth link Controller IC is used to implement the baseband protocol and functions and is interfaced with Bluetooth radio modem IC. Link controller wisely chooses the links and channels to be used and improves the performance of applications. It synchronizes with the layer above it i.e. link manager for carrying out link level routines like link connections and power control. On receiver side it performs error detection, data whitening, hop selection and Bluetooth security. The controller hardware performs the basic functions like repetitive actions of paging, inquiry and page and inquiry scans. It also provides a USB and Audio interface to the host system.

Bluetooth link Controller IC

Baseband also manages links, handles packets and does paging and inquiry to access and inquire about Bluetooth devices. The transmitter applies time division multiplexing apart from frequency division (frequency hopping). In normal connection mode, the master starts at even numbered slots and slave uses odd numbered slots. There are two types of links ACL and SCO links. A link is a two point end to end circuit that connects end users and enables them to communicate even when two separate physical paths are used. Let us move on to ACL and SCO links used in baseband layer.

ACL links – asynchronous connectionless

The ACL links is a point to multipoint link between the master and all slaves participating on the piconet. ACL links carries data information and only a single link can exist. Retransmission of data packets is allowed in ACL links.

SCO links- synchronous connection link

The SCO links is a symmetric point to point link between a master and a single slave. It can carry both data and voice information but it mainly carries voice information. The master can support up-to two to three SCO links. SCO packets are never re- transmitted.

LOGICAL CHANNELS

 A channel is a high speed two way communication between two devices. For example a computer and its peripheral device. There are five different types of channels present in the Bluetooth which can be used to transfer different types of information. LC (control channel) and LM (link manager) channel s are used in the link level part of communication. UA, UI and US are used to carry asynchronous, iso-synchronous and synchronous user information.

BLUETOOTH ADDRESSING

An address is a name or token that identifies a component in the network. There are basically four device addresses as shown below.

 

      BD-ADDR

48 bit Bluetooth device address (IEEE802 standard). It is divided into LAP (Lower Address Part of 24 bits), UAP (Upper Address Part of 8 bits) and NAP (Non-significant Address Part of 16 bits).

      AM-ADDR

 

 

3 bit active member address. The all zero AM_ADDR is for broadcast messages.

     PM-ADDR

8-bit member address that is assigned to parked slaves

       AR-ADDR

It is used by parked slave to determine whether it is allowed to send access messages.

 

A Bluetooth address fields division:

24

8

16

 

 

LAP

 

UAP

NAP

BLUETOOTH PACKETS

The data on the piconets is conveyed in packets. A packet is shown below.

ACCESS CODE [72]

HEADER [54]

PAYLOAD [0-2745]

 

The access code is used for timing synchronization, paging and inquiry. There are three different types of access codes ; Channel access code which identifies a piconet; Device access code is used for paging and its responses  and Inquiry access code is for inquiry purposes. The header contains information of packet acknowledgement, packet numbering , flow control, slave address and error check. The packet payload represents voice field, data field or both. There are five common type of packets, four SCO and seven ACL packets.

 

SR NO.

       NAME

         TYPE

                                      DESCRIPTION

1

 

 

COMMON

ID

Carries device access code (DAC) or inquiry access code (IAC). Occupies one slot.

2

COMMON

NULL

NULL packet is used to get link information and flow control and has no payload. Occupies one slot. Not acknowledged.

3

COMMON

POLL

No payload. Acknowledged. Used by master to poll the slaves to know whether they are up or not. Occupies one slot.

4

COMMON

FHS

A special control packet for disclosing Bluetooth device address and the clock of the sender. Used in page master response, inquiry response and frequency hop synchronization.

5

COMMON

DM1

To support control messages in any link type and carry regular user data also. Occupies one slot.

6

SCO

HV1

Carries 10 information bytes. Typically used for voice transmission. 1/3 FEC encoded. Occupies one slot.

7

SCO

HV2

Carries 20 information bytes. Typically used for voice transmission. 2/3 FEC encoded. Occupies one slot.

8

SCO

HV3

Carries 30 information bytes. Typically used for voice transmission. Not FEC encoded. Occupies one slot.

9

SCO

DV

Combined data-voice packet. Voice field not protected by FEC. Data field 2.3 FEC encoded. Voice field is never retransmitted but data field can be.

10

ACL

DM1

Carries 18 information bytes. 2/3 FEC encoded. Occupies one slot.

11

ACL

DH1

Carries 28 bytes information. Not FEC encoded. Occupies one slot.

12

ACL

DM3

Carries 123 information bytes. 2/3 FEC encoded. Occupies three slots.

13

ACL

DH3

Carries 185 information bytes. Not FEC encoded. Occupies three slots.

14

ACL

DM5

Carries 226 information bytes. 2/3 FEC encoded. Occupies five slots.

15

ACL

DH5

Carries 341 information bytes. Not FEC encoded. Occupies five slots.

16

ACL

AUX1

Carries 30 information bytes. Resembles DH1 but no CRC code. Occupies one slot.

Comments

which language you use for cod of microcontroler  projects

thanks

Assembly language I use for cod.

In other language we can use? Or only using assembly language

Pages

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Search Engines will index and follow ONLY links to allowed domains.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This is to ensure that you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.