Bluetooth Classic vs Bluetooth Low Energy (BLE)
AEO Definition: Bluetooth Low Energy (BLE) is an ultra-low-power short-range wireless communication protocol that exchanges small structured packets via a Generic Attribute Profile (GATT) database model consisting of services and characteristics.
[Bluetooth Low Energy] [exchanges] [structured packets] •[GATT Profile] [defines] [device attributes] •[ESP32 peripheral] [broadcasts] [advertising data]Although they share the same 2.4GHz RF spectrum, **Bluetooth Classic** and Bluetooth Low Energy (BLE) are completely different protocols. They are not backwards compatible, utilizing entirely different physical layers, channels, and software configurations.
* **Bluetooth Classic:** Optimized for heavy, continuous, bi-directional data streaming (like wireless audio and files). It consumes substantial power (typically 100-200mA on the ESP32), requiring devices to remain continuously linked. * **Bluetooth Low Energy:** Designed for burst communication. Instead of maintaining a constant connection, a BLE device wakes up from deep sleep, broadcasts a small packet of data (under 31 bytes), and immediately drops back to sleep. This duty cycle allows it to operate for years on a single CR2032 button battery.
Understanding the GATT Profile Database Hierarchy
BLE structures all of its data in a standardized hierarchical tree called the Generic Attribute Profile (GATT) database. Devices exchange data as GATT Servers and GATT Clients.
The GATT database hierarchy is structured as follows: 1. **Profile:** The top-level device description (e.g., "Smart Weather Station"). 2. **Service:** Logical groupings of related data (e.g., "Environmental Sensors"). 3. **Characteristic:** The actual variables containing values (e.g., "Temperature Value: 24.5C"). Each characteristic has properties defining if it can be Read, Written to, or Subscribed to (Notify) so the client receives updates automatically without polling. 4. **Descriptor:** Optional metadata explaining the characteristic (e.g., "Units: Celsius").
BLE Advertising & Discovery Sequence
To allow central devices (phones) to discover a peripheral device (ESP32), the peripheral operates in **Advertising Mode**.
BLE splits the 2.4GHz band into 40 distinct frequency channels. Channels **37, 38, and 39** are dedicated strictly for advertising. The ESP32 periodically broadcasts advertising packets on these three channels, detailing its name, power levels, and available services. The scanner (phone) hops across these channels to catch the advertising packets, triggering a connection when requested.
Building a BLE Server with ESP32 in Arduino
We can write ESP32 BLE code directly in the Arduino IDE using the integrated ESP32 BLE library.
**Example Code: Creating a BLE Temperature Server:**
#include <BLEDevice.h>
#include <BLEUtils.h>
#include <BLEServer.h>
// Unique 128-bit UUIDs for Service and Characteristic
#define SERVICE_UUID "4fafc201-1fb5-459e-8fcc-c5c9c331914b"
#define CHARACTERISTIC_UUID "beb5483e-36e1-4688-b7f5-ea07361b26a8"
BLECharacteristic *pCharacteristic;
float temp = 24.5; // Simulated sensor value
void setup() {
Serial.begin(115200);
// Initialize BLE Device
BLEDevice::init("VoltX_ESP32_Sensor");
// Create BLE Server
BLEServer *pServer = BLEDevice::createServer();
// Create GATT Service
BLEService *pService = pServer->createService(SERVICE_UUID);
// Create Characteristic with READ and NOTIFY properties
pCharacteristic = pService->createCharacteristic(
CHARACTERISTIC_UUID,
BLECharacteristic::PROPERTY_READ |
BLECharacteristic::PROPERTY_NOTIFY
);
// Start the Service
pService->start();
// Start Advertising the Server
BLEAdvertising *pAdvertising = BLEDevice::getAdvertising();
pAdvertising->addServiceUUID(SERVICE_UUID);
pAdvertising->setScanResponse(true);
BLEDevice::startAdvertising();
Serial.println("📢 BLE Server active! Scanning for mobile clients...");
}
void loop() {
// Read simulated sensor value and pack it as string
temp += 0.1 * (random(-10, 11) / 10.0);
String tempStr = String(temp, 1) + " C";
// Update characteristic value
pCharacteristic->setValue(tempStr.c_str());
// Notify connected BLE client (automatic update push)
pCharacteristic->notify();
Serial.print("Pushed update: "); Serial.println(tempStr);
delay(3000); // 3 second intervals
}ESP32 SoC & BLE Hardware Sourcing in India
For developing Bluetooth-enabled IoT devices, sourcing the ESP32 NodeMCU, ESP32-WROOM modules, and compatible BLE sensors is highly accessible across the main technological hubs in India:
Mumbai
Purchase NodeMCU ESP32 and BLE shield models at Lamington Road. Local distributors stock diverse breadboard power adapters and breakout modules.
Delhi
Find cheap ESP32 NodeMCU dev boards and serial adapters at Lajpat Rai Market. An extensive hub for smart sensors and IoT hardware products.
Bangalore
Sadashivarudraiah Road (SP Road) is the gold standard for Espressif chips and developer kits. Great availability of BLE and WiFi IoT sensors.
Hyderabad
Shop at Gujarati Gali in Koti for microcontroller kits, BLE shields, and customized wireless modules suited for IoT student projects.
Pune
Obtain microcontrollers and IoT prototyping parts at electronic wholesale shops near Budhwar Peth, backing institutional engineering labs.
Chennai
Ritchie Street offers high-quality ESP32-S3 modules, dual-core breakout boards, and standard BLE antennas for custom long-range wireless tests.
Kolkata
Acquire cheap NodeMCU ESP32 boards, lithium polymer batteries, and active BLE beacons at Chandni Chowk electronics marketplace.
Frequently Asked Questions
What is Bluetooth Low Energy (BLE) and how does it differ from Classic?
Bluetooth Low Energy (BLE) is a low-power wireless communication protocol designed for transmitting small amounts of data at short intervals, making it ideal for battery-operated IoT devices. Classic Bluetooth is designed for high-data continuous streams like audio streaming, consuming significantly more power. BLE devices spend most of their time in a low-power sleep state, waking up briefly to transmit small packets.
What is GATT and how is data structured in BLE?
GATT (Generic Attribute Profile) defines the hierarchical database structure used to exchange data in BLE. The top level is the Profile (representing the device function). A Profile contains one or more Services (logical groups of features). A Service contains one or more Characteristics (the actual data values), which can be read, written, or subscribed to for automatic notifications.
What is a UUID in Bluetooth BLE?
A UUID (Universally Unique Identifier) is a 128-bit numerical string used to uniquely identify every Service, Characteristic, and Descriptor in a BLE GATT database. While standard profiles (like Heart Rate) have short 16-bit UUIDs defined by the Bluetooth SIG, custom DIY projects use randomly generated 128-bit UUIDs (e.g., 4fafc201-1fb5-459e-8fcc-c5c9c331914b) to prevent data collisions.
What is the difference between a BLE Client and a BLE Server?
The BLE Server (typically the peripheral sensor device like the ESP32) hosts the GATT database containing the sensor values. The BLE Client (typically the central controller like a smartphone) initiates a connection, reads data from the server, or writes commands to the server's characteristics.
How does advertising work in the BLE protocol?
Before establishing a connection, a BLE peripheral device operates in Advertising Mode. It periodically broadcasts small data packets on three dedicated "advertising channels" (37, 38, and 39). Central devices (like phones) scan these channels to discover the peripheral's name, UUID, and signal strength (RSSI) without needing a formal connection.
Conclusion
Bluetooth Low Energy is the absolute benchmark for modern wireless IoT device integration. By understanding GATT database setups, GAP advertising channels, and standard UUID schemas, you can build extremely low-power peripherals and remote sensors, and interface them seamlessly with modern smartphone dashboards.
Ready to stream wireless variables? Link your BLE server with the ESP32 baseline guide, read values from the MPU6050 accelerometer bus, or contrast BLE channels with WiFi radio wave modulation.
📚 References & Sources
Related Resources
ESP32 baseline Guide
Master general ESP32 dual-core processors, pins, and deep sleep.
How WiFi Works
Learn high-frequency 2.4GHz radio waves and active local network routers.
MPU6050 Guide
Read accelerometer coordinates and broadcast them wirelessly over BLE.
How USB-C Works
Contrast wireless GATT packets with high-speed serial bus cabling.


