Bluetooth Low Energy Quick Start Guide
Introduction
This document serves as a Quick Start Guide for anyone who wants to setup BLE connectivity in order to utilize this technology with Novacura Flow.
BLE (Bluetooth Low Energy)
BLE or formerly known as Bluetooth Low Energy is a low power wireless communication technology that can be used over a short distance to enable smart devices to communicate. Compared to Classic Bluetooth, BLE is intended to provide considerably reduced power consumption and cost while maintaining similar capabilities. Therefore, BLE is especially well suited for sensors, actuators and other IoT devices that require periodic transfer of data while maintaining extremely low power consumption. There are many use cases of BLE in industrial settings such as Asset Tracking, Internal Navigation, Security, Advertising & etc.
BLE uses a Client/Server or Central/Peripheral model.
Central (Client) - A device that initiates request and accepts responses.
Examples: computer, smartphone
Peripheral (Server) - A device that receives requests and returns responses.
Examples: a temperature sensor
Advertising is how devices are found in BLE. Peripherals (Server) advertises its availability for connection by broadcasting packets of data at regular intervals. The Central (Client) scans for nearby peripherals and when it finds a device (Peripheral) it wants to connect to, it initiates a connection. Once connected the Central (Client) can begin exchanging information with the Peripheral (Server).
Peripheral vs Central
To demonstrate the concept of Peripheral/Central model we can use two smart phones. One will act as Server and the other will act as Client.
Peripheral Device (Server)
BLE device that advertises its availability for connection. Usually, it is a sensor or some form of IoT device. For demonstration purpose we will use an Android smartphone to act as Peripheral with the help of a third-party app available in the market.
On your Android device:
Open the App and you should see a screen similar to the one below.
Click on Battery and you will be asked to turn on Bluetooth if not already done.
Now the device is ready to act as a Peripheral. As long as you are on the above screen, the Peripheral device will advertise the Battery Service with battery level. You can set the battery level by editing the numeric value or by dragging the progress bar.
Central Device (Client)
BLE device that connects to the Peripheral. This can be a PC, Tablet, or a smartphone. In Flow context, the device which runs flow (ex - Flow mobile Client) always acts as Central (Client). For demonstration purpose we will use the other smartphone to act as Central (Client) with the help of a third-party app available in the market.
On another Android or iOS device:
Open the App and you will be asked to turn on Bluetooth if not already done. You will see a screen with list of Peripheral devices with a CONNECT button right next to it.
Select your Peripheral device and click on the CONNECT button. Now the Central (Client) is connected to the Peripheral (Server).
Scroll down and select the Battery Service.
Click on the SUBSCRIBE button.
You can change the data format by simply clicking on the Data format dropdown. For string values, you can use UTF-8 String. If you choose Binary, data will be visible in Binary format.
References
Last updated
Was this helpful?