-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
openthread-border-router: Bump firmwares, flasher, and OTBR to latest versions #3808
Changes from 9 commits
73bfaae
2803fbb
bb5b198
75feb65
d76c021
04d91f0
0a5eeb4
22eb17c
d883e81
c3a1b1c
d4d12ca
bc15777
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,24 @@ | ||
From 2efa60f83b71402ce0c1ef176be8f88a9bfdefac Mon Sep 17 00:00:00 2001 | ||
From a2b607db19b643e63b8a6be84fb95adfbd9ebb47 Mon Sep 17 00:00:00 2001 | ||
From: Stefan Agner <[email protected]> | ||
Date: Mon, 5 Jun 2023 23:41:50 +0200 | ||
Subject: [PATCH] support deleting the dataset | ||
Subject: [PATCH 1/3] support deleting the dataset | ||
|
||
Add REST API to support deleting the active or pending operational | ||
dataset. Deleting the active operational dataset requires the Thread | ||
network to be disabled (just like modifying the active operational | ||
dataset). Subsequent use of the PUT method allows to build entirly | ||
new datasets with values generated by the stack (through | ||
otDatasetCreateNewNetwork). | ||
|
||
Signed-off-by: puddly <[email protected]> | ||
--- | ||
src/rest/openapi.yaml | 21 +++++++++++++++++++++ | ||
src/rest/resource.cpp | 35 +++++++++++++++++++++++++++++++++++ | ||
src/rest/resource.hpp | 1 + | ||
3 files changed, 57 insertions(+) | ||
|
||
diff --git a/src/rest/openapi.yaml b/src/rest/openapi.yaml | ||
index 2ba2a4dd56f..2edc4af29ad 100644 | ||
index 4a033eb7..3cc2ef8f 100644 | ||
--- a/src/rest/openapi.yaml | ||
+++ b/src/rest/openapi.yaml | ||
@@ -248,6 +248,18 @@ paths: | ||
|
@@ -55,7 +57,7 @@ index 2ba2a4dd56f..2edc4af29ad 100644 | |
schemas: | ||
LeaderData: | ||
diff --git a/src/rest/resource.cpp b/src/rest/resource.cpp | ||
index ce154c2e5b3..1708faf6abc 100644 | ||
index ce154c2e..1708faf6 100644 | ||
--- a/src/rest/resource.cpp | ||
+++ b/src/rest/resource.cpp | ||
@@ -767,12 +767,47 @@ exit: | ||
|
@@ -107,10 +109,10 @@ index ce154c2e5b3..1708faf6abc 100644 | |
GetDataset(aDatasetType, aRequest, aResponse); | ||
break; | ||
diff --git a/src/rest/resource.hpp b/src/rest/resource.hpp | ||
index 0929dbcc50c..cbe1702f2fb 100644 | ||
index 7982843b..788dcd87 100644 | ||
--- a/src/rest/resource.hpp | ||
+++ b/src/rest/resource.hpp | ||
@@ -150,6 +150,7 @@ private: | ||
@@ -142,6 +142,7 @@ private: | ||
void GetDataRloc(Response &aResponse) const; | ||
void GetDataset(DatasetType aDatasetType, const Request &aRequest, Response &aResponse) const; | ||
void SetDataset(DatasetType aDatasetType, const Request &aRequest, Response &aResponse) const; | ||
|
@@ -119,5 +121,5 @@ index 0929dbcc50c..cbe1702f2fb 100644 | |
void DeleteOutDatedDiagnostic(void); | ||
void UpdateDiag(std::string aKey, std::vector<otNetworkDiagTlv> &aDiag); | ||
-- | ||
2.46.1 | ||
2.46.0 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,19 @@ | ||
From afb29a91024247f46e9e75954b930f4518444360 Mon Sep 17 00:00:00 2001 | ||
From b1eefc1a7ebcff849b74d314fc367ccd0e782225 Mon Sep 17 00:00:00 2001 | ||
From: Stefan Agner <[email protected]> | ||
Date: Sat, 20 Jan 2024 16:31:28 +0100 | ||
Subject: [PATCH] set netif route metric lower | ||
Subject: [PATCH 2/3] set netif route metric lower | ||
|
||
It seems that routes learned through IPv6 Neighbor Discovery Protocol | ||
get a metric of 128 when NetworkManager is used. Make sure the | ||
OpenThread network interface's own route is lower than that. | ||
|
||
Signed-off-by: puddly <[email protected]> | ||
--- | ||
third_party/openthread/CMakeLists.txt | 1 + | ||
1 file changed, 1 insertion(+) | ||
|
||
diff --git a/third_party/openthread/CMakeLists.txt b/third_party/openthread/CMakeLists.txt | ||
index eab6e7c6007..9e01d66aefd 100644 | ||
index eab6e7c6..9e01d66a 100644 | ||
--- a/third_party/openthread/CMakeLists.txt | ||
+++ b/third_party/openthread/CMakeLists.txt | ||
@@ -106,6 +106,7 @@ target_compile_definitions(ot-config INTERFACE | ||
|
@@ -23,5 +25,5 @@ index eab6e7c6007..9e01d66aefd 100644 | |
) | ||
|
||
-- | ||
2.46.1 | ||
2.46.0 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,162 @@ | ||
From f5edb2d3ab257e03627461b5fa6ff6332988f75f Mon Sep 17 00:00:00 2001 | ||
From: puddly <[email protected]> | ||
Date: Wed, 13 Nov 2024 16:55:53 -0500 | ||
Subject: [PATCH 3/3] Implement `/node/coprocessor/version` | ||
|
||
--- | ||
src/rest/openapi.yaml | 15 +++++++++++++++ | ||
src/rest/resource.cpp | 30 ++++++++++++++++++++++++++++++ | ||
src/rest/resource.hpp | 2 ++ | ||
tests/rest/test_rest.py | 21 +++++++++++++++++++++ | ||
4 files changed, 68 insertions(+) | ||
|
||
diff --git a/src/rest/openapi.yaml b/src/rest/openapi.yaml | ||
index 3cc2ef8f..8b6c3e87 100644 | ||
--- a/src/rest/openapi.yaml | ||
+++ b/src/rest/openapi.yaml | ||
@@ -312,6 +312,21 @@ paths: | ||
responses: | ||
"200": | ||
description: Successfully deleted the active operational dataset. | ||
+ /node/coprocessor/version: | ||
+ get: | ||
+ tags: | ||
+ - node | ||
+ summary: Get the coprocessor version | ||
+ description: Retrieves the NCP or RCP coprocessor version string. | ||
+ responses: | ||
+ "200": | ||
+ description: Successful operation | ||
+ content: | ||
+ application/json: | ||
+ schema: | ||
+ type: string | ||
+ description: Coprocessor version string | ||
+ example: "OPENTHREAD/20210309-00615-g9836b6f18; NRF52840; Mar 9 2021 13:30:04" | ||
components: | ||
schemas: | ||
LeaderData: | ||
diff --git a/src/rest/resource.cpp b/src/rest/resource.cpp | ||
index 1708faf6..076f21ac 100644 | ||
--- a/src/rest/resource.cpp | ||
+++ b/src/rest/resource.cpp | ||
@@ -46,6 +46,8 @@ | ||
#define OT_REST_RESOURCE_PATH_NODE_EXTPANID "/node/ext-panid" | ||
#define OT_REST_RESOURCE_PATH_NODE_DATASET_ACTIVE "/node/dataset/active" | ||
#define OT_REST_RESOURCE_PATH_NODE_DATASET_PENDING "/node/dataset/pending" | ||
+#define OT_REST_RESOURCE_PATH_NODE_COPROCESSOR "/node/coprocessor" | ||
+#define OT_REST_RESOURCE_PATH_NODE_COPROCESSOR_VERSION "/node/coprocessor/version" | ||
#define OT_REST_RESOURCE_PATH_NETWORK "/networks" | ||
#define OT_REST_RESOURCE_PATH_NETWORK_CURRENT "/networks/current" | ||
#define OT_REST_RESOURCE_PATH_NETWORK_CURRENT_COMMISSION "/networks/commission" | ||
@@ -139,6 +141,7 @@ Resource::Resource(RcpHost *aHost) | ||
mResourceMap.emplace(OT_REST_RESOURCE_PATH_NODE_RLOC, &Resource::Rloc); | ||
mResourceMap.emplace(OT_REST_RESOURCE_PATH_NODE_DATASET_ACTIVE, &Resource::DatasetActive); | ||
mResourceMap.emplace(OT_REST_RESOURCE_PATH_NODE_DATASET_PENDING, &Resource::DatasetPending); | ||
+ mResourceMap.emplace(OT_REST_RESOURCE_PATH_NODE_COPROCESSOR_VERSION, &Resource::CoprocessorVersion); | ||
|
||
// Resource callback handler | ||
mResourceCallbackMap.emplace(OT_REST_RESOURCE_PATH_DIAGNOSTICS, &Resource::HandleDiagnosticCallback); | ||
@@ -835,6 +838,33 @@ void Resource::DatasetPending(const Request &aRequest, Response &aResponse) cons | ||
Dataset(DatasetType::kPending, aRequest, aResponse); | ||
} | ||
|
||
+void Resource::GetCoprocessorVersion(Response &aResponse) const | ||
+{ | ||
+ std::string coprocessorVersion; | ||
+ std::string errorCode; | ||
+ | ||
+ coprocessorVersion = mHost->GetCoprocessorVersion(); | ||
+ coprocessorVersion = Json::String2JsonString(coprocessorVersion); | ||
+ | ||
+ aResponse.SetBody(coprocessorVersion); | ||
+ errorCode = GetHttpStatus(HttpStatusCode::kStatusOk); | ||
+ aResponse.SetResponsCode(errorCode); | ||
+} | ||
+ | ||
+void Resource::CoprocessorVersion(const Request &aRequest, Response &aResponse) const | ||
+{ | ||
+ std::string errorCode; | ||
+ | ||
+ if (aRequest.GetMethod() == HttpMethod::kGet) | ||
+ { | ||
+ GetCoprocessorVersion(aResponse); | ||
+ } | ||
+ else | ||
+ { | ||
+ ErrorHandler(aResponse, HttpStatusCode::kStatusMethodNotAllowed); | ||
+ } | ||
+} | ||
+ | ||
void Resource::DeleteOutDatedDiagnostic(void) | ||
{ | ||
auto eraseIt = mDiagSet.begin(); | ||
diff --git a/src/rest/resource.hpp b/src/rest/resource.hpp | ||
index 788dcd87..7ee151fb 100644 | ||
--- a/src/rest/resource.hpp | ||
+++ b/src/rest/resource.hpp | ||
@@ -127,6 +127,7 @@ private: | ||
void DatasetPending(const Request &aRequest, Response &aResponse) const; | ||
void Diagnostic(const Request &aRequest, Response &aResponse) const; | ||
void HandleDiagnosticCallback(const Request &aRequest, Response &aResponse); | ||
+ void CoprocessorVersion(const Request &aRequest, Response &aResponse) const; | ||
|
||
void GetNodeInfo(Response &aResponse) const; | ||
void DeleteNodeInfo(Response &aResponse) const; | ||
@@ -143,6 +144,7 @@ private: | ||
void GetDataset(DatasetType aDatasetType, const Request &aRequest, Response &aResponse) const; | ||
void SetDataset(DatasetType aDatasetType, const Request &aRequest, Response &aResponse) const; | ||
void DeleteDataset(DatasetType aDatasetType, Response &aResponse) const; | ||
+ void GetCoprocessorVersion(Response &aResponse) const; | ||
|
||
void DeleteOutDatedDiagnostic(void); | ||
void UpdateDiag(std::string aKey, std::vector<otNetworkDiagTlv> &aDiag); | ||
diff --git a/tests/rest/test_rest.py b/tests/rest/test_rest.py | ||
index b419c2d6..fdccf526 100644 | ||
--- a/tests/rest/test_rest.py | ||
+++ b/tests/rest/test_rest.py | ||
@@ -296,6 +296,14 @@ def node_ext_panid_check(data): | ||
return True | ||
|
||
|
||
+def node_coprocessor_version_check(data): | ||
+ assert data is not None | ||
+ | ||
+ assert (type(data) == str) | ||
+ | ||
+ return True | ||
+ | ||
+ | ||
def node_test(thread_num): | ||
url = rest_api_addr + "/node" | ||
|
||
@@ -406,6 +414,18 @@ def node_ext_panid_test(thread_num): | ||
print(" /node/ext-panid : all {}, valid {} ".format(thread_num, valid)) | ||
|
||
|
||
+def node_coprocessor_version_test(thread_num): | ||
+ url = rest_api_addr + "/node/coprocessor/version" | ||
+ | ||
+ response_data = [None] * thread_num | ||
+ | ||
+ create_multi_thread(get_data_from_url, url, thread_num, response_data) | ||
+ | ||
+ valid = [node_coprocessor_version_check(data) for data in response_data].count(True) | ||
+ | ||
+ print(" /node/coprocessor/version : all {}, valid {} ".format(thread_num, valid)) | ||
+ | ||
+ | ||
def diagnostics_test(thread_num): | ||
url = rest_api_addr + "/diagnostics" | ||
|
||
@@ -450,6 +470,7 @@ def main(): | ||
node_leader_data_test(200) | ||
node_num_of_router_test(200) | ||
node_ext_panid_test(200) | ||
+ node_coprocessor_version_test(200) | ||
diagnostics_test(20) | ||
error_test(10) | ||
|
||
-- | ||
2.46.0 | ||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,5 +1,10 @@ | ||||||||||||||||||||||||
# Changelog | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
## 2.12.0 | ||||||||||||||||||||||||
- Bump universal-silabs-flasher to 0.0.23 | ||||||||||||||||||||||||
- Bump OTBR firmwares to latest versions | ||||||||||||||||||||||||
- Bump OTBR POSIX version 580cafc150 (2024-10-21 10:47:10 +0000) | ||||||||||||||||||||||||
frenck marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||
|
||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add missing changelog entries for critical changes The changelog should document all significant changes. Please add entries for:
Additionally, the date format in the OTBR POSIX version line is inconsistent with previous entries (using +0000 instead of the standard -0700 format used in other entries). Apply this diff to add the missing entries and fix the date format: ## 2.12.0
- Bump universal-silabs-flasher to 0.0.23
- Bump OTBR firmwares to latest versions
- Bump OTBR POSIX version 580cafc150 (2024-10-21 10:47:10 +0000)
+- Bump OTBR POSIX version 580cafc150 (2024-10-21 03:47:10 -0700)
+- Add REST API endpoints for deleting operational datasets and retrieving coprocessor version
+- Install dhcpcd for prefix delegation support
+- Set DHCPV6_PD_REF=0 to ensure correct build 📝 Committable suggestion
Suggested change
|
||||||||||||||||||||||||
## 2.11.1 | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
- Fix issue with USB TI CC2652 based devices | ||||||||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo in method name 'SetResponsCode'
There's a typo in the method name
SetResponsCode
; it should beSetResponseCode
.Apply this diff to fix the typo:
📝 Committable suggestion