Book Image

IoT Projects with Bluetooth Low Energy

By : Madhur Bhargava
Book Image

IoT Projects with Bluetooth Low Energy

By: Madhur Bhargava

Overview of this book

Bluetooth Low Energy, or Bluetooth Smart, is Wireless Personal Area networking aimed at smart devices and IoT applications. BLE has been increasingly adopted by application developers and IoT enthusiasts to establish connections between smart devices. This book initially covers all the required aspects of BLE, before you start working on IoT projects. In the initial stages of the book, you will learn about the basic aspects of Bluetooth Low Energy—such as discovering devices, services, and characteristics—that will be helpful for advanced-level projects. This book will guide you through building hands-on projects using BLE and IoT. These projects include tracking health data, using a mobile App, and making this data available for health practitioners; Indoor navigation; creating beacons using the Raspberry Pi; and warehouse weather Monitoring. This book also covers aspects of Bluetooth 5 (the latest release) and its effect on each of these projects. By the end of this book, you will have hands-on experience of using Bluetooth Low Energy to integrate with smart devices and IoT projects.
Table of Contents (15 chapters)
Title Page
Credits
Foreword
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

Designing the Tracking App


As already indicated, in this section, we will be designing an app for both Android and iOS platforms, which listens for RSSI updates from a broadcasting iTag sensor and uses these values to predict the distance of the iTag from the receiver.

Our development pre-requisites and setup remain exactly similar to those defined in Chapter 3, Building a Service Explorer App.

Android

We begin by creating an empty project in the Android Studio. We have chosen the name AndroidiTagPersonalTracker; feel free to be creative with your project's name. We have already done this exercise in Chapter 2, Setting Up; hence, we will not be covering that here again.

Note

When you are creating any Android-based Bluetooth Low Energy Project, remember to select the minimum API Level as 21 during the setup, since many Bluetooth Low Energy related system API calls require minimum API level 21.

Once we have finished creating our empty project, as a first step, we can define some simple user interface...