このチュートリアルでは、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.1 の使用を推奨します。git 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 


idf.py コマンドは ESP‑IDF に依存します。コマンドを実行する前に、ESP‑IDF 内で . ./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 の設定で実行ログを確認してください。
正常な実行ログの内容: