Examples of Bluetooth central peripheral communication

This section will consider some examples of central-peripheral communication in Bluetooth Low Energy so that the readers get a clear vision of the possibilities. As described before, central and peripherals are the terms used in accordance with the GATT roles. The advertiser is peripheral and the connection initiator is central. Peripheral will broadcast its identity but once it is paired with a central, its identity will only be recognized by that central until unpaired. This function gives better security to BLE peripherals because they will not be shown in the open scan by other devices.

In central-peripheral communication, centrals do not advertise their existence (unless it is a feature in the cellular-phone). They can scan and read the advertisements from the peripherals before connecting to it. Advertisement data can be configured on peripheral so that the peripheral can broadcast useful information to the central without any need of a connection. A sample advertisement data from peripheral includes:

  • Advertisement type
  • Transmission power
  • Service UUID and relevant data
  • Device's physical address
  • Flags (such as GeneralDiscoverable and LeAndBrErdCapable and so on)

The advertisement data may include manufacturer specific data. There is no limitation on the size of this data but it is recommended to limit it. If the advertisement data is long, it may compromise the power efficiency of the device broadcasting it. The manufacturer's data contains its id which is typically 2 bytes long which is followed by the manufacturer's data. Central can receive this data as a result of its scan and then parse it to extract information. Any sensitive information that needs not to be publicly available should not be put in the manufacturer's data.

A view of the manufacturer's data in Nordic Connect app is shown as follows:

A view of manufacturer's data in Nordic Connect app
Readers can download nRF Connect app and try scanning the surrounding BLE devices to study their advertising data.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.21.233.41