Different BLE States: Standby, Scanning, Initiating, Connection, Synchronization,

Introduction:

Bluetooth Low Energy (BLE) has revolutionized wireless communication, offering a power-efficient solution for connecting devices in various applications. Understanding the different states in BLE is crucial for optimizing device interactions. From the initial Advertising State to the vital Connection State and the nuances of Scanning and Disconnected States, each phase plays a pivotal role in creating responsive and efficient BLE networks. In this blog, we'll explore these states in concise detail, shedding light on their significance in the realm of Bluetooth Low Energy technology.

1. Standby State:


The term "Standby State" in BLE isn't a formally defined state in the Bluetooth Low Energy specification. However, it typically implies a low-power state where the device isn't actively advertising or scanning but can still be awakened and connected. Here are two interpretations of "Standby State" and their corresponding connection possibilities:

1. Advertising Mode with Reduced Frequency:

In this interpretation, the device remains in advertising mode but advertises at a significantly lower frequency compared to the normal advertising interval. This means it becomes less discoverable but can still be detected by scanning devices that are actively searching for it.

Connection possibility: Yes, if a central device actively scans for the specific address or advertising data of the peripheral in standby mode, it can still initiate a connection. However, the chance of being discovered is much lower compared to regular advertising.

2. Sleeping Mode with Wake-on-Radio:

In this interpretation, the device enters a sleep mode where most components are powered down, except for the radio which remains partially active to listen for specific wake-up triggers. These triggers could be:

  • Directed advertising packets: The device wakes up upon receiving advertising packets targeting its specific address.

  • Connection events: The device wakes up at predetermined intervals expecting a connection event from a bonded device.

  • External events: Some hardware may allow wake-up on external events like button presses or sensor readings.

Connection possibility:

  • Directed advertising: Yes, a central device can initiate a connection by sending advertising packets targeted specifically to the peripheral's address.

  • Connection events: Yes, a bonded central device can connect at the pre-agreed time interval if the peripheral is awake at that moment.

  • External events: This depends on the specific implementation. If the wake-up event triggers radio activation, connection is possible within a limited window.

Important considerations:

  • Power consumption: The specific power consumption will depend on the chosen standby mode and wake-up triggers. Directed advertising and external event wake-up generally consume more power than connection events.

  • Latency: Connection establishment might take longer compared to regular advertising due to the need for wake-up and synchronization.

  • Implementation complexity: Implementing wake-on-radio features can be more complex compared to simple advertising.

2. Scanning State

the term "Scanning State" in BLE refers to the state where a device actively listens for advertising packets from other BLE devices. This contrasts with the Standby States you described, which prioritize low power consumption. Here's an explanation of Scanning State in BLE:

Purpose:

  • The primary purpose of Scanning State is to discover nearby BLE devices that are advertising their presence.

  • This makes it useful for applications like device pairing, finding beacons, or proximity sensing.

How it works:

  • The BLE radio periodically scans for specific frequency channels where advertising packets are transmitted.

  • These packets contain information about the advertising device, such as its name, service UUIDs, and connection parameters.

  • When a scan detects an advertising packet, it reports the information to the application layer for further processing.

Types of Scanning:

  • Passive Scanning: The device simply listens for any advertising packets within its radio range. This consumes the least power but might miss devices with short advertising intervals.

  • Active Scanning: The device transmits scan requests, increasing the chance of discovering nearby devices but consuming more power.

  • Directed Scanning: The device scans for advertising packets from specific addresses, targeting known devices and conserving power by ignoring others.

Connection possibilities:

  • If the discovered device advertises with connectable flags, the scanning device can initiate a connection by sending a connection request.

  • The ability to connect depends on various factors like:

    • Advertising parameters (connectable/discoverable flags)

    • Range and signal strength

    • Interference in the environment

    • Security settings (pairing/bonding required)

Power consumption:

  • Scanning consumes more power than Standby States like advertising with reduced frequency or sleep modes.

  • Active scanning and longer scan durations consume more power compared to passive scanning and shorter durations.

Additional notes:

  • Scanning parameters (type, duration, interval) can be configured to balance power consumption and discovery potential.

  • Some BLE hardware offers features like "scan batching" to reduce power overhead during repetitive scanning.

  • The choice of Scanning State parameters depends on your specific use case and desired balance between power efficiency and discovery needs.

3. Advertising State

In Bluetooth Low Energy (BLE) play a crucial roles in device discovery and connection establishment. Here's a breakdown of each state and how they interact:

Advertising State:

  • Purpose: A BLE device in this state broadcasts advertising packets periodically on specific channels, announcing its presence and capabilities to nearby devices.

  • Data: These packets can contain various information like device name, service UUIDs, connectability flags, and security settings.

  • Power Consumption: Varies depending on advertising frequency, interval, and data size. Generally, consuming more power than Scanning State.

  • Benefits:

    • Easy discovery by nearby scanners.

    • Flexible data transmission in advertising packets.

    • Suitable for beacons, peripheral discovery, and initiating connections.

4. Connection State:

  • Operation: Two BLE devices establish a wireless link to exchange data. This involves negotiating connection parameters, performing security checks, and managing data transfer.

  • Purpose: To enable communication between devices for various applications like sensor data transmission, remote control, or file sharing.

  • Power Consumption: Varies depending on data transfer rate, connection interval, and security level. Generally higher than both advertising and scanning states when actively transferring data.

5. Initiating State:

  • Operation: A BLE device enters this state when attempting to connect with a specific advertiser device.

  • Action:

    • Sends a connection request packet to the advertiser, including desired connection parameters like interval and latency.

    • Listens for a connection response packet from the advertiser.

  • Purpose: To initiate a connection with a discovered device through the handshake process.

  • Power Consumption: Moderate, higher than standby states but lower than active advertising.

  • Transition:

    • From Standby State: When prompted by an application to connect to a specific device.

    • From Scanning State: Upon discovering a suitable advertiser and deciding to connect.

    • To Connection State: Upon successful handshaking and parameter negotiation.

6. Synchronization State:

  • Operation: A BLE device enters this state after sending a directed advertising packet and expects a connection event from a bonded device at a pre-agreed time.

  • Action:

    • Listens for a connection event packet from the bonded device at the designated time interval.

    • May transmit additional directed advertising packets if the connection event isn't received within a specific window.

  • Purpose: To establish a connection with a bonded device after a period of inactivity when standby mode with sleep and wake-on-radio is used.

  • Power Consumption: Lower than active advertising, but higher than standby mode without wake-on-radio.

  • Transition:

    • From Standby State: After transmitting a directed advertising packet and entering sleep mode.

    • To Connection State: Upon receiving the expected connection event packet from the bonded device.

    • To Standby State: If the connection event isn't received within a specified timeframe.