文章目录
- CONFIG_BT_ENABLED
- CONFIG_BT_MESH
- Support sending 2ms non-connectable advertising packets
- Support Duplicate Scan In BLE Mesh
- Support Active Scan In BLE Mesh
- Support Initialization of BLE (Internal DRAM)
- BLE Mesh and BLE coexistence support
- Enable BLE Mesh Fast Provisioning
- Support for BLE Mesh Provisioner
- Maximum number of devices that can be added to device queue
- Maximum number of PB-ADV running at the same time by Provisioner
- Maximum number of application keys that can be owned by Provisioner
- Support receiving Heartbeat messages that can be owned by Provisioner
- BLE Mesh Provisioning support
- Support Certificate-based provisioning authentication
- Provisioning support using the advertising bearer (PB-ADV)
- Interval between two consecutive Unprovisioned Device Beacon
- Provisioning support using GATT (PB-GATT)
- BLE Mesh GATT Proxy server
- Node Identity advertising timeout
- Maximum number of filter entries per Proxy Client
- Support receiving Proxy Solicitation PDU
- BLE Mesh configuration model persistently
- Maximum number of application keys per network
- Maximum number of subscription lists per network
- Maximum number of Label UUIDs used for Virtual Addresses
- Maximum capacity of the relay protection list
- Network message cache size
- Divider for IV Index state refresh timer
- Segmentation and reassembly enhancement
- Maximum number of simultaneously outgoing segmented messages
- Maximum incoming upper Transport Access PDU length
- Relay support
- Support for Low Power feature
- Disable BLE Mesh Debug logs (minimize bin size)
- BLE Mesh Debug Log Level
- Support for BLE Mesh Client/Server models
- Test the IV Update Procedure
- Make BLE Mesh experimental features visible
其实这部分的内容,是Component config的一部分,但是蓝牙功能(标准蓝牙,ble以及ble mesh)作为ESP32的核心功能之一,我还是决定单独把它放到一片文章里面来介绍
首先说明bluetooch
在Bluetooth没开启的时候,是没有底下的ble mesh选项的
CONFIG_BT_ENABLED
功能:启用 Bluetooth 功能,显示子菜单(如 Bluedroid 或 NimBLE 选项)。
CONFIG_BT_HOST (Bluedroid - Dual-mode)
功能:选择 Bluetooth 主机堆栈。
当前设置:Bluedroid(双模,支持经典 Bluetooth 和 BLE)。
选项:
BLUEDROID:支持经典 Bluetooth 和 BLE。
NIMBLE:仅支持 BLE,内存占用低。
CONTROLLER_ONLY:仅控制器,需外部主机。
说明:这里选项虽然写支持双模蓝牙,但是不知道为什么,我在和乐鑫原厂AE沟通的时候,他说只有最早的标准ESP32(不带任何后缀)支持标准蓝牙功能(一般用来开发蓝牙音箱之类的),这块不知道谁是对的
CONFIG_BT_CONTROLLER (Enabled)
功能:启用 Bluetooth 控制器堆栈。
CONFIG_BT_CONTROLLER_MODEM_SLEEP
功能:启用调制解调器休眠模式,降低功耗。
CONFIG_BT_CONTROLLER_POWER_SAVING
功能:启用控制器功耗节省功能。
CONFIG_BT_CONTROLLER_BLE
功能:启用 BLE 控制器支持。
CONFIG_BT_CONTROLLER_ADV_PACK
功能:设置广播包大小(字节)。
CONFIG_BT_CONTROLLER_HCI
功能:启用 HCI 层支持。
CONFIG_BT_CONTROLLER_HCI_UART
功能:使用 UART 作为 HCI 传输接口。
CONFIG_BT_CONTROLLER_HCI_UART_PORT
功能:指定 HCI UART 端口。
CONFIG_BT_CONTROLLER_HCI_UART_BAUD
功能:设置 HCI UART 波特率(默认115200)
CONFIG_BT_CONTROLLER_HCI_VHCI
功能:启用虚拟 HCI 接口。
接下来是ble mesh的配置
CONFIG_BT_MESH
功能:启用 BLE Mesh 协议栈。
Support sending 2ms non-connectable advertising packets
功能:支持发送 2ms 非连接广告包,优化短周期广播。
Support Duplicate Scan In BLE Mesh
功能:支持重复扫描,防止丢失重复广播消息。
Support Active Scan In BLE Mesh
功能:支持主动扫描,获取设备详细信息。
这三个功能,当作为配网者,应该是必须打开的(个人觉得)
Support Initialization of BLE (Internal DRAM)
功能:使用内部 DRAM 初始化 BLE 堆栈,未启用 PSRAM。
BLE Mesh and BLE coexistence support
功能:支持 BLE Mesh 和普通 BLE 共存。
Enable BLE Mesh Fast Provisioning
功能:启用快速配对,缩短设备加入时间。
Support for BLE Mesh Provisioner
功能:启用配对器角色,管理网络设备。
Maximum number of devices that can be added to device queue
功能:设置配对器设备队列最大数量。
Maximum number of PB-ADV running at the same time by Provisioner
功能:设置配对器同时运行的 PB-ADV(广告信道配对)数量。
Maximum number of application keys that can be owned by Provisioner
功能:设置配对器拥有的最大应用密钥数量。
Support receiving Heartbeat messages that can be owned by Provisioner
功能:支持接收 Heartbeat 消息,监控网络状态。
BLE Mesh Provisioning support
功能:支持 BLE Mesh 配对流程。
Support Certificate-based provisioning authentication
功能:支持基于证书的配对认证,增强安全性。
Provisioning support using the advertising bearer (PB-ADV)
功能:支持通过广告信道配对。
Interval between two consecutive Unprovisioned Device Beacon
功能:设置未配对设备信标间隔。
Provisioning support using GATT (PB-GATT)
功能:支持通过 GATT 配对。
BLE Mesh GATT Proxy server
功能:启用 GATT 代理服务器,连接非 Mesh 设备。
Node Identity advertising timeout
功能:设置节点身份广告超时。
Maximum number of filter entries per Proxy Client
功能:设置每个代理客户端的最大过滤条目。
Support receiving Proxy Solicitation PDU
功能:支持接收代理请求 PDU。
BLE Mesh configuration model persistently
功能:持久化存储配置模型。
Maximum number of application keys per network
功能:设置网络最大应用密钥数量。
Maximum number of subscription lists per network
功能:设置网络最大订阅列表数量。
Maximum number of Label UUIDs used for Virtual Addresses
功能:设置虚拟地址使用的最大 Label UUID 数量。
Maximum capacity of the relay protection list
功能:设置中继保护列表容量。
Network message cache size
功能:设置网络消息缓存大小。
Divider for IV Index state refresh timer
功能:设置 IV 索引刷新计时器分频。
Segmentation and reassembly enhancement
功能:增强分段和重组,支持大消息。
Maximum number of simultaneously outgoing segmented messages
功能:设置同时发送的最大分段消息数。
Maximum incoming upper Transport Access PDU length
功能:设置最大上层传输访问 PDU 长度。
Relay support
功能:启用中继支持。
Support for Low Power feature
功能:支持低功耗功能,管理低功耗节点。
Disable BLE Mesh Debug logs (minimize bin size)
功能:禁用调试日志,减少二进制大小。
BLE Mesh Debug Log Level
功能:设置日志级别。
当前设置:默认 NONE。
选项:
NONE、ERROR、WARNING、INFO、DEBUG。
Support for BLE Mesh Client/Server models
功能:支持客户端/服务器模型。
这里面有很多种模型,如图
常见的IO开关,使用onoff model
情景模式使用scene model
vendor model在这里没有,不过官方有vendor model的例程
这块就不一一介绍了,建议直接百度
Test the IV Update Procedure
功能:测试 IV 更新流程。
Make BLE Mesh experimental features visible
功能:显示实验性功能。
还有一个很关键的功能,就是
这个一定要打开,这样才会把你的配网信息存入nvs,重启后不丢失,我之前就是在这踩了不少的坑,因为我例程测试成功以后,是把例程的功能移植到之前测试的smart config工程里,结果忽略了这个选项。