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

'BlueTooth > 기본기' 카테고리의 다른 글

[How to] Infineon CYW20719 SPP example and throughput  (0) 2023.06.27
블루투스 BLE 속도측정(Throughput)  (0) 2023.02.06
Bluetooth Mesh - What's that noise about? (MAGAZINE)  (1) 2017.10.17
Bluetooth mesh networking From Wikipedia  (0) 2017.10.17
Mesh Profile  (0) 2017.10.16
Air packet에서 Bluetooth clock 확인  (0) 2017.09.08
baseband ack nack concept  (0) 2017.09.08
bluetooth timeout spec  (1) 2016.01.28
RFComm  (0) 2016.01.07
GPP(Generic PIM Profile)  (0) 2015.12.15
728x90

Mesh Profile


▪ Revision: v1.0

▪ Revision Date: 2017-Jul-13

▪ Group Prepared By: Mesh Working Group


1.3.2 Acronyms and abbreviations

Abbreviation or Acronym

Meaning

ACK

Acknowledgment

AD

Advertising Data

AES

Advanced Encryption Standard

AID

Application Key Identifier

AKF

Application Key Flag

ASCII

American Standard Code for Information Interchange

ATT

Attribute Protocol

ATT_MTU

Attribute Protocol Maximum Transmission Unit

BR/EDR

Basic Rate / Enhanced Data Rate

CCM

Counter with CBC-MAC

CID

Company Identifier

CMAC

Cipher-based Message Authentication Code

CTL

Network control message indication

DST

Destination

ECB

Electronic CodeBook

ECDH

Elliptic Curve Diffie-Hellman

FCS

Frame Check Sequence

FIPS

Federal Information Processing Standards

FSN

Friend Sequence Number

GAP

Generic Access Profile

GATT

Generic Attribute Profile

ID

Identifier

IEEE

Institute of Electrical and Electronics Engineers

IKM

Input Key Material

IVI

Initialization Vector Index

JSON

JavaScript Object Notation

LED

Light Emitting Diode

LSO

Least Significant Octet

MAC

Message Authentication Code

MD

More Data

MIC

Message Integrity Check

MSO

Most Significant Octet

MTU

Maximum Transmission Unit

NID

Network Identifier

OBO

On Behalf Of (another element)

OKM

Output Key Material

OOB

Out of Band

PDU

Protocol Data Unit

PID

Product Identifier

RFU

Reserved for Future Use

RPL

Replay Protection List

RSSI

Received Signal Strength Indicator

SAR

Segmentation And Reassembly

SEG

Segmentation indication bit

SEQ

Sequence Number

SIG

Special Interest Group

SRC

Source

SZMIC

Size of Message Integrity Check

TTL

Time To Live

URI

Uniform Resource Indicator

UUID

Universally Unique Identifier

VID

Version Identifier

WG

Working Group

 

1.3.3 Terminology

Term

Definition

Address

The identity of one or more elements in one or more nodes.

Configuration Client

A node that implements the Configuration Client model.

Destination

The address to which a message is sent.

Device

An entity that is capable of being provisioned onto a mesh network.

Element

An addressable entity within a device. A device is required to have at least one element.

Message

A sequence of octets that is sent from a source to a destination.

Neighbors

Nodes in direct radio range (single hop).

Network

A group of nodes sharing a common address space.

Node

A provisioned device.

Provision

The process of authenticating and providing basic information (including unicast addresses and a network key) to a device. A device must be provisioned to become a node. Once provisioned, a node can transmit or receive messages in a mesh network.

Provisioner

A node that is capable of adding a device to a mesh network.

Relay

A node that receives and then retransmits messages.

Source

The address from which a message is sent.

State

A value representing a condition of an element that is exposed by an element of a node.

Subnet

A group of nodes that can communicate with each other.


 

728x90
728x90

 

 

Clock delta : 0x0c (12)

Time delta : 003750

Calc : 12  * 625 / 2

 

Clock 625/2 이유는 625μs 확인하기 위해서는 최소한 2배의 속도로 체크해야 하기 때문이다.

 

 

1.1 BLUETOOTH CLOCK
Every Bluetooth device shall have a native clock that shall be derived from a
free running reference clock. Offsets may be added to the reference clock to
synchronize the native clock with other non-Bluetooth systems. For
synchronization with other Bluetooth devices, offsets are used that, when
added to the native clock, provide temporary Bluetooth clocks that are mutually
synchronized. It should be noted that the Bluetooth clock has no relation to the
time of day; it may therefore be initialized to any value. The clock has a cycle of
about a day. If the clock is implemented with a counter, a 28-bit counter is
required that shall wrap around at 228-1. The least significant bit (LSB) shall
tick in units of 312.5 μs (i.e. half a time slot), giving a clock rate of 3.2 kHz.
The clock determines critical periods and triggers the events in the device.
Four periods are important in the Bluetooth system: 312.5 μs, 625 μs, 1.25 ms,
and 1.28 s; these periods correspond to the timer bits CLK0, CLK1, CLK2, and
CLK12, respectively, see Figure 1.4 on page 68.

 

Bluetooth Air에서 기본으로 사용하는 시간 단위는 625 μs.

 

 

2.2.5.1 Piconet physical channel timing
In the figures, only single-slot packets are shown as an example.
The master TX/RX timing is shown in Figure 2.3 on page 76. In Figure 2.3 and
Figure 2.4 the channel hopping frequencies are indicated by f(k) where k is the
time slot number. After transmission, a return packet is expected N × 625 μs
after the start of the TX packet where N is an odd, integer larger than 0. N
depends on the type of the transmitted packet.
To allow for some time slipping, an uncertainty window is defined around the
exact receive timing. During normal operation, the window length shall be 20
μs, which allows the RX packet to arrive up to 10 μs too early or 10 μs too late.

It is recommended that slaves implement variable sized windows or time
tracking to accommodate a master's absence of more than 250ms.
During the beginning of the RX cycle, the access correlator shall search for the
correct channel access code over the uncertainty window. If an event trigger
does not occur the receiver may go to sleep until the next RX event. If in the
course of the search, it becomes apparent that the correlation output will never
exceed the final threshold, the receiver may go to sleep earlier. If a trigger
event occurs, the receiver shall remain open to receive the rest of the packet
unless the packet is for another device, a non-recoverable header error is
detected, or a non-recoverable payload error is detected.

 

Bluetooth에서는 clock에 대한 시간 오차를 기준에서 앞/뒤 10μs 까지는 허용한다.

즉, 기준에서 10μs를 벗어나면 안 된다.

 

728x90

+ Recent posts