ESP32-C6 Thread library/sample code

Vishnu_C
Posts: 6
Joined: Mon Dec 30, 2024 5:08 am

ESP32-C6 Thread library/sample code

Postby Vishnu_C » Fri May 08, 2026 9:10 am

Hello everyone,
I m working on project to build a mesh network using esp32-C6. Approximately 120-150 devices will be used.
I did research and found that thread is recommended for this large number , went through open thread as well.
But i didn't any project on internet that demonstrated how to use thread and build mesh network , though video exist which openthread based border router but without understand how the code works, what the library does and how to integrate in project is not well documentation i feel. I have installed ESP-IDF on vscode , went through example though even it help . Usually i would expect an tutorial like for example to start from scratch like : Library API, how to integrate , what should be the first in setup to be made and how to configure things. Sorry this mind sound bit odd but really didn't a good example that would demonstrate all these. I request if you anyone knows any reference please help me.
Thank you
Best regards,
Vishnu

Lvxinyue
Espressif staff
Espressif staff
Posts: 100
Joined: Fri Dec 25, 2015 6:13 am

Re: ESP32-C6 Thread library/sample code

Postby Lvxinyue » Mon May 18, 2026 10:18 am

Hi,

Please check the OpenThread guide at https://docs.espressif.com/projects/esp ... hread.html. If you still have questions, try our chatbot at https://chat.espressif.com/. Thanks.

Vishnu_C
Posts: 6
Joined: Mon Dec 30, 2024 5:08 am

Re: ESP32-C6 Thread library/sample code

Postby Vishnu_C » Mon May 25, 2026 9:46 am

Problems:

Every example, forum, YouTube video and even Espressif AI only shows CLI-based UDP
No Native API UDP example exists (otUdpOpen, otUdpSend, otUdpReceive) for Arduino ESP32
Using SimpleCLI — incoming UDP messages only appear in Serial Monitor when another command is typed
No example or documentation for basic custom application like a sensor node sending data over UDP(basically sending packet over udp)
No explanation of when to use CLI vs Native API
Same problem exists in both Arduino and ESP-IDF frameworks — As developers i m stuck between both

Where can I find:

A working Native API UDP send/receive example — no CLI?
A simple sensor node example using Thread + UDP?
Documentation explaining CLI vs Native API?
Any information on the UDP receive buffering issue in SimpleCLI?

SuGlider
Espressif staff
Espressif staff
Posts: 2
Joined: Wed Sep 08, 2021 12:48 pm

Re: ESP32-C6 Thread library/sample code

Postby SuGlider » Tue Jun 02, 2026 3:59 am

This issue is also been tracked within Arduino Issue https://github.com/espressif/arduino-esp32/issues/12616
New features for Arduino OpenThread UDP support will be added.

SuGlider
Espressif staff
Espressif staff
Posts: 2
Joined: Wed Sep 08, 2021 12:48 pm

Re: ESP32-C6 Thread library/sample code

Postby SuGlider » Fri Jun 12, 2026 3:30 pm

## Issue resolution summary (ESP32 Arduino OpenThread Library PoV):

2 PRs solve all the request:
PR #12646 https://github.com/espressif/arduino-esp32/pull/12646
PR #12672 https://github.com/espressif/arduino-esp32/pull/12672

**Problems:**
- Every example, forum, YouTube video and even Espressif AI only shows CLI-based UDP

ESP32 Arduino supports Open Thread Native UDP socket within PR #12672 and using CLI commands in PR #12646

- No Native API UDP example exists (`otUdpOpen`, `otUdpSend`, `otUdpReceive`) for Arduino ESP32

Solved with PR #12672

- Using SimpleCLI — incoming UDP messages only appear in Serial Monitor when another command is typed

This is the SimpleCLI.ino example that provides a Console Serial0 (UART) command line interface for interacting with ESP-IDF OpenThread implemnetation.

There are many other examples that demonstrate how Arduino `Stream` class can be used to interact with CLI in
https://github.com/espressif/arduino-es ... mples/CLI/

- No example or documentation for basic custom application like a sensor node sending data over UDP(basically sending packet over udp)

New examples are provided in PR #12646 using CLI and PR #12672 using Native OpenThread UDP API:

https://github.com/espressif/arduino-es ... es/CLI/UDP
https://github.com/espressif/arduino-es ... s/CLI/COAP

https://github.com/espressif/arduino-es ... sorNetwork
https://github.com/espressif/arduino-es ... ght_Switch

- No explanation of when to use CLI vs Native API

PR #12646 has a document about

https://github.com/espressif/arduino-es ... comparison

- Same problem exists in both Arduino and ESP-IDF frameworks — As developers i m stuck between both

Please check the above for Arduino OpenThread Library

**Where can I find:**
- A working Native API UDP send/receive example — no CLI?

PR #12672 solves this:

https://github.com/espressif/arduino-es ... sorNetwork
https://github.com/espressif/arduino-es ... ght_Switch


- A simple sensor node example using Thread + UDP?

PR #12672 solves this:

https://github.com/espressif/arduino-es ... sorNetwork


- Documentation explaining CLI vs Native API?

PR #12646 solves this:

https://github.com/espressif/arduino-es ... amples/CLI
https://docs.espressif.com/projects/ard ... d_cli.html
https://docs.espressif.com/projects/ard ... _core.html

- Any information on the UDP receive buffering issue in SimpleCLI?

CLI is a way to interact with OpenThread using Command Line Interface.
https://github.com/espressif/arduino-es ... /README.md

SimpleCLI is an Arduino example that opens the Console (UART0) of the ESP32-C6/C5/H2 for user interaction.
For more information about CLI commands please refer to:

https://openthread.io/reference/cli
https://openthread.io/reference/cli/commands

### More Information about ESP32 Arduino OpenThread Library:

https://github.com/espressif/arduino-es ... /README.md
https://docs.espressif.com/projects/ard ... hread-apis
https://docs.espressif.com/projects/ard ... hread.html
https://docs.espressif.com/projects/ard ... _core.html
https://docs.espressif.com/projects/ard ... taset.html
https://docs.espressif.com/projects/ard ... d_cli.html
https://docs.espressif.com/projects/ard ... d_udp.html

Who is online

Users browsing this forum: No registered users and 0 guests