本教程将介绍如何使用 Module Gateway H2 搭配 CoreS3 主控运行 ESP Zigbee Host/NCP 案例程序。ESP Zigbee NCP (Network Co-Processor) 是一种网络协处理器模式,它将 Zigbee 协议栈运行在一个独立的处理器上,通过串口与主处理器通信。这种架构可以让主处理器专注于应用层逻辑,而将 Zigbee 网络相关的处理交给协处理器处理。参考下方教程为 Module Gateway H2 烧录 ESP Zigbee NCP 固件,为 CoreS3 烧录 ESP Zigbee Host 固件,实现创建 Coordinator 节点。
v5.3.1git clone --recursive https://github.com/espressif/esp-idf.git
cd esp-idf
git checkout v5.3.1 # recommend
./install.sh
. ./export.sh clone recursive递归克隆 ESP-Zigbee-SDK 仓库git clone --recursive https://github.com/espressif/esp-zigbee-sdk.git
cd esp-zigbee-sdk 


. ./export.sh用于激活相关的环境变量。详细说明请参考ESP-IDF - ESP32S3上手教程。esp32h2。cd examples/esp_zigbee_ncp
idf.py set-target esp32h2
idf.py menuconfig idf.py menuconfig进入配置页面。在 menuconfig 中配置设备的引脚信息:Component config -> Zigbee Network Co-processor- Component config → Zigbee Network Co-processor
- UART RX Pin: 23
- UART TX Pin: 24
- Component config → ESP Zigbee → Configure the Zigbee device type
- Zigbee Coordinator or Router device # or Zigbee End Device
idf.py build
idf.py erase_flash
idf.py flash # 根据实际端口修改 esp32s3。cd examples/esp_zigbee_host
idf.py set-target esp32s3 # 使用 CoreS3
idf.py menuconfig idf.py menuconfig进入配置页面。在 menuconfig 中配置设备的引脚信息:Component config -> Zigbee NCP Host- Component config → Zigbee NCP Host
- UART RX Pin: 10
- UART TX Pin: 17
idf.py build
idf.py flash idf.py monitor或其他的串口调试工具在 115200bps 配置下查看运行日志。
正常运行日志内容: