Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New OpenThread CLI Arduino Library for ESP32-C6 and ESP32-H2 #9908

Merged
merged 32 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
9e26803
feat(OThread): Add Library
SuGlider Jun 20, 2024
fb2a502
Merge branch 'master' into OpenThread
SuGlider Jun 20, 2024
1a66bc1
fix(OpenThread): fixes file list in CMakeLists.txt
SuGlider Jun 20, 2024
827b72c
Merge branch 'OpenThread' of https://github.com/SuGlider/arduino-esp3…
SuGlider Jun 20, 2024
54f043a
fix(openthread): Fixes JSON CI Files
SuGlider Jun 20, 2024
69f4fce
Merge branch 'master' into OpenThread
SuGlider Jun 20, 2024
3e11343
fix(openthread): Fixes JSON CI Files
SuGlider Jun 20, 2024
1b2530d
fix(openthread): Include Openthread guarding
SuGlider Jun 20, 2024
739b77c
fix(openthread): COAP parametrization
SuGlider Jun 20, 2024
3687c5f
fix(openthread): Include Openthread guarding
SuGlider Jun 20, 2024
bbece1c
fix(openthread): Improves commentaries and code
SuGlider Jun 20, 2024
5c677be
fix(openthread): Improves code
SuGlider Jun 20, 2024
436a7ff
fix(openthread): Includes StreamString.h
SuGlider Jun 20, 2024
378f993
Merge branch 'master' into OpenThread
SuGlider Jun 20, 2024
ce46f4a
feat(openthread): New Scan Example
SuGlider Jun 20, 2024
7fece86
feat(openthread): Improved Scan Example
SuGlider Jun 20, 2024
001ae42
feat(openthread): README.md
SuGlider Jun 21, 2024
198e6e8
feat(openthread): helper functions documentation
SuGlider Jun 21, 2024
28d7c44
fix(openthread): begin end
SuGlider Jun 22, 2024
3507a9d
feat(openthread): onReceice example
SuGlider Jun 23, 2024
f9d1e55
Merge branch 'OpenThread' of https://github.com/SuGlider/arduino-esp3…
SuGlider Jun 23, 2024
176f92b
fix(openthread): tx queue error
SuGlider Jun 23, 2024
6b0b9af
fix(doc): fixing documentation apresentation
SuGlider Jun 23, 2024
4ec1397
fix(doc): documentation format
SuGlider Jun 24, 2024
2aaa575
feat(openthread): commentary
SuGlider Jun 24, 2024
46cf9aa
Merge branch 'master' into OpenThread
lucasssvaz Jun 24, 2024
eb7b019
fix(openthread): Typo, start/stop console
SuGlider Jun 24, 2024
919bf79
Merge branch 'OpenThread' of https://github.com/SuGlider/arduino-esp3…
SuGlider Jun 24, 2024
b60a354
fix(openthread): library properties
SuGlider Jun 24, 2024
11ec1d1
ci(pre-commit): Apply automatic fixes
lucasssvaz Jun 24, 2024
55f9378
feat(openthread): formatting text
SuGlider Jun 24, 2024
81d62e9
ci(pre-commit): Apply automatic fixes
pre-commit-ci-lite[bot] Jun 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 31 additions & 9 deletions libraries/OpenThread/examples/COAP/coap_lamp/coap_lamp.ino
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,41 @@
#define OT_COAP_RESOURCE_NAME "Lamp"

const char *otSetupLeader[] = {
lucasssvaz marked this conversation as resolved.
Show resolved Hide resolved
// clear/disable all
"coap", "stop", "thread", "stop", "ifconfig", "down", "dataset", "clear",
// set dataset
"dataset", "init new", "dataset channel", OT_CHANNEL, "dataset networkkey", OT_NETWORK_KEY, "dataset", "commit active",
// network start
"ifconfig", "up", "thread", "start"
// -- clear/disable all
// stop CoAP
"coap", "stop",
// stop Thread
"thread", "stop",
// stop the interface
"ifconfig", "down",
// clear the dataset
"dataset", "clear",
// -- set dataset
// create a new complete dataset with random data
"dataset", "init new",
// set the channel
"dataset channel", OT_CHANNEL,
// set the network key
"dataset networkkey", OT_NETWORK_KEY,
// commit the dataset
"dataset", "commit active",
// -- network start
// start the interface
"ifconfig", "up",
// start the Thread network
"thread", "start"
};
lucasssvaz marked this conversation as resolved.
Show resolved Hide resolved

const char *otCoapLamp[] = {
lucasssvaz marked this conversation as resolved.
Show resolved Hide resolved
// create a multicast IPv6 Address for this device
// -- create a multicast IPv6 Address for this device
"ipmaddr add", OT_MCAST_ADDR,
// start and create a CoAP resource
"coap", "start", "coap resource", OT_COAP_RESOURCE_NAME, "coap set", "0"
// -- start and create a CoAP resource
// start CoAP as server
"coap", "start",
// create a CoAP resource
"coap resource", OT_COAP_RESOURCE_NAME,
// set the CoAP resource initial value
"coap set", "0"
};
lucasssvaz marked this conversation as resolved.
Show resolved Hide resolved

bool otDeviceSetup(const char **otSetupCmds, uint8_t nCmds1, const char **otCoapCmds, uint8_t nCmds2, ot_device_role_t expectedRole) {
Expand Down
32 changes: 23 additions & 9 deletions libraries/OpenThread/examples/COAP/coap_switch/coap_switch.ino
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,32 @@
#define OT_COAP_RESOURCE_NAME "Lamp"

const char *otSetupChild[] = {
lucasssvaz marked this conversation as resolved.
Show resolved Hide resolved
// clear/disable all
"coap", "stop", "thread", "stop", "ifconfig", "down", "dataset", "clear",
// set dataset
"dataset channel", OT_CHANNEL, "dataset networkkey", OT_NETWORK_KEY, "dataset", "commit active",
// network start
"ifconfig", "up", "thread", "start"
// -- clear/disable all
// stop CoAP
"coap", "stop",
// stop Thread
"thread", "stop",
// stop the interface
"ifconfig", "down",
// clear the dataset
"dataset", "clear",
// -- set dataset
// set the channel
"dataset channel", OT_CHANNEL,
// set the network key
"dataset networkkey", OT_NETWORK_KEY,
// commit the dataset
"dataset", "commit active",
// -- network start
// start the interface
"ifconfig", "up",
// start the Thread network
"thread", "start"
};
lucasssvaz marked this conversation as resolved.
Show resolved Hide resolved

const char *otCoapSwitch[] = {
lucasssvaz marked this conversation as resolved.
Show resolved Hide resolved
// start and create a CoAP resource
"coap",
"start",
// -- start CoAP as client
"coap", "start"
};
lucasssvaz marked this conversation as resolved.
Show resolved Hide resolved

bool otDeviceSetup(
Expand Down
Loading