|
|
2 лет назад | |
|---|---|---|
| .. | ||
| main | 2 лет назад | |
| CMakeLists.txt | 2 лет назад | |
| README.md | 2 лет назад | |
| partitions.csv | 2 лет назад | |
| sdkconfig.defaults | 2 лет назад | |
| Supported Targets | ESP32 | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 |
|---|
This example demonstrates how to build a Zigbee Gateway device.
The ESP Zigbee SDK provides more examples and tools for productization:
By default, two SoCs are required to run this example:
Connect the two SoCs via UART, below is an example setup with ESP32-DevKitC and ESP32-H2-DevKitC:

| ESP32 pin | ESP32-H2 pin |
|---|---|
| GND | G |
| GPIO4 (RX) | TX |
| GPIO5 (TX) | RX |
The example could also run on a single SoC which supports both Wi-Fi and Zigbee (e.g., ESP32-C6), but since there is only one RF path in ESP32-C6, which means Wi-Fi and Zigbee can't receive simultaneously, it has a significant impact on performance. Hence the two SoCs solution is recommended.
Before project configuration and build, make sure to set the correct chip target using idf.py set-target <chip_name>.
In order to run the example on single SoC which supports both Wi-Fi and Thread, the option CONFIG_ESP_COEX_SW_COEXIST_ENABLE and option CONFIG_ZB_RADIO_NATIVE should be enabled. The two options are enabled by default for ESP32-C6 target.
Before flash it to the board, it is recommended to erase NVRAM if user doesn't want to keep the previous examples or other projects stored info using idf.py -p PORT erase-flash
Build the project, flash it to the board, and start the monitor tool to view the serial output by running idf.py -p PORT flash monitor
(To exit the serial monitor, type Ctrl-].)
As you run the example, you will see the following log:
esp_zigbee_gateway:
I (660) ESP_ZB_GATEWAY: status: -1
I (670) ESP_ZB_GATEWAY: Zigbee stack initialized
I (680) ESP_ZB_GATEWAY: Zigbee rcp device booted
I (1280) ESP_ZB_GATEWAY: Start network formation
I (3060) ESP_ZB_GATEWAY: Formed network successfully (ieee extended address: f9:54:2d:01:a0:03:f7:84, PAN ID: 0x8651)
I (4060) ESP_ZB_GATEWAY: status: 0
I (4400) ESP_ZB_GATEWAY: Network steering started
For any technical queries, please open an issue on GitHub. We will get back to you soon