BLE Mesh(二)BLE Mesh 基础

本文介绍了蓝牙Mesh网络的基础知识,包括Mesh与点对点通信的区别、节点和设备、元素、消息、地址等方面。节点通过配置过程成为Mesh网络的一部分,通信通过消息进行,地址分为单播、组播和虚拟地址。此外,文章还提到了发布/订阅模型,以及Mesh网络的可选特性,如中继、低功耗节点和好友节点,这些特性增强了网络的灵活性和效率。
摘要由CSDN通过智能技术生成

1 Mesh vs. Point-to-Point

Most Bluetooth LE devices communicate with each other using a simple point-to-point network topology enabling one-to-one device communications. In the Bluetooth core specification, this is called a ‘piconet.’

Imagine a smartphone that has established a point-to- point connection to a heart rate monitor over which it can transfer data. One nice aspect of Bluetooth is that it enables devices to set up multiple connections. That same smartphone can also establish a point-to- point connection with an activity tracker. In this case, the smartphone can communicate directly with each of the other devices, but the other devices cannot communicate directly with each other.

In contrast, a mesh network has a many-to-many topology, with each device able to communicate with every other device in the mesh. Communication is achieved using messages, and devices are able to relay messages to other devices so that the end-to-end communication range is extended far beyond the radio range of each individual node.

大多数低功耗蓝牙设备使用简单的点对点网络拓扑相互通信,从而实现一对一的设备通信。在蓝牙核心规范中,这称为“微微网”。


想象一下,一部智能手机已经建立了与心率监测器的点对点连接,并可以通过它传输数据。蓝牙的一个不错的方面是它使设备能够建立多个连接。该智能手机还可以与活动跟踪器建立点对点连接。在这种情况下,智能手机可以与其他每个设备直接通信,而其他设备之间则不能直接通信。


相反,Mesh 网络具有多对多拓扑,每个设备都能够与 Mesh 网络中的每个其他设备进行通信。设备间使用消息进行通信,并且设备能够将消息中继到其他设备,从而端到端的通信范围扩展到远远超出每个单独节点的无线电覆盖范围。

2 Devices and Nodes

Devices which are part of a mesh network are called nodes and those which are not are called “unprovisioned devices”.

The process which transforms an unprovisioned device into a node is called “provisioning”. Consider purchasing a new Bluetooth light with mesh support, bringing it home and setting it up. To make it part of your mesh network, so that it can be controlled by your existing Bluetooth light switches and dimmers, you would need to provision it.

Provisioning is a secure procedure which results in an unprovisioned device possessing a series of encryption keys and being known to the Provisioner device, typically a tablet or smartphone. One of these keys is called the network key or NetKey for short.

All nodes in a mesh network possess at least one NetKey and it is possession of this key which makes a device a member of the corresponding network and as such, a node. There are other requirements that must be satisfied before a node can become useful, but securely acquiring a NetKey through the provisioning process is a fundamental first step.

属于 Mesh 网络中的设备称为节点,不属于 Mesh 网络中的设备称为“未配置的设备”。


将未配置的设备转换为节点的过程称为**“配置”**。想象一下,购买一个支持 Mesh 的新蓝牙灯,将其带回家并进行安装。为了使其成为 Mesh 网络的一部分,以便可以通过现有的蓝牙灯光开关和调光器对其进行控制,您需要对其进行配置。


配置是一种安全过程,将让未配置的设备拥有一系列加密密钥,并且对于配网器设备(通常是平板电脑或智能手机)是已知的。这些密钥之一称为网络密钥或 NetKey。


Mesh 网络中的所有节点都拥有至少一个 NetKey,正是该密钥的拥有使设备成为相应网络的成员,因此成为一个节点。在节点变得可用之前,还必须满足其他要求,但是通过配置过程安全地获取 NetKey 是基本的第一步。

3 Elements

Some nodes have multiple, constituent parts, each of which can be independently controlled. In Bluetooth mesh terminology, these parts are called elements. For example, an LED lighting product with three LED lights which if added to a Bluetooth mesh network, would form a single node with three elements, one for each of the individual LED lights.

一些节点具有多个组成部分,每个部分都可以独立控制。在蓝牙 Mesh 网络术语中,这些部分称为元素。例如,具有三个 LED 灯的 LED 照明产品(如果添加到蓝牙 Mesh 网络中)将形成具有三个元素的单个节点,每个单独的 LED 灯是一个元素。

4 Messages

When a node needs to query the status of other nodes or needs to control other nodes in some way, it sends a message of a suitable type. If a node needs to report its status to other nodes, it sends a message. All communication in the mesh network is “message-oriented” and many message types are defined, each with its own, unique opcode.

Messages fall within one of two broad categories; acknowledged or unacknowledged.

Acknowledged messages require a response from nodes that receive them. The response serves two purposes: it confirms that the message it relates to was received, and it returns data relating to the message recipient to the message sender.

The sender of an acknowledged message may resend the message if it does not receive the expected response(s) and therefore, acknowledged messages must be idempotent. This means that the effect of a given acknowledged message, arriving at a node multiple times, will be the same as it had only been received once.

Unacknowledged messages do not require a response.

当节点需要查询其他节点的状态或需要以某种方式控制其他节点时,它会发送适当类型的消息。如果某个节点需要向其他节点报告其状态,则会发送一条消息。Mesh 网络中的所有通信都是“面向消息的”,并且定义了许多消息类型,每种类型都有自己的唯一操作码。


消息属于两大类之一;确认或未确认


确认的消息需要接收它们的节点的响应。响应有两个目的:确认已收到与之相关的消息,并将与消息接收者有关的数据返回给消息发送者。如果确认的消息的发送者未收到预期的响应,则可以重新发送该消息,因此,确认的消息必须是幂等的。这意味着多次收到一个节点的确认消息的效果与只收到一次的效果相同。


未确认的消息不需要响应。

5 Addresses

Messages must be sent from and to an address. Bluetooth mesh defines three types of address.

A unicast address uniquely identifies a single element. Unicast addresses are assigned to devices during the provisioning process.

A group address is a multicast address which represents one or more elements. Group addresses are either defined by the Bluetooth Special Interest Group (SIG) and are known as SIG Fixed Group Addresses or are assigned dynamically. 4 SIG Fixed Group Addresses have been defined. These are named All-proxies, All-friends, All-relays and All-nodes. The terms Proxy, Friend, and Relay will be explained later in this paper.

It is expected that dynamic group addresses will be established by the user via a configuration application and that they will reflect the physical configuration of a building, such as defining group addresses which correspond to each room in the building.

A virtual address is an address which may be assigned to one or more elements, spanning one or more nodes. It takes the form of a 128-bit UUID value with which any element can be associated and is much like a label.

Virtual addresses will likely be preconfigured at the point of manufacture and be used for scenarios such as allowing the easy addressing of all meeting room projectors made by this manufacturer.

消息必须从一个地址发送到另一个地址。蓝牙 Mesh 定义了三种地址类型。


单播地址唯一地标识单个元素。在配置过程中,将单播地址分配给设备。


组地址是代表一个或多个元素的多播地址。组地址由蓝牙特殊兴趣组(SIG)定义,被称为

  • 2
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值