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

Writing an App to Detect the Beacon


Our Beacon is already up and advertising. We will now write an app to detect the Beacon and the contents of the advertisement. Although Eddystone has excellent documentation provided by Google for both Android and iOS. Eddystone is originally developed by Google and in general sense has a more elaborative setup on Android. Hence, we shall start with Android first and then move on to iOS. For iOS, we shall give you a head start on the code and then expect that you do the rest as an exercise to gain a solid footing.

Prerequisites for this section:

  • A Raspberry Pi 3(setup as described in the previous section)

Android:

  • Latest Android Studio
  • A Latest Android Device(Preferable Samsung Galaxy S8, since it has support for Bluetooth 5 otherwise Any Device with an API Level of 23(Android M) is fine)
  • Basic familiarity with Java and Android

iOS:

  • XCode 8.2
  • A latest iOS device(Our development device uses iOS 9.3.5)
  • Basic familiarity with Swift 2.3 and iOS

 

Android

An interesting...