Bluetooth LowEnergy

In July 2013, the Android API 18 release introduced support for Bluetooth Low Energy (BTLE).
Bluetooth Low Energy was designed to provide a similar communication range as compared to Bluetooth Classic while using significantly less power.
BTLE devices will go into sleep mode and wake only for connection attempts or events.

Client:

  • The client is the device that initiates GATT Commands and accept responses.
  • For our example,the Android device will act  as the client .However Android BTLE API does allow the Android device to act as the server.

Server:

  • The Server is the device that receives GATT commands or requests and return responses.
  • For example Heartrate monitors,Nonin devices

Characteristic:

  • A Characteristic is a data value transferred between the client and server.
  • For example, in addition to the heart rate measurement, a heart rate monitor can also report its current battery voltage, device name, or serial number.

Service :

  • A service is a group of  Characteristic
  • Many devices implement the Device Information Service.  This service is made up of characteristics such as manufacturer name, model number, serial number, and firmware revision.

Descriptor:

  • A Descriptor provides additional information about a Characteristic.
  • For instance, a temperature value characteristic may have an indication of its units (Celsius or Fahrenheit) or the valid range, the upper and lower values which the sensor can measure.

Attributes:

  • Services, characteristics, and descriptors are collectively referred to as attributes
  • Identified by UUIDs(126 bit number)
  • Format : xxxxXXXX-xxxx-xxxx-xxxx-xxxxxxxxxxxx
  • *Developer always have to concentrate on Highlighted 4 digits.
  • This digits are defined by the Bluetooth Special Interest Group(SIG)

GATT Operations:

  • Discover  UUIDs  for  all  primary  services. : This operation can be used to find if a device supports Device Information Service.
  • Discover all characteristics for a given service : Some BP devices also include battery measurement characteristic.

Read and write descriptors for a particular characteristic :

  • one of the most descriptors used is the “Client Characteristic Configuration Descriptor”.
  • This allows the client to set the notifications to Indicate or notify for a particular Characteristic.
  • It the client sets the notification enabled bit,the server sends a value to the client whenever information becomes available.
  • Setting Indication Enabled bit will also enable the server to send notification when information is available.Only difference is Indicate mode requires a response from the client.

Read and write to a characteristic:

  • A client may read characteristic from BLE device
  • A client may write to a characteristic while upgrading  the firmware of the remote device.

 

Advertisements