BLOG

Ruddersoft Official Blog - An IT Service Company in India

Bluetooth Low Energy (BLE) In Android Devices

  • Arvind Katiyar
  • Oct 27, 2023
  • BLE
Post Image

Bluetooth Low Energy and Classic Bluetooth Standard

Like the classic Bluetooth feature of Android devices that we use for sharing files and connecting other Bluetooth-enabled devices such as Bluetooth speakers for playing media, the BLE wireless standard can also be used for sharing data albeit small packets of data with low data transmission rate.

The BLE standard is prominently used for two things:

  1. Unlike Bluetooth classic, BLE data transmission is restricted to limited channels. Though the BLE 5.4 standard, which was launched in February 2023, allows bi-directional communication and PaWR (Periodic Advertisement with Response), the power consumption is the lowest in comparison to other short-range wireless standards.

    In short, Bluetooth Classic consumes more power but provides a higher data transfer rate than BLE, which consumes low power. So, for devices that use small, non-chargeable batteries, and data transfer is low, BLE is the right technology as BLE devices, even with small coin-sized batteries can have a lifetime of 5-6 years.

    How does BLE Technology Work in Android Devices?

    For your BLE-enabled android-based devices to connect with other BLE-enabled devices and share data, they must first establish a connection, a channel of communication. For designing BLE applications and APIs, you must first declare several Bluetooth permissions in your apps. Specify whether your app requires Bluetooth Classic or Bluetooth Low Energy.

    Subsequently, you can declare BLUETOOTH_SCAN, BLUETOOTH_ADVERTISE, BLUETOOTH_CONNECT, and ACCESS_FINE_LOCATION, as per your requirements.

    Afterwards, since your app now has permission to use Bluetooth, it needs to access the BluetoothAdapter and determine the Bluetooth availability on the device. If that is the case, Bluetooth is available; the device will scan for nearby Bluetooth-enabled devices to connect.

    Once a nearby device is found, a connection on the GATT server (Generic Attribute Profile) on the BLE device is established to discover the capabilities of the BLE device, using connectGatt(). Once the connection is made, data can be transferred to the connected device as per the characteristics of the device.

    It is however important to note that between an Android smartphone and a BLE device (say heart-rate monitor), the mobile device supports the central role while the heart-rate monitor device supports the peripheral role. It is a must for a BLE connection as two central or two peripheral role devices can not establish a BLE connection.

    Apart from that, depending on the data being transferred, one device acts as the GATT server. For example, if the heart-rate monitor is sending heart-rate data to the mobile phone, the heart-rate monitor acts like a server and vice-versa.

    Bluetooth Low Energy Applications

    Given the smartphone prevalence amongst people across the globe, BLE technology is finding all kinds of applications in all kinds of business and personal scenarios. While the use of BLE in wearables is emphasized enough, BLE is also prominently used as a BLE beacon, popular for its PAwR (Periodic Advertisement with Response) feature.

    BLE beacons are actively used in various periodic advertisement applications in retail, asset management, inventory control, libraries, etc. In smart home applications, BLE is used for indoor tracking and security while in retail stores, BLE beacons provide customer-specific advertisements directly on their smartphones as they near any product of their preference. BLE-based smart shelving (ESL) also helps retail stores and customers with better shelving of perishable items and better shopping experience respectively.




Ruddersoft Solutions Private Limited

16D First Floor Mahaluxmi Metro Tower, Sector-4, Vaishali, Ghaziabad,
Uttar Pradesh-201012 (India)

Whatsapp

Call

Enquiry