BLE Mesh(五)BLE Mesh 工作原理

2023-05-16

Bluetooth Mesh in Action

  • 1 Message Publication and Delivery
  • 2 Multipath Delivery
  • 3 Managed Flooding
    • 3.1 Heartbeats
    • 3.2 TTL
    • 3.3 Message Cache
    • 3.4 Friendship
  • 4 Traversing the Stack

1 Message Publication and Delivery

A network which uses Wi-Fi is based around a central network node called a router, and all network traffic passes through it. If the router is unavailable, the whole network becomes unavailable.

In contrast, Bluetooth mesh uses a technique known as managed flooding to deliver messages. Messages, when published by a node, are broadcast rather than being routed directly to one or more specific nodes. All nodes receive all messages from nodes that are in direct radio range and, if configured to do so, will then relay received messages. Relaying involves broadcasting the received message again, so that other nodes, more distant from the originating node, might receive the message broadcast.

使用 Wi-Fi 的网络围绕一个称为路由器的中心网络节点为基础,所有网络流量都通过该节点。如果路由器不可用,则整个网络将不可用。


相比之下,蓝牙 Mesh 网络使用一种称为管理泛洪的技术来传递消息。由节点发布的消息将被广播,而不是直接路由到一个或多个特定节点。所有节点都接收来自自身无线电范围内的节点的所有消息,如果配置为这样做,则将中继接收到的消息。中继涉及再次广播接收到的消息,以便距离原始节点较远的其他节点能接收到广播的消息。

2 Multipath Delivery

An important consequence of Bluetooth technology’s use of managed flooding is that messages arrive at their destination via multiple paths through the network. This makes for a highly reliable network and it is the primary reason for having opted to use a flooding approach rather than routing in the design of Bluetooth mesh networking.

蓝牙技术使用管理泛洪的一个重要后果是,消息会通过网络中的多条路径到达目的地。这形成了高度可靠的网络,这是在蓝牙 Mesh 网络设计中选择使用泛洪方法而非路由的主要原因。

3 Managed Flooding

Bluetooth mesh networking leverages the strengths of the flooding approach and optimizes its operation such that it is both reliable and efficient. The measures which optimize the way flooding works in Bluetooth mesh networking are behind the use of the term “managed flooding”. Those measures are as follows:

蓝牙 Mesh 网络利用了泛洪方法的优势,并优化了其操作,使其既可靠又高效。在蓝牙 Mesh 网络中优化泛洪工作方式的措施是使用术语“管理泛洪”的背后。这些措施如下:

3.1 Heartbeats

Heartbeat messages are transmitted by nodes periodically. A heartbeat message indicates to other nodes in the network that the node sending the heartbeat is still active. In addition, heartbeat messages contain data which allows receiving nodes to determine how far away the sender is, in terms of the number of hops required to reach it. This knowledge can be exploited with the TTL field.

心跳消息由节点定期发送。心跳消息向网络中的其他节点指示发送心跳的节点仍处于活动状态。此外,心跳消息还包含数据,这些数据使接收节点可以根据到达发送方所需的跳数确定发送方的距离。可以通过 TTL 字段利用此数据。

3.2 TTL

TTL (Time To Live) is a field which all Bluetooth mesh PDUs include. It controls the maximum number of hops, over which a message is relayed. Setting the TTL allows nodes to exercise control over relaying and conserve energy, by ensuring messages are not relayed further than is required.

Heartbeat messages allow nodes to determine what the optimum TTL value should be for each message published.

TTL(生存时间)是所有蓝牙 Mesh PDU 都包含的字段。它控制中继的最大跳数。设置 TTL 可以确保节点不会中继太多,从而使节点可以控制中继并节省能量。


心跳消息使节点可以确定每个发布的消息的最佳 TTL 值。

3.3 Message Cache

A message cache must be implemented by all nodes. The cache contains all recently seen messages and if a message is found to be in the cache, indicating the node has seen and processed it before, it is immediately discarded.

消息缓存必须由所有节点实现。消息缓存包含所有最近收到的消息,如果发现一条消息存在于消息缓存中,表明该节点之前已经收到和处理过该消息,则立即将其丢弃。

3.4 Friendship

Probably the most significant optimization mechanism in a Bluetooth mesh network is provided by the combination of Friend nodes and Low Power nodes. As described, Friend nodes provide a message store and forward service to associated Low Power nodes. This allows Low Power nodes to operate in a highly energy-efficient manner.

蓝牙 Mesh 网络中最重要的优化机制可能是 Friend 节点和 Low Power 节点的组合。如所述,Friend 节点提供消息存储并将服务转发到关联的 Low Power 节点。这允许低功耗节点以高效节能的方式运行。

4 Traversing the Stack

A node, receiving a message, passes it up the stack from the underlying Bluetooth LE stack, via the bearer layer to the network layer.

The network layer applies various checks to decide whether or not to pass the message higher up the stack or to discard it.

In addition, PDUs have a Network ID field, which provides a fast way to determine which NetKey the message was encrypted with. If the NetKey is not recognized by the network layer on the receiving node, this indicates it does not possess the corresponding NetKey, is not a member of that subnet and so the PDU is discarded. There’s also a network message integrity check (MIC) field. If the MIC check fails, using the NetKey corresponding to the PDUs Network ID, then the message is discarded.

Messages, are received by all nodes in range of the node that sent the messages but many will be quickly discarded when it becomes apparent they are not relevant to this node due to the network or subnet(s) it belongs to.

The same principle is applied higher up the stack in the upper transport layer. Here though, the check is against the AppKey associated with the message, and identified by an application identifier (AID) field in the PDU. If the AID is unrecognized by this node, the PDU is discarded by the upper transport layer. If the transport message integrity check (TransMIC) fails, the message is discarded.

接收到消息的节点将其从底层低功耗蓝牙协议栈通过承载层传递到 Mesh 协议栈,到达网络层。


网络层应用各种检查来决定是否将消息传递到更高的协议栈栈或将其丢弃。


此外,PDU 具有网络 ID 字段,该字段提供了一种快速的方法来确定使用哪个 NetKey 对消息加密。如果接收节点上的网络层无法识别 NetKey,则表明它不具有相应的 NetKey,不是该子网的成员,因此 PDU 被丢弃。还有一个网络消息完整性检查(MIC)字段。如果 MIC 检查失败,则使用与 PDU 网络 ID 对应的 NetKey,则将消息丢弃。


消息被发送消息的节点范围内的所有节点接收,但是当这些节点所属的网络或子网而明显与它们无关时,许多消息将被迅速丢弃。


在上层传输层中,沿协议栈向上应用相同的原理。但是,此处的检查是针对与消息关联的 AppKey,并由 PDU 中的应用程序标识符(AID)字段标识。如果此节点无法识别 AID,则 PDU 被上层传输层丢弃。如果传输消息完整性检查(TransMIC)失败,则该消息将被丢弃。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

BLE Mesh(五)BLE Mesh 工作原理 的相关文章

  • 消息代理RabbitMQ——介绍篇

    1消息队列概述 我们现在生活的是一个信息高质量高可用并且持久的一个时代 xff0c 作为技术开发人员 xff0c 我们造就的代码程序需要有能力以简单并且高效可靠的方式将信息传送给需要的接受者 更为重要的是我们要优化消息传递的方式 xff0c
  • Spring Cloud Stream中文翻译

    Ditmars RELEASE 1 Spring Cloud Stream 介绍 Spring Cloud Stream是一个用于构建消息驱动应用的微服务框架 Spring Cloud Stream基于Spring Boot来构建独立生产级
  • Spring Security Architecture翻译

    Spring Security 架构 本指南是Spring Security的入门 xff0c 致力于深入了解框架设计和基本构建块 虽然仅设计应用程序安全性的基础知识 xff0c 但是这样做可以清除开发人员使用Spring Security
  • Spring Boot and OAuth2翻译

    Spring Boot and OAuth2 本指南将向您展示如何使用OAuth2和Spring Boot构建一个使用 社交登录 功能做各种事情的应用程序示例 它从一个简单的单一提供者单点登录开始 xff0c 并运行一个带有身份验证提供程序
  • CMake系列(九) CMake 头文件接口库编译及使用

    文章目录 目录结构结构说明接口目标简述CMake接口目标实现方法 调用关系 源文件头文件CMakeLists txtpublic3 的CMakeListspublic4 的CMakeListsapp4 的CMakeListsmain的CMa
  • CMake常用命令(六)link_libraries 和 target_link_libraries 链接库

    文章目录 link libraries语法作用参数举例 target link libraries作用语法参数作用举例 两者的区别include directories xff1a target include directories xf
  • 北大中文核心期刊计算机类前30%名录

    1 计算机学报 2 软件学报 3 自动化学报 4 计算机研究与发展 5 控制与决策 6 中国图像图形学报 7 计算机辅助设计与图形学学报 8 计算机应用研究 9 计算机科学 属于其他类目但也可以发计算机的期刊名录 1 激光与光电子学进展
  • Xshell 无法连接虚拟机中的ubuntu的问题

    昨天在VMware Player中安装了ubuntu系统 xff0c 今天想通过xshell连接ubuntu xff0c 结果显示 Connecting to 10 7 100 182 22 Could not connect to 39
  • MATLAB无法直接打开M文件

    MATLAB无法直接打开M文件 啊这1 下载MATLAB文件关联 amp 快捷修复文件2 在MATLAB添加路径3 运行associateFiles m4 打开生成的注册表文件5 重启电脑 啊这 穷折腾装了个2020试试 xff0c 发现安
  • LWIP个人移植心得,平台STM32F4,HAL库,CMSIS_OS系统封装

    LWIP个人移植心得 xff0c 平台STM32F4 xff0c HAL库 xff0c CMSIS OS系统封装 1 先在官网下载LWIP源码及例程文件 xff0c 以1 4 1版本为例分别是lwip 1 4 1和contrib 1 4 1
  • Pyqt5 ——setStyleSheet用法

    版权声明 xff1a 本文为博主原创文章 xff0c 遵循 CC 4 0 BY SA 版权协议 xff0c 转载请附上原文出处链接和本声明 本文链接 xff1a https blog csdn net weixin 42066185 art
  • 递归互斥量解决死锁问题

    一 递归互斥量 一般情况下 xff0c 我们在同一个线程中对同一个互斥量加两次锁 xff0c 就会死锁 xff08 自我死锁 xff09 如果将互斥量类型属性设置为递归类型 PTHREAD MUTEX RECURSIVE 就不会出现此问题
  • 单相逆变器及基于STM32 SPWM生成代码

    2022 4 26更新 若需商业合作可私聊留VX号 xff0c 博主看到后会添加的 最近在做单相逆变器 xff0c 用篇文章来记录 主电路采用H桥 xff0c 使用IR2104半桥驱动内置630ns死区 xff0c 上管采用自举电容浮地驱动
  • 20200329 百度 测试开发实习 笔试题

    20200329 百度 测试开发实习 笔试题 第一题题目描述 xff1a 输入输出样例输入样例输出提示 第二题题目描述 xff1a 输入输出样例输入样例输出 第一题 题目描述 xff1a 桌子上放着N枚硬币 xff0c 将其从1到N编号 x
  • STM32 VBAT外围电路接法详解

    给大家看几块开发板的VBAT外围电路的设计图 xff1a xff08 1 xff09 xff08 2 xff09 xff08 3 xff09 xff08 4 xff09 xff08 5 xff09 stm32芯片手册要求 xff1a xff
  • PX4混控矩阵的移植

    首先感谢各位提供帮助的大神们 xff0c 我也只是把人的心得总结一下 xff0c 加上自己的一点感悟 xff1a 混控步骤 xff1a 一 忽略偏航进行融合处理 1根据混控矩阵计算得到out xff0c 这一步已经包含油门 xff0c 同时
  • 关于hal库使用笔记——串口接收中断部分

    在HAL库中 xff0c 进入接收中断的方法与标准库很不一样 xff0c 具体方法如下 u8 Res 1 声明一个U8数组 HAL UART Receive IT amp huart1 Res 1 初始化中打开串口1接收中断 重写函数HAL
  • TX2 备份与恢复系统(转)

    转载 xff1a https www ncnynl com archives 201706 1740 html TX2入门教程基础篇 备份和恢复 说明 xff1a 介绍如何为TX2进行备份和恢复 xff08 0 xff09 准备 xff1a
  • FTP-HTTP-HTTPS的学习总结

    FTP协议的学习 一 xff0c 学习的要点 ftp的掌握总体架构 了解状态机 请求响应的格式 常用操作码及响应的含义 PORT与PASV的区别 断点续传 上传 下载文件的基本流程 1 xff0c FTP的架构主要有两种形式 UserPI
  • Zookeeper启动失败

    zkServer sh status ZooKeeper JMX enabled by default Using config Users leewz app zookeeper 3 5 3 beta bin conf zoo cfg C

随机推荐