BLE - Bluetooth Low Energy ================================ .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **What is BLE?** BLE stands for **Bluetooth Low Energy**. It is a wireless communication protocol designed for low-power, short-range communication, particularly in battery-operated devices like fitness trackers, smartwatches, sensors, and IoT devices. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Why is BLE useful?** * **Consumes very little power**, enabling long battery life. * Ideal for **intermittent data transmission** in IoT and wearable devices. * Supports **small data payloads** and quick connection setup. * Widely supported in **smartphones**, **tablets**, **PCs**, and **embedded devices**. * Enables **secure communication** with features like encryption and authentication. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **How it works?** * BLE devices operate in two roles: **Central** (e.g., phone) and **Peripheral** (e.g., fitness tracker). * The Peripheral advertises its presence; the Central scans and initiates a connection. * Once connected, data is exchanged using the **GATT (Generic Attribute Profile)**. * BLE operates in the 2.4 GHz ISM band and uses **frequency hopping** to reduce interference. * It supports **secure pairing**, encryption, and efficient data transfer using small packets. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Where is BLE used?** * **Wearables** (smartwatches, fitness bands). * **Healthcare devices** (heart rate monitors, glucose meters). * **Smart home** products (locks, lights, sensors). * **Industrial IoT** (asset tracking, beacons). * **Automotive applications** (keyless entry, tire pressure monitoring). .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Which OSI layer does this protocol belong to?** * BLE spans multiple OSI layers: * **Physical Layer (Layer 1)** – radio transmission. * **Data Link Layer (Layer 2)** – includes the Link Layer and L2CAP. * **Application Layer (Layer 7)** – where profiles like GATT and services reside. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **IS BLE Windows specific?** * No, BLE is **not Windows-specific**. * It is supported on many platforms including **Windows**, **Android**, **iOS**, **macOS**, and **Linux**. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **IS BLE Linux Specific?** * No, BLE is **not Linux-specific**. * However, Linux supports BLE via stacks like **BlueZ** and is commonly used in embedded devices. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Which Transport Protocol is used by BLE?** * BLE does **not use TCP or UDP**. * It uses its own **lightweight transport protocols**, such as: * **ATT (Attribute Protocol)** * **L2CAP (Logical Link Control and Adaptation Protocol)** .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Which Port is used by BLE?** * BLE does **not use traditional IP ports**. * It uses **channels** in the 2.4 GHz frequency band: * 3 advertising channels * 37 data channels .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Is BLE using Client server model?** * Yes, BLE uses a **client-server model** via the **GATT profile**: * The **Peripheral acts as the GATT server**, providing data (like sensor readings). * The **Central acts as the GATT client**, requesting or subscribing to data. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Topics in this section, * :ref:`Learnings in this section ` * :ref:`Terminology ` * :ref:`Version Info ` * :ref:`BLE Version&IEEE Details ` * :ref:`BLE Basic Setup on Ubuntu using IPv4 ` * :ref:`BLE Basic Setup on Ubuntu using IPv6 ` * :ref:`BLE Protocol Packet Details ` * :ref:`BLE Usecases ` * :ref:`BLE Basic Features ` * :ref:`Reference links ` .. _BLE_step1: .. tab-set:: .. tab-item:: Learnings in this section * In this section, you are going to learn .. _BLE_step2: .. tab-set:: .. tab-item:: Terminology * Terminology .. _BLE_step3: .. tab-set:: .. tab-item:: Version Info * Version Info .. _BLE_step5: .. tab-set:: .. tab-item:: BLE Version&RFC Details * rfc details .. _BLE_step18: .. tab-set:: .. tab-item:: BLE Basic Setup on Ubuntu using IPv4 * setup .. _BLE_step19: .. tab-set:: .. tab-item:: BLE Basic Setup on Ubuntu using IPv6 * setup .. _BLE_step6: .. tab-set:: .. tab-item:: BLE Protocol Packet Details * packet details .. _BLE_step7: .. tab-set:: .. tab-item:: BLE Usecases * usecases .. _BLE_step8: .. tab-set:: .. tab-item:: BLE Basic Features * features .. _BLE_step17: .. tab-set:: .. tab-item:: Reference links * Reference links