Bluetooth Overview > Bluetooth Basics
MPLAB Harmony Bluetooth Help
Bluetooth Basics

If you are new to Bluetooth, this section provides definitions of basic concepts found in most discussions of Bluetooth. 

Bluetooth is a wireless technology standard for exchanging data over relatively short distances, operating between frequencies 2.400 and 2.4835 GHz, using a radio technology called frequency-hopping spread spectrum. Bluetooth sends data in packets on one of 79 channels, each with a bandwidth of 1 MHz. 

Bluetooth Low Energy (BLE) is aimed at very low power applications powered by a coin cell and uses 2 MHz spacing, which allows for 40 channels. It has a latency time of only 6 ms, compared to 100 ms for classic Bluetooth. However BLE does not support voice. 

Classic Bluetooth and BLE can be implemented in the same device and operational at the same time. 

Bluetooth exists in numerous products such as telephones, speakers, tablets, media players, robotics systems, laptops, and console gaming equipment as well as headsets, modems, hearing aids and watches. BLE applications include mobile phones, gaming, smart homes, wearables, automotive, PCs, security, proximity, health care, sports and fitness. 

The range of Bluetooth devices is based on their class: 

Ranges of Bluetooth devices by class  

Class 
Max. permitted power (mW) 
Typical range (m) 
100 
~100 
2.5 
~10 
~1 
0.5 
~0.5 

Most Bluetooth applications are for indoor conditions, where attenuation of walls and signal fading due to signal reflections make the range far lower than the specified line-of-sight ranges of some Bluetooth products.

Pairing

Any classic Bluetooth device in discoverable mode transmits the following information on demand:

  • Device name
  • Device class
  • List of services

During pairing, the two devices establish a relationship by creating a shared secret known as a link key. Pairing requires both devices to support the same profile.

Classic Bluetooth Profiles

Bluetooth devices must be able to interpret certain Bluetooth profiles, which define possible applications and specify general behaviors that they will use to communicate with other Bluetooth devices. Som eof the profiles relevant to Harmony applications are:

  • Advanced Audio Distribution Profile (A2DP) – most common profile for streaming multimedia audio.
  • Audio Video Remote Control Profile (AVRCP) – standardized remote control profile for TV’s, home theater, etc. Used in conjunction with A2DP. Provides playback control such as play, pause, fast-forward and rewind, and volume control.
  • Hands-Free Profile (HFP) – typically used to place phone calls in automobiles.
  • Headset Profile (HSP) – used with mobile phones and gaming consoles.
  • Serial Port Profile (SPP) – standard replacement for wireless RS-232 data transmission
Bluetooth Low Energy (BLE)

BLE devices are detected through a procedure based on broadcasting advertising packets. This is done using 3 separate channels in order to reduce interference. 

All Bluetooth Low Energy devices use the Generic Attribute Profile (GATT). GATT has the following terminology:

  • Client - a device that initiates GATT commands and requests, and accepts responses, for example, a computer or smartphone.
  • Server - a device that receives GATT commands and requests, and returns responses, for example, a temperature sensor.
  • Characteristic - a data value transferred between client and server, for example, the current battery voltage.
  • Service - a collection of related characteristics, which operate together to perform a particular function. For instance, the Health Thermometer service includes characteristics for a temperature measurement value, and a time interval between measurements.
  • Descriptor - provides additional information about a characteristic. For instance, a temperature value characteristic may have an indication of its units (e.g. Celsius), and the maximum and minimum values which the sensor can measure. Descriptors are optional – each characteristic can have any number of descriptors.

A large number of low energy application profiles is based on GATT, including:

  • Health care profiles (blood pressure, thermometers, glucose monitors etc.)
  • Sensors (industrial and residential)
  • Sports and fitness profiles (heart rate, running speed, weight scale)
  • HID connectivity (mice and keyboards)

In addition, some Bluetooth modules support a “Transparent Data Service” for basic communication, where data in any structured format can be communicated. This is used in the BM64_ble_comm demonstration in this distribution.