2023-03-22 04:26:29 -04:00
| Supported Targets | ESP32-C6 | ESP32-H2 |
| ----------------- | -------- | -------- |
2021-07-28 03:32:59 -04:00
2021-08-25 06:05:04 -04:00
# OpenThread Radio Co-Processor (RCP) Example
2021-07-28 03:32:59 -04:00
2021-08-25 06:05:04 -04:00
This example demonstrates an [OpenThread Radio Co-Processor ](https://openthread.io/platforms/co-processor ).
2021-07-28 03:32:59 -04:00
2021-08-25 06:05:04 -04:00
OpenThread RCP doesn't function alone, it needs to work together with a Host and this example covers two common user scenarios:
- Work with a Host Processor to perform a [Thread Border Router ](https://openthread.io/guides/border-router ).
- Work as a [Thread Sniffer ](https://openthread.io/guides/pyspinel/sniffer ).
2021-07-28 03:32:59 -04:00
2021-08-25 06:05:04 -04:00
## How to use example
2021-07-28 03:32:59 -04:00
2021-08-25 06:05:04 -04:00
### Hardware Required
2021-07-28 03:32:59 -04:00
2023-07-10 07:24:19 -04:00
To run this example, a board with IEEE 802.15.4 module (for example ESP32-H2) is required.
2021-07-28 03:32:59 -04:00
2021-08-25 06:05:04 -04:00
### Configure the project
2021-07-28 03:32:59 -04:00
2023-04-07 00:20:26 -04:00
The default communication interface is port 0 of ESP32-H2 UART running at 460800 baud, change the configuration in [esp_ot_config.h ](main/esp_ot_config.h ) if you want to use another interface or need different communication parameters.
2021-07-28 03:32:59 -04:00
2021-08-25 06:05:04 -04:00
### Build and Flash
Build the project and flash it to the board:
2021-07-28 03:32:59 -04:00
```
idf.py -p < PORT > build flash
```
2021-08-25 06:05:04 -04:00
Now you'll get an OpenThread RCP, you can try the following use cases:
2021-07-28 03:32:59 -04:00
2021-08-25 06:05:04 -04:00
#### Thread Border Router
2021-07-28 03:32:59 -04:00
2021-08-25 06:05:04 -04:00
Please refer to [ot_br ](../ot_br ) example for the setup steps.
2021-07-28 03:32:59 -04:00
2021-08-25 06:05:04 -04:00
#### Thread Sniffer
2021-07-28 03:32:59 -04:00
2021-08-25 06:05:04 -04:00
Please refer to [Thread Sniffer ](https://openthread.io/guides/pyspinel/sniffer ) for the detailed instructions.