Book Image

Building Bluetooth Low Energy Systems

By : Muhammad Usama bin Aftab
Book Image

Building Bluetooth Low Energy Systems

By: Muhammad Usama bin Aftab

Overview of this book

Bluetooth Low Energy (BLE) is a Wireless Personal Area network technology aimed at novel applications for smart devices. High-tech BLE profiles and services are being increasingly used by application developers and hardware enthusiasts to allow devices to interact with the surrounding world. This book will focus on a technical introduction to BLE and how it is reshaping small-distance communication. We will start with IoT, where many technologies such as BLE, Zigbee, and IEEE 802.15.4 Mesh will be introduced. The book will present BLE from an engineering perspective, from which the protocol stack, architecture, and layers are discussed. You will learn to implement customized projects for Peripheral/Central communication, BLE Beacons, indoor navigation using triangulation, and the Internet gateway for Bluetooth Low Energy Personal Network, all using various code samples and APIs on Android, iOS, and the Web. Finally, the book will conclude with a glimpse into future technologies destined to be prominent in years to come.
Table of Contents (14 chapters)
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

Bluetooth Low Energy for the Internet of Things


Bluetooth Low Energy was built to fulfill the requirements of the Internet of Things. Bluetooth SIG took a significant step when they decided to revamp the protocol stack of the Bluetooth. Bluetooth Classic was successfully transformed into Bluetooth Low Energy and adopted rapidly in the IoT devices and more importantly, in cellular phones. Bluetooth low energy can be summarized in two basic factors: power efficiency and simple architecture. While ZigBee is commercially successful and has been used for quite a while, Wi-Fi and Bluetooth Low Energy are the only famous and widely spread standards used in consumer electronics. If the judgment criteria are strictly on the basis of the adoption rate, Bluetooth Low Energy surpasses ZigBee as the adoption rate of the ZigBee is almost zero in the smartphones.

Applications of BLE in IoT

In the past five years, the work in the Internet of Things is significant in comparison to the previous times. Many manufacturers and start-ups are focusing on this technology in order to make accessories for the smartphones. The reason manufacturers are more focused towards the BLE as compared to any other technology is that they want to increase the adaptability of their IoT devices. As most of the smartphones exist have Bluetooth technology in it, the adoption rate of these accessories is tremendous as compared to any other standard. People want to use their smartphones to control and interact with things. It would be great if they can control the bedroom light from their smartphone or turn off the stove from their cell phone.

The promity sensing, indoor navigation, fitness tracking and other countless applications have already found their way in the Bluetooth Low Energy. Users do not have to sacrifies the battery life while enjoying the connection with their favorite IoT devices. At this moment, it is not clear if the future of IoT lies in the combination of several wireless standards in one device (for example, combining Wi-Fi and BLE both in a single device) or there should be one stand-alone standard which is the master of everything. It is sensible to predict that there is no significant loss if there are multiple standards in one device as the architecture and technology become cheaper. The companies in consumer electronics will not hesitate to go to multi-standard solutions in the longer run.

Bluetooth World event organized by Bluetooth SIG in Santa Clara, United States

Companies like Google, Apple, and Intel are already backing up the BLE standard. The progress and the agreement of the industry can be seen in the work of the Bluetooth SIG because as of June 2016, SIG announced a new version of BLE as Bluetooth 5. Quadrupling the range and doubling the speed will make Bluetooth Low Energy compete more aggressively in the market. In Bluetooth World 2016, which is an annual event organized by the Special Interest Group, many manufacturers were present to show their products. It showed the diversity how companies are changing the way we think about Bluetooth technology. CSRMesh which is acquired by Qualcomm, showed off their mesh technology built over Bluetooth to take this standard to another level and truly threat ZigBee as it is the only standard that provides a low powered mesh architecture.

Bluetooth Low Energy Beacons

The modes of communication of Bluetooth Low Energy are already discussed in this chapter that is why it is a good point to introduce the Bluetooth Low Energy Beacons. They are the broadcast only devices that advertise certain information to the users around them. This functionality enables a user to receive information from the beacon and in some cases take actions too. These broadcast happens in a limited proximity and can be changed by modifying the properties of the beacons.

Bluetooth Low Energy Beacon use-case

A use-case of Bluetooth Low Energy Beacons is their implementation in the bus stops. Instead of putting the bus timings on the transit board, it would be better if the bus stop broadcasts this information through Bluetooth. Since BLE is a low power consuming technology, it is completely feasible for the user to receive this information from the bus stop. Another use-case can be the boutique sales. Instead of putting up the banners, shops can broadcast the information through Bluetooth beacons and the shoppers around them receive a notification in their cell-phone about the sale.

The battle between Google and Apple can be seen by these logos:

Apple iBeacon and Google Eddystone logos

Communication model of BLE Beacons

Bluetooth Low Energy Beacons are based on the one-way communication model. This is important because it will be inappropriate if someone changes the broadcast data on the beacons. Bluetooth Low Energy Beacons are supported by two of the best companies in the consumer electronics market. Google and Apple have their own protocols made for Bluetooth beacons. Google Eddystone is an Apache 2.0-licensed cross platform profile available for Bluetooth beacons. It works on different frame types like Eddystone-UID, Eddystone-URL, and Eddystrong-TLM. iBeacons, on the other hand, is a protocol developed by Apple in 2013 serving the same purpose. These topics are discussed in a greater detail in Chapter 4, Bluetooth Low Energy Beacons.

Bluetooth mesh networks

The mesh networking is a proven technology in terms of design and scalability. Information Technology has already seen the advantages of this technology in the form of wireless mesh networks, wireless sensor networks, mobile ad-hoc networks and vehicular ad-hoc networks. In the Bluetooth World 2016, SIG showed their interest in the mesh technology and announced that they are working with Qualcomm to build a first generation mesh technology by next year.

The mesh technology is a significant advantage of ZigBee in the latest times because it is fully developed and fully functional mesh mechanism to support upto 65,000 nodes mesh. Bluetooth, on the other hand, does not support mesh technology. By entering in the mesh networking, Bluetooth Low Energy will become powerful enough to replace ZigBee in the commercial industry. Logical prediction can be made that the adoption of the Bluetooth mesh will be much faster as it will be supported by the cellular phones, tablets, and laptops.

A much detailed overview and a practical hands-on approach on the Bluetooth Mesh will be discussed in Chapter 6, Bluetooth Mesh Technology.