pdf-icon

产品上手指引

Zigbee

Thread

Module Gateway H2

IoT 工具

IoT 云端服务

Ethernet 摄像头

拨码开关

Module LoRa868 v1.2

Module LoRa868/433 v1.1

软件工具

ESP Zigbee Gateway

本教程将介绍如何使用Module Gateway H2搭配CoreS3主控运行ESP Zigbee Gateway案例程序。ESP Zigbee Gateway 是一个基于 ESP32 系列 Wi-Fi SoC 和 ESP32-H2 802.15.4 SoC 的网关设备。它可以将 Zigbee 网络与 Wi-Fi 网络连接起来,实现智能家居设备的互联互通。

1.准备工作

git clone --recursive https://github.com/espressif/esp-zigbee-sdk.git
cd esp-zigbee-sdk

  • 4.后续教程使用到的idf.py指令均依赖ESP-IDF, 运行指令前需要执行ESP-IDF中. ./export.sh用于激活相关的环境变量。详细说明请参考 ESP-IDF - ESP32S3上手教程

2.编译RCP固件

  • 1.在编译 Gateway 固件之前,需要先生成 RCP 固件。参考下方指令进入对应的rcp固件目录, 设置编译target为esp32h2
cd $IDF_PATH/examples/openthread/ot_rcp
idf.py set-target esp32h2
idf.py menuconfig
  • 2.使用idf.py menuconfig进入配置页面。在menuconfig中配置:Component config -> OpenThread RCP Example - Enable OPENTHREAD_NCP_VENDOR_HOOK

  • 3.完成配置后, 执行以下指令进行RCP固件编译。

idf.py build

3.编译Gateway固件

  • 1.进入esp_zigbee_gateway案例程序路径, 设置编译对象。
cd esp-zigbee-sdk/examples/esp_zigbee_gateway
idf.py set-target esp32s3
idf.py menuconfig
  • 2.并在menuconfig中配置启用:ESP Zigbee gateway rcp update -> Update RCP automatically。同时配置正确的通信引脚, 该引脚配置针对CoreS3主控, 若使用其他的主控设备可根据实际情况进行修改。
- Board Configuration
  - Pin to RCP reset: 7
  - Pin to RCP boot: 18
  - Pin to RCP TX: 10
  - Pin to RCP RX: 17
  • 3.Gateway WiFi连接配置
- Example Connection Configuration
  - WiFi SSID
  - WiFi Password

4.编译和烧录

idf.py build
idf.py erase_flash
idf.py flash

5.开始运行

  • 将CoreS3与Module Gateway H2连接。
  • 将CoreS3连接至电脑
  • 通过idf.py monitor或其他的串口调试工具在115200bps配置下查看运行日志。

正常运行日志内容:

  • RCP 固件版本检查
  • Wi-Fi 连接成功
  • Zigbee 网络创建成功
  • 网络开放允许设备加入
On This Page