Editor: Roy Want n n [email protected]

Bluetooth LE Finds Its Niche

Roy Want, Bill Schilit, and Dominik Laskowski

or years, researchers have been to employ a wireless network, that net- The LE extensions were inspired by the Fwriting about the work needed to consume less power need to support sensors in home and and sensor networks, describing them and cost less—commensurate with the office environments, including motion as integral to the future of computing. hardware it was augmenting. sensors, light detectors, thermostats, However, despite the advantages they The solution was to define a new pedometers, and heart monitors. offer, neither has experienced wide- wireless standard that wasn’t a full- The design’s power target was to run spread adoption. Here, we discuss the blown network solution but instead a a wireless sensor for at least one year new Bluetooth Low Energy (LE) proto- wireless cable replacement technology on a single coin cell (approximately col, which might be the missing link for at 1 Mbps. In 1998, Ericsson, Nokia, 200 mAHr) and to communicate with these technologies. Bluetooth LE fills a and formed a special interest it using a laptop or cell phone at a data gap, efficiently linking smartphones group (SIG) and developed the stan- rate suited to these applications. In and low-power sensors previously dard known as Bluetooth—named fact, Bluetooth LE is limited to approx- unsupported by wireless standards after King Harald Bluetooth, who imately 200 kbps but is adequate to such as Classic Bluetooth and Wi-Fi. united the countries of Scandinavia in support common sensor applications 970 AD. The name was apt given that that require only a small amount of The Road to Bluetooth LE Bluetooth aimed to “unite” cell phones, data to be transmitted periodically, In the late 1990s, cell phone and lap- accessories, and laptops. Furthermore, perhaps once per second or minute, top manufacturers, along with vendors Ericsson and Nokia are based in Scan- depending on the situation. of headsets, mice, and other accessory dinavian countries (Sweden and Fin- devices, realized that connecting their land, respectively). LE Wireless Technology products would enable new types of The first Bluetooth v1.0 standard was LE was designed to exploit the existing multidevice applications. However, released in 1999 and became the IEEE 2.4GHz Bluetooth radio band to reduce the contemporary practice of employ- standard 802.15.1 in 2002, but it didn’t cost and complexity in existing radio ing cables was cumbersome. Clearly, live up to its namesake. Manufacturers­ solutions. The transmit output power ­wireless technology would be more con- of small, very-low-power devices is variable up to 10 mW, with a maxi- venient, but it required the right combi- (including mice, heart rate moni- mum device current of approximately nation of operating characteristics. tors, and home security sensors) often 15 mA at 3 volts (the sleep current is Standards such as IEEE 802.11b, adopted other, sometimes custom, wire- approximately 1uA). Instead of using now known as Wi-Fi, were on the less technologies or alternate standards, 79 frequency-hopped channels, as in verge of commercialization to support such as ZigBee. Classic Bluetooth, LE uses a larger conventional local-area networking The most recent revision, Bluetooth modulation index with 40 channels on over wireless. However, unlike lap- v4.0 (www.bluetooth.org), is fully a 2 MHz spacing, and of these, three tops with large batteries or desktops compatible with classic Bluetooth but channels are used for advertising: 37, using mains power, feature phones is extended by the new Bluetooth LE 38, and 39. Many of the LE interactions and accessories had relatively meager or “Smart” protocol. This extension use an asynchronous connection-less power supplies. Wi-Fi, in its original provides an even lower-power interface MAC protocol, in which most transac- form, was an 11 Mbps network, with than the classic Bluetooth and is opti- tions occur within three ­milliseconds. power usage on the order of 500 mW. If mized to communicate with very-low- Packet structures are uniform, and only small, ­power-constrained devices were power devices, such as wireless sensors. a few packet types are needed.

12 PERVASIVE computing Published by the IEEE CS n 1536-1268/13/$31.00 © 2013 IEEE

PC-12-04-Smartphones.indd 12 01/10/13 9:10 PM Advertising Data 83288 0 to 296 24 Bits Unlike Classic Bluetooth, there’s no lengthy discovery process to find nearby devices. Instead, peripheral devices can broadcast on the three advertising chan- Cyclic Access Data redundancy nels by sending an ADV_IND packet. address Length Header check Such packet transmissions are kept short, Preamble with only 31 bytes available for applica- tion payload data, in addition to the nec- essary preamble, packet header, MAC address, and checksum fields (Figure 1). Figure 1. An example Bluetooth LE packet format. Packet transmissions are kept The structure of the data payload is short, with only 31 bytes available for application payload data, in addition to the a series of parameters, defined by the necessary preamble, packet header, mac address, and checksum fields. Bluetooth SIG, and includes a manu- facturer-specific data field. The simplest use of ADV_IND packets is to broad- cast a sensor value once per second in Applications Apps the manufacturer specific data field, and then sleep between transmissions.

If 31 bytes isn’t enough for an applica- Generic access profile tion, there are two other ways to use the protocol providing more flexibility. Generic attribute profile The first is a simple mechanism that Host supports active scanning. If an ADV_ Attribute protocol Security manager IND packet is transmitted with the appropriate flag set, it indicates that it Logical link control and adaptation protocol supports active scanning. This tells a Host controller interface host, or central device in LE terminol- ogy, that more data is available, and Link layer Direct test mode it can transmit a scan request packet Controller (SCAN_REQ) to the peripheral after Physical layer the ADV_IND packet is received. In response, the peripheral device will send back a SCAN_RSP packet which Figure 2. The Bluetooth Low Energy (LE) stack. contains another 31 bytes of applica- tion data. The request/response pair is effectively a lightweight remote pro- connect to these services to read and can be read by connecting to the GATT cedure call returning data to the host. write attributes using the Attribute pro- layer (see Figure 2) and requesting all Using this mechanism, up to 62 bytes tocol (ATT). The Bluetooth SIG defines of the service identifiers and their cor- of data can be transferred to the host. some of these services represented by a responding attributes. Attributes are However, in the general case, appli- 16-bit address format, but manufactur- defined as characteristics of the ser- cations might need bidirectional and ers can also define their own services vice, where each one has a value and unconstrained data transfer. Using a using a 128-bit universally unique a set of descriptors (see Figure 3). A lightweight client-server mechanism, identifier. A summary of services that characteristic descriptor provides type enabled by the Generic Access Pro- a peripheral device supports can be information, such as the value’s format file (GAP) profile, can offer such data included in the device’s ADV_IND and how it’s represented—in integer or transfers. Furthermore, GAP supports packet, providing a hint of its function- Boolean format, for example. In this predefined, or user defined, Generic ality to a host device that’s considering way, a host can read the descriptors Attribute (GATT) services. whether to establish a connection. from a peripheral and write values that However, because the ADV packets control its operation. GAP and GATT Services have limited space, in practice, the ser- Operations on a value might be A GAP device can support one or more vice list will be a subset of what’s actu- linked to additional components, GATT services, and a host device can ally available. The full list of services such as physical actuators though

October–December 2013 PERVASIVE computing 13

PC-12-04-Smartphones.indd 13 01/10/13 9:10 PM SmartPhones SmartPhones

Bluetooth LE client Bluetooth LE server

Service A Service B

Characteristic 1 Characteristic 1

Properties Properties

Value Requests Value

Descriptors Descriptors

Characteristic 2

Properties

Responses Value

Descriptors

Figure 3. The Bluetooth LE Attribute protocol, implemented by Generic Attribute (GATT) services containing characteristics, each with an attribute and corresponding value.

­bit-mapped input/output, to produce Some popular LE peripheral solu- because the module has already passed a physical result when written. Simi- tions include the Texas Instruments FCC-compliance testing requirements. larly, a value can be read from a char- CC2450,2 based on an 8051 inter- acteristic that reports the current state nal microcontroller, and the Nordic Platform of a real-time sensor. The simplicity of nRF51822,3 based on an embedded Support providing a general-purpose interface ARM core. Both companies provide Most smartphones and laptops designed enables reading and writing of attribute a wealth of supporting materials, in the last two years include a Blue- values, with low overhead and imple- including developer kits, prototype tooth v4.0 chipset that integrates the mentation cost, which lowers the bar- sensors and tags, protocol analyzers, Bluetooth LE hardware. As with many rier for innovation in this area. and example code for common LE innovations, it takes time for a platform applications. operating system to incorporate the nec- Peripheral LE Solutions There are also numerous third-party essary drivers and APIs. The iOS operat- Although most mobile device Bluetooth vendors that are integrating these chips ing system was the first mobile OS to solutions support LE, they also provide into their own module, sold as a com- do this, and, as a result, many products the full classic Bluetooth functional- plete Bluetooth LE solution—such as based on Bluetooth LE only operate in ity. When ­designing a tiny, wireless, the BlueGiga module and development conjunction with an iPhone app.4 battery-operated sensor, only the LE kit (see Figure 4). These devices encap- At the Google-IO developers ­wireless functions are needed, providing sulate the RF design, which includes the forum in San Francisco in May 2013, an opportunity to reduce power con- radio, ground-plane, antenna, shield- Android support for Bluetooth LE was sumption, silicon size, and device cost. ing, and interface components. This announced in the Android 4.3 release Today, several commercial semiconduc- approach tends to be more expensive of JellyBean.5 The Microsoft Windows tor solutions provide just the Bluetooth than engaging in a completely custom phone v8.1 OS release is also expected LE capability in a form that supports a solution, but has some benefits when to have Bluetooth LE support in the wide variety of embedded applications. integrating it into a new product, near future. Now that the major phone

14 PERVASIVE computing www.computer.org/pervasive

PC-12-04-Smartphones.indd 14 01/10/13 9:10 PM SmartPhones

operating systems support LE, and with others following soon, there’s likely to be an explosion of new applications and products in this area.

Application Categories Many types of applications can use this potentially ubiquitous low-power ­technology, including those for

• environmental control (monitoring heating, ventilation, air conditioning, humidity, and light); • security (sensing motion or window and door movement); • health monitoring (tracking blood pressure, heart rate, pulse, blood oxygen, and posture); • sports and activity monitoring (iden- tifying when a person is running, Bluetooth LE module bicycling, walking, or sitting, or counting steps while hiking); Figure 4. A BlueGiga Bluetooth LE development kit. The Bluetooth LE module is • proximity detection (locating devices incorporated into the development board and could become the core component of and sending alerts when devices are future products. out of range); • user interface (UI) extensions (show- device (or smartphone) application with the virtual world of the Internet Figure 3. The Bluetooth LE Attribute protocol, implemented by Generic Attribute (GATT) services containing characteristics, each ing phone alerts on a smart watch); when lost. Products in this space include using RFID tags. This potential evolu- with an attribute and corresponding value. and Proximo (www.kensington.com), Tile tion of the World Wide Web would let • power conservation (monitoring (www.thetileapp.com), and StickNFind computers be aware of not only the vir- because the module has already passed power for smart devices). (www.sticknfind.com), each with a tual digital objects in their file servers but FCC-compliance testing requirements. small form factor solution well suited also objects, people, and things in the Other applications include using Blue- to this application (see Figure 5). physical world. In other words, a future Smartphone Platform tooth LE to transfer credentials between A smartphone application will typi- Internet search could make a reference Support devices that enable higher-bandwidth cally locate a tag by showing a graphic to an object in the real world, possibly Most smartphones and laptops designed connections. Similar to near-field com- depicting what tags are in the vicinity letting you control and probe its state. in the last two years include a Blue- munication, the Bluetooth LE protocols and indicating their range, which is esti- Around 1999, the “Internet of tooth v4.0 chipset that integrates the can bootstrap the connection between mated based on a combination of the Things” was coined as a popular term to Bluetooth LE hardware. As with many other wireless technologies that rely on advertised transmission signal strength describe this concept, and many white innovations, it takes time for a platform shared credentials to ensure a channel is and the signal strength measured by papers were written about its potential. operating system to incorporate the nec- secure. Because LE can be constrained the receiver. If a device isn’t located, the There’s even a related conference (www. essary drivers and APIs. The iOS operat- to operate over a short range, reducing user can walk around trying to pick up china-iot.net/iThings2013.htm), which ing system was the first mobile OS to the radio’s transmit power can limit the signal or can listen for a sound alert started in 2008. However, despite all do this, and, as a result, many products the distribution of those credentials to made by the app when detected. The the work and interest in this area, we based on Bluetooth LE only operate in devices in the immediate vicinity. application can also provide informa- haven’t seen the technology take off and conjunction with an iPhone app.4 tion about when and where the device become adopted in mainstream work At the Google-IO developers Example Products was last detected. This is particularly practices. The reasons for this might be forum in San Francisco in May 2013, One of the most prolific types of Blue- useful when you’ve lost your keys but subtle, but it’s probably an indication Android support for Bluetooth LE was tooth LE devices marketed to date has still have your smartphone handy. that the key ingredient—the catalyst for announced in the Android 4.3 release been “finder” technologies for device adoption—hasn’t been invented. of JellyBean.5 The Microsoft Windows tagging. These small, lightweight tags The Internet of Things Although RFID has been in existence phone v8.1 OS release is also expected can be attached to things, such as keys, As long ago as 1996, researchers at for over 40 years, common standards, to have Bluetooth LE support in the computers, bags, and books, in a non­­ Xerox PARC were experimenting with low-cost tags, and a widely deployed near future. Now that the major phone intrusive way, and located with a mobile systems for bridging the physical world reader system are still missing. The

October–December 2013 PERVASIVE computing 15

PC-12-04-Smartphones.indd 15 01/10/13 9:10 PM SmartPhones SmartPhones

computers, and RFID—the underlying technology and supporting ecosystem must mature to the point where the value proposition outweighs the investment, not only in terms of invest- ment costs but also user time, over- head, usability, and maintenance. Bluetooth LE might be the missing link, enabling pervasive adoption of the IoT and sensor networks. How- ever, it will be a few years of develop- ment before we really know if Blue- tooth LE is the critical ingredient to make these visions a reality.

References

1. “CC2450 Data Sheet,” Texas Instru- ments, 2013; www.ti.com/lit/ds/­symlink/ cc2540.pdf.

2. “nRF51822 Data Sheet,” Nordic, 2013; www.nordicsemi.com/eng/Products/ Bluetooth-R-low-energy/nRF51822.

Figure 5. A proximity solution: (a) a smartphone app with (b) a locator fob and (c) the 3. “Core Bluetooth Framework Reference,” Kensington Proximo LE tag. iOS Developer Library, 2013; http:// developer.apple.com/library/ios/docu- mentation/CoreBluetooth/Reference/ CoreBluetooth_Framework/_index.html. smartphone industry has made some the costs associated with maintaining steps toward solving this problem with numerous sensors. Even supporting 4. “Bluetooth Low Energy,” Android Developers, 2013; http://developer. the recent adoption of NFC readers (a their power requirements has been an android.com/guide/topics/connectivity/­ subset of the RFID standards) in a few issue—changing batteries on this scale bluetooth-le.html. phone models. However, given that the is labor intensive, and scavenging envi- majority of smartphones already have ronmental energy isn’t always practical. Bluetooth LE radio technology built The low energy requirements of Blue- Roy Want is a research in, the emergence of the Bluetooth LE tooth LE might help reduce the finan- scientist at Google. Contact standard might present the first practi- cial burden for sensor networks, either him at [email protected]. cal opportunity to building out the IoT. because battery replacement is needed far less frequently, or because a sensor Sensor Networks battery lasts long enough for the entire Similar to the IoT, sensor networks have module to be expendable. held the promise of microscale monitor- Finally, as with the IoT example, the Bill Schilit is a research ing of our environment, encompassing millions of smartphones in the world scientist at Google. Contact pollution control, structural monitor- act as a platform that can link data him at schilit@computer. ing (seismic and corrosion), and bet- captured by Bluetooth LE sensors to org. ter weather prediction. Such networks cell towers with wired Internet con- might also monitor energy usage, detect nections. Thus, the cost of readers, or energy waste, and improve security. The Internet gateway devices, is dramati- key advantage of such networks is that cally reduced by using the serendipity Dominik Laskowski is a data is sampled at a high spatial resolu- of nearby smartphones. computer engineering stu- tion, far higher than would be possible dent in his final year of a Bach- with conventional wired solutions. elor of Engineering at McGill One reason why the technology has s with many early ideas—includ- University. Contact him at had minimal adoption is because of A ing early visions of e-books, tablet [email protected].

16 PERVASIVE computing www.computer.org/pervasive

PC-12-04-Smartphones.indd 16 01/10/13 9:10 PM