Bluetooth

Article by:
Date Published:
Last Modified:
WARNING
This page is in notes format, and may not be of the same quality as other pages on this site.

Overview

The Bluetooth icon/logo.

The Bluetooth icon/logo.

Bluetooth is a collection of short range wireless communication protocols. The Bluetooth Special Interests Group (SIG) was founded in 1998 and oversees the development of Bluetooth standards1. The original Bluetooth is known as Bluetooth Classic and was designed as a short-range wireless point-to-point communications protocol.

TIP

Bluetooth was named after King Harald “Bluetooth” Gormsson who united Denmark and Norway in 958. He had a dead tooth that was blue/grey in colour, and hence his nickname “Bluetooth”. The protocol was named after him because the wireless standard was intended to unite PC and and cellular industries with a short-range wireless link2.

Piconet And Scatternets

A Piconet is the term used for a small Bluetooth network with 1 master device connected to up to 7 active slave devices. Up to 255 more slave devices may be connected to the master but in a inactive or “parked” state. Active slaves can be parked to bring parked devices into the active state3.

Both active and parked slaves in a Piconet are time-synchronized to the master so that RF contention does not occur (they implement a Time Division Multiple Access (TDMA) network).

A Scatternet is two or more independent Piconets which are connected together by one node in one Piconet (either the master or a slave) also acting as a slave in the second Piconet4.

Advanced Audio Distribution Profile (A2DP)

This is a bluetooth standard which supports the streaming of audio between bluetooth-enabled devices.

Bluetooth 4.0

In 2010, the Bluetooth Core Specification version 4.0 was released. This included Bluetooth Low Energy (BLE), which is now more commonly known as Bluetooth Smart. Bluetooth Smart specifies a hub-and-spoke connection model (with broadcast support), but no mesh topology.

An attribute is a piece of labelled and addressable data. A characteristic is a group of attributes, and a service is a group of attributes.

attribute < characteristic < service

Bluetooth 4.0 uses the server/client paradigm.

Bluetooth Low Energy (BLE)

Bluetooth Low Energy (BLE) is a Bluetooth protocol specifically designed for communication on low power devices that need to run for months or years of small batteries.

Channels

BLE has 40 channels, compared to Bluetooth Classic which has 795.

Advertising

Advertising is when a BLE peripheral broadcasts packets to any device that wants to listen. Advertising allows a low energy device to sleep most of the time, only waking up periodically for a short amount of time to send a new advertisement packet. Advertising is unidirectional, the peripheral sends out unsolicited data and expects no response. To achieve 2-way communication you have to connect with the BLE peripheral.

Advertisement packets give you 31 bytes of data for application specific use.

When a phone or other connecting device sees advertisement packets from a BLE peripheral, it can request more information with a scan request. The phone send the device a scan request packet, the the device responds with a scan response packet. Both Android and iPhone devices automatically emit a scan request packet when they discover a new device as part of the Bluetooth scanning process5.

Beacons

Beacons are BLE peripherals that use advertisement exclusively, and do not allow for connections. This is so that the device can always be found and used, if a connection occurs then the peripheral is meant to stop advertising5.

Apple’s iBeacon is the most popular beacon standard.

Bluetooth Smart Mesh Working Group

In 2017, a set of three specifications were released by the Bluetooth SIG:

  • Mesh Profile
  • Mesh Model
  • Mesh Device Properties

These specifications allowed Bluetooth devices to form a mesh network. Mesh Profiles use Bluetooth LE for it’s underlying radio communications, and as such Mesh Profiles work with Bluetooth 4.2 and Bluetooth 5 devices.

Bluetooth Mesh data packets can be up to 384 bytes.

Packet Delivery

Packets are not routed in a Bluetooth mesh, but instead use flooding. Packets are not sent through a particular sequence of nodes to reach the destination, nor are routing tables kept by any of the nodes. Instead, nodes can be designated as relays receive the message and re-broadcast it to everyone in range. Any relays receiving this will then re-broadcast it again, and so on. Nodes keep track of the packet ID so that they do not re-transmit a message they have already received and transmitted before. This method of flooding is intended to keep the network simple and resilient to node failure. If nodes acted as routers, their failure might have a significant impact on the network6.

Latencies

Bluetooth mesh latency depends on the payload size, number of nodes (incl. number of relays) and the connection topology. You can expect round-trip latencies of around 50ms for packets with an 8 byte payload that go through 3 hops7. Silicon Labs has a great application note, AN1137: Bluetooth Mesh Network Performance which goes into mesh latencies in more detail.

Encryption

Two types of encryption keys:

  1. Network keys: Specific to a physical network.
  2. Application keys: Specific to the function of the data, e.g. reading sensor values vs. configuring the sensor.

Generic Models

Generic OnOff Server

Generic Level Server

References


  1. Wikipedia (2023, Apr 27). Bluetooth Special Interest Group. Retrieved 2023-05-24, from https://en.wikipedia.org/wiki/Bluetooth_Special_Interest_Group↩︎

  2. Bluetooth SIG. About Us - Origin of the Bluetooth Name. Retrieved 2023-05-24, from https://www.bluetooth.com/about-us/bluetooth-origin/↩︎

  3. Wikipedia (2021, May 16). Piconet. Retrieved 2023-05-24, from https://en.wikipedia.org/wiki/Piconet↩︎

  4. Vijay K. Garg (2007). Wireless Personal Area Network — Bluetooth. Wireless Communications & Networking. Retrieved 2023-05-24, from https://www.sciencedirect.com/book/9780123735805/wireless-communications-and-networking↩︎

  5. Argenox. BLE Advertising Primer. Retrieved 2024-02-27, from https://www.argenox.com/library/bluetooth-low-energy/ble-advertising-primer/↩︎ ↩︎ ↩︎

  6. Martin Woolley (2017, Aug 1). BlueTooth Blog - An Intro to Bluetooth Mesh Part 2. BlueTooth SIG. Retrieved 2023-05-24, from https://www.bluetooth.com/blog/an-intro-to-bluetooth-mesh-part2/↩︎

  7. Silicon Labs. AN1137: Bluetooth Mesh Network Performance. Retrieved 2023-05-24, from https://www.silabs.com/documents/public/application-notes/an1137-bluetooth-mesh-network-performance.pdf↩︎


Authors

Geoffrey Hunter

Dude making stuff.

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License .

Related Content:

Tags

comments powered by Disqus