Skip to content

Latest commit

 

History

History
64 lines (40 loc) · 3.35 KB

File metadata and controls

64 lines (40 loc) · 3.35 KB

Arduino-ESP32 Zigbee Gateway Example

This example shows how to configure Zigbee Gateway device, running on SoCs without native IEEE 802.15.4.

Supported Targets

Currently, this example supports the following targets.

Supported Targets ESP32 ESP32-S2 ESP32-S3 ESP32-C3

Hardware Required

  • One development board (ESP32-H2 or ESP32-C6) acting as Zigbee Radio Co-processor loaded with ot_rcp example.
  • A USB cable for power supply and programming.
  • Choose another board from supported targets as Zigbee coordinator/router and upload the Zigbee_Gateway example.

Configure the Project

Set the RCP connection (UART) by changing the GATEWAY_RCP_UART_PORT, GATEWAY_RCP_RX_PIN and GATEWAY_RCP_TX_PIN definition.

Using Arduino IDE

To get more information about the Espressif boards see Espressif Development Kits.

  • Before Compile/Verify, select the correct board: Tools -> Board.
  • Select the Coordinator Zigbee mode: Tools -> Zigbee mode: Zigbee ZCZR (coordinator/router).
  • Select Partition Scheme for Zigbee: Tools -> Partition Scheme: Zigbee 4MB with spiffs.
  • Select the COM port: Tools -> Port: xxx where the xxx` is the detected COM port.
  • Optional: Set debug level to verbose to see all logs from Zigbee stack: Tools -> Core Debug Level: Verbose.

Troubleshooting

  • In the Arduino IDE go to the Tools menu and set Erase All Flash Before Sketch Upload to Enabled.

By default, the coordinator network is closed after rebooting or flashing new firmware. To open the network you have 2 options:

  • Open network after reboot by setting Zigbee.setRebootOpenNetwork(time); before calling Zigbee.begin();.
  • In application you can anytime call Zigbee.openNetwork(time); to open the network for devices to join.

Important: Make sure you are using a good quality USB cable and that you have a reliable power source

  • LED not blinking: Check the wiring connection and the IO selection.
  • Programming Fail: If the programming/flash procedure fails, try reducing the serial connection speed.
  • COM port not detected: Check the USB cable and the USB to Serial driver installation.

If the error persists, you can ask for help at the official ESP32 forum or see Contribute.

Contribute

To know how to contribute to this project, see How to contribute.

If you have any feedback or issue to report on this example/library, please open an issue or fix it by creating a new PR. Contributions are more than welcome!

Before creating a new issue, be sure to try Troubleshooting and check if the same issue was already created by someone else.

Resources