728x90

REF. 

https://interrupt.memfault.com/blog/ble-throughput-primer#:~:text=For%20Bluetooth%204.0%2C%20the%20BLE,be%20encoded%20in%20each%20symbol

 

A Practical Guide to BLE Throughput

A community and blog for embedded software makers

interrupt.memfault.com

https://novelbits.io/bluetooth-5-speed-maximum-throughput/

 

Bluetooth 5 speed: How to achieve maximum throughput for your BLE application

In this second post in the series on Bluetooth 5, we cover the new feature of 2x speed and how to achieve maximum data throughput for your BLE application.

novelbits.io

 

Why is it impossible to achieve the theoretical speeds of BLE?

The data rates of 1 Mbps (LE 1M PHY), 2 Mbps (LE 2M PHY), 125 kbps and 500 kbps (both using the LE Coded PHY with S=8 and S=2, respectively) are the rates at which the radio transmits data, but this is not achievable for the application throughput due to the following reasons:

  • Limit on the number of packets per connection interval
  • Inter Frame Space (IFS) delay between packets (150 us)
  • Empty packets required to be sent from a device even if no data is available for transmission
  • Packet overhead – not all bytes in a packet are used for payload

In order to better understand these factors and understand what impacts application throughput, we have to take a deeper look at the packet format. The following figure shows what LE 1M PHY and 2M PHY data packets look like:

The part we’re interested in (and the one that really defines the application data) is the ATT Payload. As you can see from the figure, there are a number of overhead bytes that are used by each layer in Bluetooth Low Energy.

  • In 4.0 and 4.1, the maximum ATT Payload is 20 bytes.
  • In 4.2 and 5.0, a new feature called Data Length Extensions (DLE) allows the ATT Payload to hold up to 244 bytes of data.

 

Factors that impact/determine the data throughput

There are a few factors that impact the data throughput of a BLE application. The most common are:

  • PHY being used (LE 1M vs. LE 2M vs. LE Coded (S=2 or S=8))
  • Connection interval
  • Maximum number of packets per connection interval
  • ATT Maximum Transmission Unit (ATT MTU)
  • Data Length Extension (DLE)
  • Operation type: Write with response vs. write without response, Indications vs. Notifications
  • Inter Frame Space (IFS): time gap between consequent packets (150 us)
  • Transmission of empty packets
  • Packet overhead – not all bytes, in a packet, are used for the application payload

Calculating your application data throughput

The big question is: how do we calculate our application throughput?

As we mentioned before, there are a few variables that impact the data throughput:

  • Bluetooth version & PHY used
  • DLE: Data Length Extensions – enabled or not
  • ATT MTU value
  • Connection interval
  • Maximum number of packets per connection event
  • Operation (writes with responses vs. writes without responses, and notification vs. indication)
  • Inter Frame Space (IFS): 150 microseconds

The Link Layer (LL) Packet

All data during a BLE connection is sent via Link Layer (LL) packets. All higher level messages are packed within Data Payloads of LL Packets. Below is what a LL Packet sending data looks like (each tick mark represents 1 byte):

 

NOTE: The astute reader may note that Data Payload can be up to 251 bytes. This however is an optional feature known as “LE Data Packet Length Extension” which we will explore in more detail below

Maximum Link Layer Data Payload Throughput

With the three rules we mentioned about transmissions on the Bluetooth Radio in mind, let’s take a look at the procedure to transmit a maximally sized LL packet.

  • Side A sends a maximum size LL data packet (27 bytes of data in a 41 byte payload) which takes 328μs (41 bytes * 8 bits / byte * 1Mbps) to transmit
  • Side B receives the packet and waits T_IFS (150μs)
  • Side B ACKs the LL packet it received in 80μs (0 bytes of data)
  • Side A waits T_IFS before sending any more data

Here’s an example exchange of two packets of data in one Connection Event:

The time it takes to transmit one packet can be computed as:

328μs data packet + 150μs T_IFS + 80μs ACK + 150μs T_IFS = 708μs

During this time period, 27 bytes of actual data can be transmitted which takes 216μs.

This yields a raw data throughput of:

(216μs / 708μs) * 1Mbps = 305,084 bits/second = ~0.381 Mbps

The Link Layer (LL) Packet

All data during a BLE connection is sent via Link Layer (LL) packets. All higher level messages are packed within Data Payloads of LL Packets. Below is what a LL Packet sending data looks like (each tick mark represents 1 byte):

NOTE: The astute reader may note that Data Payload can be up to 251 bytes. This however is an optional feature known as “LE Data Packet Length Extension” which we will explore in more detail below

Maximum Link Layer Data Payload Throughput

With the three rules we mentioned about transmissions on the Bluetooth Radio in mind, let’s take a look at the procedure to transmit a maximally sized LL packet.

  • Side A sends a maximum size LL data packet (27 bytes of data in a 41 byte payload) which takes 328μs (41 bytes * 8 bits / byte * 1Mbps) to transmit
  • Side B receives the packet and waits T_IFS (150μs)
  • Side B ACKs the LL packet it received in 80μs (0 bytes of data)
  • Side A waits T_IFS before sending any more data

Here’s an example exchange of two packets of data in one Connection Event:

The time it takes to transmit one packet can be computed as:

328μs data packet + 150μs T_IFS + 80μs ACK + 150μs T_IFS = 708μs

During this time period, 27 bytes of actual data can be transmitted which takes 216μs.

This yields a raw data throughput of:

(216μs / 708μs) * 1Mbps = 305,084 bits/second = ~0.381 Mbps

 

Maximum throughput over GATT

The Attribute Protocol Handle Value Notification is the best way for a server to stream data to a client when using GATT. The Opcode Overhead for this operation is 2 bytes. That means there are 3 bytes of ATT packet overhead and 4 bytes of L2CAP overhead for each ATT payload. We can determine the max ATT throughput by taking the maximum raw Link Layer throughput and multiplying it by the efficiency of the ATT packet:

ATT Throughput = LL throughput * ((MTU Size - ATT Overhead) / (L2CAP overhead + MTU Size))

Tabulating this information for a couple common MTU sizes we get:

MTU size (bytes) Throughput (Mbps)
23 (default) 0.226
185 (iOS 10 max) 0.294
512 0.301

LE Data Packet Length Extension (BT v4.2)

As part of the 4.2 Bluetooth Core Specification revision, a new feature known as LE Data Packet Length Extension was added 4. This optional feature allows for a device to extend the length of the Data Payload in a Link Layer packet from 27 up to 251 bytes! This means that instead of sending 27 bytes of data in a 41 byte payload, 251 bytes of data can now be sent in a 265 byte payload. Furthermore, we can send a lot more data with fewer T_IFS gaps. Let’s take a look at what exchanging a maximally sized packet looks like:

We can calculate the raw data throughput and see that this modification yields greater than a 2x improvement on the maximum raw data throughput which can be achieved!

251 bytes / 2500μs = 100.4 kBytes/sec = ~0.803 Mbps

 

LE 2M PHY (BT v5.0)

As part of the 5.0 Bluetooth Core Specification revision, a new feature known as “LE 2M PHY”5 was added. As you may recall in the section above, we discussed how the BLE Radio is capable of transmitting 1 symbol per μs for a bitrate of 1Mbps. This revision to the Bluetooth Low Energy Physical Layer (PHY), allows for a symbol rate of 2Mbps. This means we can transmit each individual bit in half the time. However, the 150μs IFS is still needed between transmissions. Let’s take a look on how this impacts the throughput when sending packets that are using the data packet length extension feature:

We can calculate this throughput and see the modification yields almost a 4x improvement over the original maximal raw data speed that could be achived with BLE 4.0:

251 bytes / 1400μs = 179.3 kBytes/sec = ~1.434 Mbps

 

LE Coded PHY (BT v5.0)

The “LE Coded PHY” feature, also introduced in the 5.0 Spec 5 provides a way to extend the range of BLE at the cost of speed. The feature works by encoding a bit across multiple symbols on the radio. This makes the bits being transmitted more resilient to noise. There are two operation modes where either two symbols or eight symbols can be used to encode a single bit. This effectively reduces the radio bitrate to 500 kbps or 125kbps, respectively.

 

 

Determine the time it takes to send one data packet and the empty packet from the receiver.

The time during which one data packet can be sent will include the following:
Data_Packet_Time = Time to transmit empty packet + IFS + Time to transmit the actual data packet + IFS.

An empty packet transmission time can be calculated as follows:
Time to transmit empty packet = empty packet size / raw data rate

An empty packet will contain the following fields:
Preamble + Access Address + LL Header + CRC.
For 1M PHY, Preamble will be 1 byte, and so the total size of the empty packet = 1 + 4 + 2 + 3 bytes = 10 bytes = 
80 bits.

(for 2M PHY, the size of an empty packet will be 88 bits since the Premable is 2 bytes instead of 1 byte).
Based on this, the time to transmit an empty 1M PHY packet will be:
Time to transmit empty packet = empty packet size / raw data rate = 80 bits/ 1 Megabits per second =
80 micro seconds

A data packet will contain all fields listed in the packet format diagram with the exception of the MIC field (encryption disabled).
Time to transmit data packet = data packet size / raw data rate

If we have DLE enabled and the ATT MTU is equal to the maximum bytes allowed in one packet: 247 bytes, then we can calculate the data packet size as:
Data packet size = 1 + 4 + 2 + 4 + 247 + 3 bytes = 265 bytes = 265*8 bits = 2088 bits
Time to transmit data  packet = 2088 bits / 1 Mbps = 
2,088 micro seconds

Data_Packet_Time = Time to transmit empty packet + IFS + Time to transmit the actual data packet + IFS = 80 + 2*150 + 2088 = 2,468 microsecs

For comparison, in the case of 2M PHY, it would be:
Data_Packet_Time = Time to transmit empty packet + IFS + Time to transmit the actual data packet + IFS = 88/2 + 2*150 + (2 + 4 + 2 + 4 + 247 + 3)*8/2 = 
1,392 microsecs

When DLE is enabled and the ATT MTU is set to less than 247, we end up with more overhead (since now data larger than the ATT MTU gets split up into more packets). For example, say we have the ATT MTU set to 158, then in order to transfer 244 bytes of application data, we will need two packets instead of one, causing the throughput to go down due to the increased byte overhead as well as the increased IFS between the packets. In another scenario, we could have DLE disabled (Payload size up to 27 bytes) and the ATT MTU greater than 27 bytes. Here, this will also result in more packets needed to be sent for the same amount of data, causing the throughput to go down.
Note: The same method for calculating the data and empty packet sizes that we used above can be used for the LE Coded PHY.

 

728x90
728x90

 http://www.ledsmagazine.com/articles/print/volume-13/issue-3/features/smart-lighting/bluetooth-mesh-what-s-that-noise-about.html

Bluetooth Mesh - What's that noise about? (MAGAZINE)

    

Coming Bluetooth extensions will make the wireless technology a better fit for smart lighting, explains MAREK WIERZBICKI, while mesh extensions will retain the low power, ease of use, and reliability of the proven radio technology.

 

Smart lighting might be the biggest revolution the lighting industry has seen in decades, but the multitude of available wireless communication technologies can cause a real headache for manufacturers willing to delve into this new, exciting market. Bluetooth is the latest talk of the town with its mesh networking support to be adopted later this year. We at Silvair have been deeply involved in the Bluetooth Smart Mesh Working Group's efforts aimed at standardizing a Bluetooth-based mesh architecture, and this examination of the basic concepts behind one approach to a Bluetooth Mesh implementation will give you an idea as to what Bluetooth Smart mesh networking is all about.

Interested in more articles & announcements on smart lighting?

Lighting standards we've all known for years are now being challenged by the next generation of lighting systems that promise to deliver so much more than just a well-lit space. The transition toward digital lighting is happening right in front of our eyes, and while a couple of months ago many had doubts as to whether smart lighting could be a real deal, it now seems that there is no turning back. Over the last 12 months, we've seen multiple heavyweight lighting manufacturers spinning off big chunks of their traditional businesses to put more focus on connected technologies (See LEDs Magazinecoverage of Osram). Smart lighting promises new business models with a steady stream of revenue from value-added features and services, which is exactly what lighting companies need to overcome the challenges resulting from the impressive longevity of LEDs and razor-thin margins in the LED market.

SPONSORED CONTENT BY Bluetooth®‎ ?

Bluetooth Mesh Shows Wireless Connectivity in a Whole New Light

Many of today’s wireless platforms—especially those supported by a Bluetooth® mesh network—ensure greater flexibility and extensibility at a much lower cost than a wired system can provide.

FIG. 1. There were a number of Bluetooth-based, mesh-enabled lighting products at the Consumer Electronics Show (CES) in 2016 including a lamp from Girard Sudron and a switch from NodOn.

FIG. 1. There were a number of Bluetooth-based, mesh-enabled lighting products at the Consumer Electronics Show (CES) in 2016 including a lamp from Girard Sudron and a switch from NodOn.

Moving to networks

It is therefore not surprising that virtually every week we are hearing news about lighting manufacturers entering into agreements with companies that can relatively swiftly implement smart technologies into their products, or even straightforwardly acquiring providers of wireless connectivity, cloud services, or advanced data analytics. Things have gone so far that we've already seen Goldman Sachs downgrading its rating on one of the leading lighting manufacturers, citing concerns over the company's deteriorating earnings and emphasizing its low exposure to connected technologies. The trend is clear: Lighting systems are becoming digital, and a wide variety of smart lighting products (Fig. 1) presented at CES (Consumer Electronics Show) 2016 only confirms this.

That said, there is still no consensus regarding the wireless communication protocol that could be the go-to technology for lighting applications, let alone the entire Internet of Things (IoT). Countless times has it been said that the lack of interoperability is a major obstacle to mass adoption of connected solutions, but instead of some sort of standardization, we're only seeing things getting more and more fragmented. New technologies keep emerging, each claiming to have exactly what it takes to enable seamless, robust, and secure connectivity in the Internet of Things (IoT).

In the meantime, the more mature communication standards keep evolving to address the dynamically changing customer needs, as many of them were introduced to the market when expectations and hype surrounding the IoT and connected spaces were nowhere near as big as they are today. What's more, certain product categories did not even exist back then, with smart lighting being a perfect example of a segment that has come a long way from nonexistence to being one of the hottest smart building automation segments over just a couple of years.

One of those mature standards is Bluetooth, a wireless communication protocol that seems to have been around forever and thus enjoys unmatched brand recognition. However, for certain very specific reasons, it is currently not being considered a viable option for advanced building automation solutions. The Bluetooth Special Interest Group (SIG), a 28,000-member strong body that oversees the development of Bluetooth standards, claims this is about to change once the mesh networking support is introduced into the protocol's core specification. We are only a couple of months away from this release, so let's see what's coming.

Bluetooth Classic versus Bluetooth Smart

All that noise surrounding Bluetooth might be somewhat confusing for those not too familiar with the recent developments in the wireless communication landscape. After all, the protocol was first developed before the term "Internet of Things" was even coined. But what many are still not aware of is that the Bluetooth of today is something completely different than Bluetooth of the past.

FIG. 2. Legacy Bluetooth has relied on a hub-and-spoke topology while commercial smart lighting will require a mesh network for communications.

FIG. 2. Legacy Bluetooth has relied on a hub-and-spoke topology while commercial smart lighting will require a mesh network for communications.

The original Bluetooth, known as Bluetooth Classic, was designed as a short-range, cable-replacement technology for point-topoint communications. Initially, the main goal was to synchronize data between mobile phones, but the standard quickly became the default technology for wireless data exchange between personal computing equipment (mobile phones, PCs, PDAs) and peripherals (headsets, cordless keyboards and mice, printers, and such). Devices could form a tiny personal area network (PAN) called a piconet, whereby a single central device would coordinate the activity of up to seven active peripherals.

Fast-forward to 2010, the Bluetooth Core Specification version 4.0 is released, introducing Bluetooth Low Energy (BLE), more commonly known as Bluetooth Smart. This is where the story of Bluetooth in the IoT really begins. Bluetooth Smart was designed specifically to address the needs of a new generation of smart devices, many of which are battery-powered and therefore require fast connection times and efficient power management to reduce unnecessary energy consumption.

The new specification extended Bluetooth's usefulness to a whole new range of products, ultimately making it a default technology for all kinds of wearable devices. But despite some really outstanding features of the Bluetooth Smart radio, the protocol didn't make any significant impact in the building automation segment. Smart homes were dominated by other low-power technologies, mainly ZigBee and Z-Wave, and wireless communication never really took off in commercial spaces. Due to certain important drawbacks of the available low-power communication standards, building managers preferred to stick to wired solutions, considering them way more reliable.

The reason why Bluetooth Smart was never considered a serious contender for building automation purposes is because it was designed to support relatively simple hub-and-spoke networks (Fig. 2). Applications like smart lighting require much more than that. Peer-to-peer communication and extended range are among the must-have features enabling a robust network consisting of multiple smart bulbs, and the core specification of Bluetooth Smart simply didn't provide such capability. Its hub-and-spoke model couldn't match with the mesh topology of ZigBee or Z-Wave networks, and for this reason Bluetooth could never really compete with the two in the applications they were intended for.

Is this meshable?

Even though the support for mesh networking wasn't included in the core specification of Bluetooth Smart, several companies noticed that building a mesh network based on this particular communication standard might not be such a bad idea. In 2014, Silvair (operating as Seed Labs back then) started building a mesh architecture based on Bluetooth Smart. Transforming the protocol's single-hop topology into a robust multi-hop, peer-to-peer network was quite a challenge, but the potential reward was enormous.

A mesh network based on Bluetooth Smart also turned out to offer outstanding performance and the core features of the Bluetooth radio allowed us to overcome many of the challenges that other communication protocols have a hard time dealing with. Obviously, the technology developed by Silvair was proprietary, although we did manage to maintain compliance with Bluetooth Smart's core specification.

Having received a fair amount of input from Silvair and other companies working on their proprietary mesh solutions, the Bluetooth Special Interest Group realized that such an opportunity cannot be wasted. In February 2015, it announced the formation of the Bluetooth Smart Mesh Working Group. Its goal was to standardize mesh networking support and incorporate it into the protocol's core specification. Competing companies sat down to share their experiences and find the best way to implement the mesh architecture into Bluetooth Smart. Near the end of 2015, the SIG officially confirmed that it's on track with the development of the Bluetooth Mesh, and that the standard would be adopted at some point in 2016. Moreover, some major improvements with regard to both the data rate and range of Bluetooth Smart will be included in the new standard.

The standardized mesh architecture based on Bluetooth Smart is shaping up to be a powerful framework enabling robust and scalable implementations in some of the most challenging applications. Being part of that development process and seeing many of our concepts being incorporated into the global standard is a great feeling. We are currently among the leading contributors to the Bluetooth Smart Mesh Working Group. The details about the upcoming mesh standard remain strictly confidential until some official announcements are made by the SIG itself, but we can provide you with a sneak peek into the basic concepts behind our Silvair Mesh technology, which might give you a good idea of what Bluetooth-based mesh networking is all about.

Meet a mesh

Silvair Mesh has been developed to allow users to build their smart mesh networks in which one or more mobile devices (smartphones/tablets) can control one or more mesh-enabled peripheral devices (e.g., lamps, sensors, dimmers, switches, etc.). When equipped with the mesh software stack, essentially an enhanced Bluetooth Smart stack, these devices can communicate with each other and the central controller via the Bluetooth Smart radio using the protocol's standard mechanisms called GATT (Generic Attribute Profile). This means that all mesh-enabled peripherals can create their own autonomous mesh network that does not require any central device to operate.

FIG. 3. Smart mesh capabilities are added to Bluetooth devices in the network, transport, and application layers in software and don't impact the physical and link layers that are captured in radio ICs and modules.

FIG. 3. Smart mesh capabilities are added to Bluetooth devices in the network, transport, and application layers in software and don't impact the physical and link layers that are captured in radio ICs and modules.

The decision to base Silvair Mesh on Bluetooth Smart was intentional, as it meant that the ecosystem would be compatible with all existing Bluetooth Smart devices and chipsets. However, a mesh stack also requires numerous additional features to standard Bluetooth Smart. For instance, the Silvair Mesh includes a high-performance Bluetooth controller and a new Network Security Manager, as well as the secure OverThe-Air Update functionality, which means that a device can be upgraded to the newest version of the firmware at any time.

Such a carefully crafted mesh software stack can be installed on any compatible Bluetooth chip. Silvair also developed a reference design for modules to provide the best possible solution for large installations such as those found in commercial buildings. These modules consist of standard Texas Instruments CC254x Bluetooth modules with upgraded firmware, an amplifier, and an antenna. Operating at +10-dBm Tx (transmit) power and with -98-dBm Rx (receive) sensitivity, the modules provide a 108-dB link budget that translates to a range of 1500 ft (about 500m) in the open air. Inside buildings, this value will obviously be much lower and dependent on numerous factors, yet it still remains impressive.

An important thing to realize is that mesh is a purely software solution. This means that Bluetooth Smart chipsets found in today's smartphones can control devices employing proprietary technologies such as Silvair Mesh, and will remain perfectly suitable for controlling and managing mesh networks once the standard is adopted by the SIG. The aforementioned software stack is applied to the networking and application layers of the standard Bluetooth Smart protocol stack as shown in Fig. 3.

How the mesh works

Now let's consider how the mesh extension works. There are two types of communication within a Silvair Mesh network: central to peripheral and peripheral to peripheral. Once the mesh network is commissioned, there is no need for further central-peripheral communication.

Central devices are usually smartphones and tablets. Such devices would typically run some type of control software. In the Silvair case, we developed an app for iOS and Android devices. The central devices are used to configure and manage the network but can also perform a software update of peripheral devices. Central devices connect to peripherals using Bluetooth Smart's standard GATT services. While this type of connection is fully compatible with Bluetooth 4.0, it employs certain proprietary techniques to allow many smartphones to be used simultaneously to control more than eight peripheral devices with eight being the limit in standard Bluetooth 4.0.

Peripheral devices are the nodes of a mesh network. A robust mesh implementation must allow peripherals to talk to each other and act as relays that pass messages through the mesh. This is a radical departure from the original architecture of Bluetooth Smart, and it allows for controlling entire groups of devices using multicast (one to many) communications - e.g., dimming a group of ceiling lights in a hallway. The Silvair Mesh implementation allows a maximum of 63 hops, which enables it to cover very extensive areas out of the box, in contrast to other technologies that require setting up more complicated or more expensive networks.

One of the most significant concepts introduced in the Silvair implementation is connectionless communication, which means that every peripheral can advertise its status in the network. As a result, lights, fans, shades, and any other mesh-enabled device are displayed automatically in the app on the central device, not only as a simple list of available devices, but with very specific parameters that can be controlled by the user - e.g., on/off, color, temperature, fan speed, or shade position. Every status change made by the user is immediately advertised to the network, and every controlling device in the mesh is updated instantly with the new status.

Network setup

As will be required in commercial applications, the Silvair Mesh software allows networks of any size to be set up, but the way in which large and small networks are commissioned, is different. Small networks of up to about 30 devices can be commissioned and managed using just the app on a smartphone or a tablet. The plug-and-play nature of Bluetooth, and the fact that the protocol is natively supported by virtually all smartphones and tablets on the market, makes the entire process extremely simple and intuitive. The app detects and displays mesh devices in its vicinity. The user creates a mesh network by selecting which devices should be added, and by giving the network a name. Once added to the network, associations and relationships can be set up between the devices as desired. The smartphone can then be switched off and these connections will remain in place (Fig. 4).

FIG. 4. Silvair Mesh supports both smaller mesh networks controlled by a single smartphone and complex networks with dedicated cloud-connected servers.

FIG. 4. Silvair Mesh supports both smaller mesh networks controlled by a single smartphone and complex networks with dedicated cloud-connected servers.

Networks of over about 30 devices, or the ones requiring more sophisticated associations, scenarios, and network monitoring services, are best set up using some type of server or management appliance. In the case of Silvair, an embedded server called Silvair Logic hosts all the logic that controls the entire network, checks the status of all peripherals, and reports any issues and unusual events via a browser-based interface.

Other mesh needs

There are a few other key elements of a Bluetooth Mesh implementation that we will mention briefly here. There needs to be a concept of permissions for control devices that ensures proper management of devices in the network. The Silvair software stack implements four levels of permissions: 1) Administrator - can operate all devices within the network, as well as configure them and manage other users' permissions; 2) Family - can operate all devices within the network, but cannot configure or manage them; 3) Guest - has limited permission to operate selected devices within the network; 4) and AdHoc - can operate public devices only on a one-to-one basis (no access to the mesh network).

Likewise, the network nodes or peripherals require the ability to provide information on their operational status and programmability. The Silvair software stack defines three Peripheral Device States: 1) Factory Default - the device leaves the factory in this state and is ready for commissioning; 2) Private - all communication is encrypted, so only users with matching keys can decrypt the state information and control the device; and 3) Public - state information, as well as selected control functions, are not encrypted and can be accessed by anyone.

The Bluetooth difference

The question one might ask at this point is why the Bluetooth Smart mesh would be any better than other mesh protocols available on the market? Simply put, it's all about the radio. Out of all low-power, low-bandwidth communication standards, none is even close to having such impressive qualities as Bluetooth Smart. This allows the protocol to address some of the most difficult issues in such challenging applications as smart lighting, where multicast, synchronous operation and responsiveness are among the must-have features.

We've tested many other technologies inside out, and we know exactly why the existing mesh protocols have failed to deliver the smart lighting experience to environments where reliability and scalability are top priorities. And we firmly believe that this year's adoption of the Bluetooth Smart mesh standard might finally open the door for smart lighting networks to become widely deployed in professional applications.


728x90
728x90

https://en.wikipedia.org/wiki/Bluetooth_mesh_networking


Bluetooth mesh networking, conceived in 2015,[1] adopted on July 13, 2017[2] is a protocol based upon Bluetooth Low Energy that allows for many-to-many communication over Bluetooth radio.

It has been defined in Mesh Profile Specification[3] and Mesh Model Specification.[4]

Overview[edit]

Communication is carried in the messages that may be up to 384 bytes long, when using Segmentation and Reassembly (SAR) mechanism, but most of the messages fit in one segment, that is 11 bytes. Each message starts with an opcode, which may be a single byte (for special messages), 2 bytes (for standard messages), or 3 bytes (for vendor-specific messages).

Every message has a source and a destination address, determining which devices process messages. Devices publish messages to destinations which can be single things / groups of things / everything.

Each message has a sequence number that protects the network against replay attacks.

Each message is encrypted and authenticated. Two keys are used to secure messages: (1) network keys – allocated to a single mesh network, (2) application keys – specific for a given application functionality, e.g. turning the light on vs reconfiguring the light.

Messages have a time to live (TTL). Each time message is received and retransmitted, TTL is decremented which limits the number of "hops", eliminating endless loops.

Bluetooth Mesh is a flood network. It's based on the nodes relaying the messages: every relay node that receives a network packet that authenticates against a known network key that is not in message cache, that has a TTL ≥ 2 can be retransmitted with TTL = TTL - 1. Message cache used to prevent relaying messages recently seen.

Bluetooth Mesh has a layered architecture, with multiple layers as below.

LayerFunctionality
Model LayerIt defines a standard way to exchange application specific messages. For example, a Light Lightness Model defines an interoperable way to control lightness. There are mandatory models, called Foundation Models, defining states and messages needed to manage a mesh network.
Access LayerIt defines mechanism to ensure that data is transmitted and received in the right context of a model and its associated application keys.
Upper Transport LayerIt defines authenticated encryption of access layer packets using an application (or device specific key). It also defines some control messages to manage Friendship or to notify the behavior of node using Heartbeat messages.
Lower Transport LayerThis layer defines a reliable (through a Block Acknowledgement) Segmented transmission upper layer packets, when a complete upper layer packet can't be carried in a single network layer packet. It also defines a mechanism to reassemble segments on the receiver.
Network LayerThis layer defines how transport packets are addressed over network to one or more nodes. It defines relay functionality for forwarding messages by a relay node to extended the range. It handles the network layer authenticated encryption using network key.
Bearer LayerIt defines how the network packets are exchanged between nodes. Mesh Profile Specification defines BLE advert bearer and BLE GATT bearer. Mesh Profile defines Proxy Protocol, through which mesh packets can be exchanged via other bearers like TCP/IP.

Theoretical limits[edit]

It's yet to be determined what are the practical limits of Bluetooth Mesh technology. There are some limits that are built into the specification, though:

Limit for a networkValueRemarks
Maximum number of nodes32 767The limit is 32768 addresses and while a node may occupy more than one address, practical limit is most likely lower
Maximum number of groups16 384

Number of virtual groups is 2128.

Maximum number of scenes65 535
Maximum number of subnets4 096
Maximum TTL127

Mesh models[edit]

As of version 1.0 of Bluetooth Mesh specification, the following standard models and model groups have been defined:

Foundation models[edit]

Foundation models have been defined in the core specification. Two of them are mandatory for all mesh nodes.

  • Configuration Server (mandatory)
  • Configuration Client
  • Health Server (mandatory)
  • Health Client

Generic models[edit]

  • Generic OnOff Server, used to represent devices that do not fit any of the model descriptions defined but support the generic properties of On/Off
  • Generic Level Server, keeping the state of an element in a 16-bit signed integer
  • Generic Default Transition Time Server, used to represent a default transition time for a variety of devices
  • Generic Power OnOff Server & Generic Power OnOff Setup Server, used to represent devices that do not fit any of the model descriptions but support the generic properties of On/Off
  • Generic Power Level Server & Generic Power Level Setup Server, including a Generic Power Actual state, a Generic Power Last state, a Generic Power Default state and a Generic Power Range state
  • Generic Battery Server, representing a set of four values representing the state of a battery
  • Generic Location Server & Generic Location Setup Server, representing location information of an element, either global (Lat/Lon) or local
  • Generic User/Admin/Manufacturer/Client Property Server, representing any value to be stored by an element
  • Generic OnOff Client & Generic Level Client
  • Generic Default Transition Time Client
  • Generic Power OnOff Client & Generic Power Level Client
  • Generic Battery Client
  • Generic Location Client
  • Generic Property Client

Sensors[edit]

  • Sensor Server & Sensor Setup Server, representing a sensor device. Sensor device may be configured to return a measured value periodically or on request; measurement period (cadence) may be configured to be fixed or to change, so that more important value range is being reported faster.
  • Sensor Client

Time and scenes[edit]

  • Time Server & Time Setup Server, allowing for time synchronization in mesh network
  • Scene Server & Scene Setup Server, allowing for up to 65535 scenes to be configured and recalled when needed.
  • Scheduler Server & Scheduler Setup Server
  • Time Client, Scene Client & Scheduler Client

Lighting[edit]

  • Light Lightness Server & Light Lightness Setup Server, representing a dimmable light source
  • Light CTL Server, Light CTL Temperature Server & Light CTL Setup Server, representing a CCT or "tunable white" light source
  • Light HSL Server, Light HSL Hue Server, Light HSL Saturation Server & Light HSL Setup Server, representing a light source based on Hue, Saturation, Lightness color representation
  • Light xyL Server & Light xyL Setup Server, representing a light source based on modified CIE xyY color space.
  • Light LC (Lightness Control) Server & Light LC Setup Server, representing a light control device, able to control Light Lightness model using an occupancy sensor and ambient light sensor. It may be used for light control scenarios like Auto-On, Auto-Off and/or Daylight Harvesting.
  • Light Lightness Client, Light CTL Client, Light HSL Client, Light xyL Client & Light LC Client

Provisioning[edit]

Provisioning is a process of installing the device into a network. It is a mandatory step to build a Bluetooth Mesh network.

In the provisioning process, a provisioner securely distributes a network key and a unique address space for a device. Provisioning protocol uses P256 Elliptic Curve Diffie-HellmanKey Exchange to create a temporary key to encrypt network key and other information. This provides security from a passive eavesdropper. It also provides various authentication mechanisms to protect network information, from an active eavesdropper who uses Man-In-The-Middle attack, during provisioning process.

A key unique to a device known as "Device Key" is derived from elliptic curve shared secret on provisioner and device during the provisioning process. This device key is used by the provisioner to encrypt messages for that specific device.

Terminology used in Bluetooth mesh networking specification[edit]

  • Destination: The address to which a message is sent.
  • Element: An addressable entity within a device.
  • Model: Standardized operation of typical user scenarios.
  • Node: A provisioned device.
  • Provisioner: A node that can add a device to a mesh network.
  • Relay: A node able to retransmit messages.
  • Source: The address from which a message is sent.


728x90
728x90

원문보기: 
http://www.itworld.co.kr/news/105679#csidxa5d4a62d448be1a929a02c4376d2927 

by ItWord : Peter Sayer | IDG News Service



블루투스에 새로운 메시(mesh) 네트워킹 기능이 곧 구현된다. 무엇보다 좋은 점은 새로운 하드웨어가 없어도 활용이 가능하다는 것이다.

메시 네트워킹을 사용하면 산업 현장에서 센서를 연결하거나 스마트 홈 또는 건물 자동화 네트워크를 생성하는 과정이 더 간편해진다. 기기는 멀리 떨어진 게이트웨이까지 메시지를 전달할 필요없이 가까운 이웃에게 메시지를 전달하도록 요청하면 된다.


Credit: Stephen Lawson

이는 기기에서 사물인터넷에 참여할 수 있는 새로운 방법을 제공한다. 블루투스 표준을 관할하는 기구인 블루투스 SIG의 기술 프로그램 관리자 마틴 울리는 "예를 들어 건물에서 조명 제어 용도로 메시 네트워크를 구축할 경우 다른 기기에서 자산 추적, 길찾기 등 다른 분야를 위한 무선 인프라로 이 네트워크를 사용할 수 있다"고 말했다.

블루투스는 메시 네트워킹을 저전력 블루투스(Bluetooth Low Energy, BLE)에 구축된 네트워킹 토폴로지로 취급하므로 이를 지원하는 기기가 있다면 소프트웨어 업데이트를 통해 메시에 참여할 수 있을 가능성이 높다. 스마트폰과 태블릿도 마찬가지다. BLE를 지원한다면 앱만 있으면 바로 메싱을 시작할 수 있다.

지난 7월 18일, 블루투스 메시 네트워킹 표준 버전 1.0이 발표되어 호환 기기가 앞다퉈 등장하겠지만 이미 경주는 진행 중이다.

울리는 "일반적인 블루투스 SIG 워킹 그룹에 참여하는 기업 수가 10~20개 정도인데 반해 블루투스 메시 네트워킹 개발 워킹 그룹에는 120여 개의 기업이 참여한만큼 업계는 이미 이 사양의 요구사항을 잘 파악하고 있다"고 말했다.

요구사항 테스트도 이미 마쳤다. 울리는 "테스트를 해야 사양을 완성할 수 있다. 이미 15개의 테스팅 이벤트를 통해 전체 사양을 다뤘다"고 밝혔다. 울리는 블루투스 메시 스택이 있는 하드웨어 모듈이 몇 개월 내에 시장에 등장할 것이라고 말했다. 업체에서 부가적인 소프트웨어를 명분으로 더 높은 가격을 요구할 수 있지만 울리는 자신이 아는 한 새로운 기능을 이용하기 위해 필요한 부가적인 특허 라이선스는 없다고 전했다.

블루투스 메시 네트워크에서는 노드가 생성되는 방법이 각기 다르다. 조명 기구의 컨트롤러와 같이 전력이 충분히 공급되는 장치도 있고, 전등 스위치나 온도 센서와 같이 배터리 하나로 수년 동안 작동해야 하는 장치도 있기 때문이다. 사양은 이런 기기에서 에너지를 절약할 수 있는 두 가지 방법을 제공한다.

하나는 메시지 전송을 위한 "게시 및 가입(publish and subscribe)" 모델이다. 예를 들어 부엌 전등 스위치라면 켜고 꺼야 할 기기의 주소 목록을 유지하기 위해 전기를 소비할 필요가 없다. 대신 "부엌 조명" 목록에서 참고하도록 표시된 "켜기" 메시지만 게시하면 된다. 이 메시지는 메시를 따라 전달되고, 각 기기들은 그 목록에 가입되어 있는지 여부에 따라 메시지에 응해 작동할지 여부를 스스로 판단한다.

다른 방법은 에너지 공급이 제한된 기기에서 "친구"를 호출하는 것이다. 예를 들어 온도 센서에서 주기적으로 판독값을 전송할 필요없이 온도가 정해진 범위를 벗어날 때만 보고하면 된다고 가정해 보자. 이렇게 하면 드물게 발생하는 예외만 전송하면 되므로 전송에 사용되는 에너지를 절약할 수 있다.

그러나 설정 온도 범위 업데이트를 받기 위해 지속적으로 수신 대기를 하게 되면 배터리가 금방 소진될 수 있다. 전원이 충분히 공급되는 기기를 친구로 해서 기기를 설계하면 이 센서는 하루에 한 번(또는 원하는 간격으로) 라디오 수신기를 켜면 되고, 이때 친구가 센서 오프라인 동안 전송된 모든 메시지를 전달해준다. 휴가 중에 우편함을 확인하러 매일 집으로 다시 올 필요 없이 이웃이 우편물을 대신 받아두는 것이라고 생각하면 된다.

가입할 메시 네트워크를 선택하거나 친구로 설정할 기기를 선택하는 과정은 두 블루투스 기기를 페어링해 포인트 투 포인트 연결을 구성하는 것보다는 조금 더 복잡하다.

프로비저닝(provisioning)이라고 하는 이 프로세스에는 블루투스 지원 스마트폰, 태블릿 또는 컴퓨터에서 실행되는 앱이 필요하다. 전구, 산업용 센서 또는 보안 카메라와 같은 새 메시 기기는 프로비전되지 않은 상태로 제공되므로 네트워크에 노드로 가입하려면 앱에서 암호화 키를 다운로드해야 한다.

동일한 앱을 사용해 키를 폐기할 수도 있으므로 망가진 전구를 안전하게 버릴 수 있다. 이렇게 하면 누군가 쓰레기 더미를 뒤져 버려진 전구에서 키를 복구해 네트워크에 침입할 위험이 없다.

이 사양의 개발자들은 재전송 공격(replay attacks)으로부터 블루투스 메시 네트워크를 보호하기 위해 각 메시지에 고유한 시퀀스 번호가 있는지 확인하도록 했다.

또한 이 사양은 네트워크 인프라와 여기서 실행되는 애플리케이션에 대해 서로 다른 암호화 계층을 제공한다. 예를 들어 호텔의 스마트 조명 네트워크가 호텔 객실 도어 잠금을 여는 메시지를 전달할 수 있지만 애초에 이 메시지를 생성하는 데 필요한 암호화 키는 호텔의 스마트폰 앱에만 보관할 수 있다.

ABI 리서치(ABI Research)의 선임 분석가 앤드류 지그나니는 메시 네트워킹의 도입은 블루투스가 기존의 작동 범위와 네트워크 규모 제한을 극복하는 데 도움이 될 것으로 전망했다.

지그나니는 "메시 네트워킹은 블루투스 혁신의 새로운 단계이며, 블루투스가 개인 영역 네트워크 및 페어링(pairing) 기술에서 우리 주변의 사물에 연결하는 기능을 갖춘 더 넓은 범위의 강력한 저전력 IoT 연결 솔루션으로 전환하는 데 핵심적인 역할을 할 것"이라고 예상했다. editor@itworld.co.kr


728x90

+ Recent posts