Bluetooth Connectivity - an Introduction

January 3, 2017
Need help on this topic?
Contact Us

An Introduction to Bluetooth and Bluetooth Smart

Since the advent of Bluetooth Version 4.0, there are two radically different Bluetooth standards, Classic Bluetooth and Bluetooth Smart (previously referred to as Bluetooth Low Energy, or BLE). Classic Bluetooth aimed to unify a plethora of devices under one short range, wireless communication standard. Classic Bluetooth has higher throughput, but comes with a lengthened discovery time and higher latency than Bluetooth Smart. By default, Classic Bluetooth offers a number of profiles that define specific use cases (examples include a Serial Port Profile, a Human Interface Device Profile, and a File Transfer Profile), however it was left up to the vendor to include the profile in their device in order for it to be supported.

With the introduction of the Bluetooth 4.0, a second standard called Bluetooth Smart was created, prioritizing intermittent, low energy communication and enabling developers to create their own custom behavior profiles. Like Classic Bluetooth, there are many predefined profiles defined by the Bluetooth Special Interest Group for Bluetooth Smart. One of the more notable omissions of Bluetooth Smart is the lack of a Serial Port Profile, which we developed internally at Promenade Software.

On Linux, BlueZ is the core software that handles Bluetooth communication, and since version 5.31, BlueZ supports Bluetooth Smart in addition to Bluetooth Classic. BlueZ consists of multiple parts, some of which exist on the kernel side, loading firmware and managing secure bluetooth communication, while other objects exist in user space. BlueZ lets the user interact with the host controller via a series of hci (short for host controller interface) tools, and a daemon called bluetoothd that handles incoming bluetooth events. In addition to command line utilities, BlueZ has a DBus API that can be used to customize behavior when pairing or transmitting with other Bluetooth enabled devices. This allows developers to customize whether or not their embedded device asks for a passkey, pin, or none at all during the pairing process, as well as customizing their device profile for communicating over Bluetooth Smart. For Bluetooth Classic, BlueZ allows you to load in predefined profiles through sdptool (short for service discovery protocol tool). By combining hci settings and custom DBus agents, profiles, and attributes, you can tailor BlueZ to meet your project’s requirements.

With the introduction of the Bluetooth 4.0, a second standard called Bluetooth Smart was created, prioritizing intermittent, low energy communication and enabling developers to create their own custom behavior profiles. Like Classic Bluetooth, there are many predefined profiles defined by the Bluetooth Special Interest Group for Bluetooth Smart. One of the more notable omissions of Bluetooth Smart is the lack of a Serial Port Profile, which we developed internally at Promenade Software.

On Linux, BlueZ is the core software that handles Bluetooth communication, and since version 5.31, BlueZ supports Bluetooth Smart in addition to Bluetooth Classic. BlueZ consists of multiple parts, some of which exist on the kernel side, loading firmware and managing secure bluetooth communication, while other objects exist in userspace. BlueZ lets the user interact with the host controller via a series of hci (short for host controller interface) tools, and a daemon called bluetoothd that handles incoming bluetooth events. In addition to command line utilities, BlueZ has a DBus API that can be used to customize behavior when pairing or transmitting with other Bluetooth enabled devices. This allows developers to customize whether or not their embedded device asks for a passkey, pin, or none at all during the pairing process, as well as customizing their device profile for communicating over Bluetooth Smart. For Bluetooth Classic, BlueZ allows you to load in predefined profiles through sdptool (short for service discovery protocol tool). By combining hci settings and custom DBus agents, profiles, and attributes, you can tailor BlueZ to meet your project’s requirements.

While Classic Bluetooth may have offered a simpler form of communication, Bluetooth Smart allows you to transmit with much lower latency and higher efficiency for small amounts of data (additionally, you no longer need to be a part of Apple’s MFi program to communicate to iOS using your own profile). Most modern Bluetooth adapters have dual mode support, which means they support both Bluetooth Classic and Bluetooth Smart, or are labeled Bluetooth Smart enabled. These types of Bluetooth adapters are becoming increasingly more common, as adoption rates have skyrocketed with the rise of IoT devices. So for your next wireless project, consider using Bluetooth Smart and BlueZ, combined they make a powerful open source wireless communication protocol. If you need any help, Promenade Software offers consulting from experts on the full Bluetooth stack.

Jed Gentry

Jed is a software engineer with a passion for technology. He is an expert on Linux and communications.

About Promenade Software

Promenade Software, Inc. specializes in software development for Medical Devices and other safety-critical applications.

Contact

Promenade Software, Inc.
16 Technology Drive,  Suite 100
Irvine, CA 92618 
U.S.A.
info@promenadesoftware.com
(949) 329-8570
Go to Contact Form