diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index f8e46241763eb4..3c7a97ae658170 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -37,6 +37,7 @@ RUN apt-get update \ docker.io \ iputils-ping net-tools \ libncurses5 \ + libncursesw5 \ libpython2.7 \ && : diff --git a/docs/guides/nxp_k32w_android_commissioning.md b/docs/guides/nxp_k32w_android_commissioning.md index bc4076ebef3e4c..3f1c6d1171df3c 100644 --- a/docs/guides/nxp_k32w_android_commissioning.md +++ b/docs/guides/nxp_k32w_android_commissioning.md @@ -79,7 +79,7 @@ OpenThread RCP firmware is required to allow the PC to communicate with Thread devices. Run the commands mentioned in the following steps to build and program the RCP firmware onto an K32W061 DK6: -1. Clone the OpenThread repository into the current directory (we recommand +1. Clone the OpenThread repository into the current directory (we recommend using commit ced158e65a00dd5394c04548b7b187d3a3f11eef): ``` diff --git a/examples/ota-requestor-app/asr/README.md b/examples/ota-requestor-app/asr/README.md index d8d5b7f9de2d03..1a907d4637a5ab 100755 --- a/examples/ota-requestor-app/asr/README.md +++ b/examples/ota-requestor-app/asr/README.md @@ -53,9 +53,9 @@ guides to get started ./chip-tool pairing onnetwork 1 20202021 ``` - After OTA Provider commissioning is successful, use `chip-tool` to write ACL - for OAT Provider. + for OTA Provider. ``` - ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null },{"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": null, "targets": null }]' 0 + ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null },{"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": null, "targets": null }]' 1 0 ``` - Commission ota requestor device with node-id `OTA REQUESTOR APP NODE ID` - After OTA Requestor commissioning is successful, use `chip-tool` to inform diff --git a/src/messaging/ReliableMessageMgr.cpp b/src/messaging/ReliableMessageMgr.cpp index 5c0989c74a1540..8a9e88d426b41f 100644 --- a/src/messaging/ReliableMessageMgr.cpp +++ b/src/messaging/ReliableMessageMgr.cpp @@ -261,9 +261,7 @@ System::Clock::Timestamp ReliableMessageMgr::GetBackoff(System::Clock::Timestamp } #endif -#ifdef CHIP_CONFIG_MRP_RETRY_INTERVAL_SENDER_BOOST mrpBackoffTime += CHIP_CONFIG_MRP_RETRY_INTERVAL_SENDER_BOOST; -#endif return mrpBackoffTime; } diff --git a/src/messaging/ReliableMessageProtocolConfig.h b/src/messaging/ReliableMessageProtocolConfig.h index 859dcb4703d59d..a77483f3262e27 100644 --- a/src/messaging/ReliableMessageProtocolConfig.h +++ b/src/messaging/ReliableMessageProtocolConfig.h @@ -162,8 +162,10 @@ namespace chip { #ifndef CHIP_CONFIG_MRP_RETRY_INTERVAL_SENDER_BOOST #if CHIP_ENABLE_OPENTHREAD && !CHIP_DEVICE_LAYER_TARGET_LINUX #define CHIP_CONFIG_MRP_RETRY_INTERVAL_SENDER_BOOST (500_ms) +#else +#define CHIP_CONFIG_MRP_RETRY_INTERVAL_SENDER_BOOST (0_ms) #endif -#endif // CHIP_CONFIG_MRP_RETRY_INTERVAL_SENDER_BOOST && !CHIP_DEVICE_LAYER_TARGET_LINUX +#endif // CHIP_CONFIG_MRP_RETRY_INTERVAL_SENDER_BOOST /** * @brief diff --git a/src/messaging/tests/TestAbortExchangesForFabric.cpp b/src/messaging/tests/TestAbortExchangesForFabric.cpp index ef9ff8ca8039b7..33b2dfce33d958 100644 --- a/src/messaging/tests/TestAbortExchangesForFabric.cpp +++ b/src/messaging/tests/TestAbortExchangesForFabric.cpp @@ -206,11 +206,10 @@ void CommonCheckAbortAllButOneExchange(nlTestSuite * inSuite, TestContext & ctx, // trigger a MRP failure due to timing out waiting for an ACK. // auto waitTimeout = System::Clock::Milliseconds32(1000); -#ifdef CHIP_CONFIG_MRP_RETRY_INTERVAL_SENDER_BOOST // Account for the retry delay booster, so that we do not timeout our IO processing before the // retransmission failure is triggered. waitTimeout += CHIP_CONFIG_RMP_DEFAULT_MAX_RETRANS * CHIP_CONFIG_MRP_RETRY_INTERVAL_SENDER_BOOST; -#endif + ctx.GetIOContext().DriveIOUntil(waitTimeout, [&]() { return false; }); } else diff --git a/src/messaging/tests/TestReliableMessageProtocol.cpp b/src/messaging/tests/TestReliableMessageProtocol.cpp index 0db244965ebcab..101367e7f10428 100644 --- a/src/messaging/tests/TestReliableMessageProtocol.cpp +++ b/src/messaging/tests/TestReliableMessageProtocol.cpp @@ -58,17 +58,13 @@ using TestContext = Test::LoopbackMessagingContext; const char PAYLOAD[] = "Hello!"; -#ifdef CHIP_CONFIG_MRP_RETRY_INTERVAL_SENDER_BOOST -// When the CHIP_CONFIG_MRP_RETRY_INTERVAL_SENDER_BOOST is set, the stack -// operates under the assumption of a high latency network (like Thread), -// so it adds extra delays to avoid spurious retransmits. +// The CHIP_CONFIG_MRP_RETRY_INTERVAL_SENDER_BOOST can be set to non-zero value +// to boost the retransmission timeout for a high latency network like Thread to +// avoid spurious retransmits. // // This adds extra I/O time to account for this. See the documentation for // CHIP_CONFIG_MRP_RETRY_INTERVAL_SENDER_BOOST for more details. constexpr auto retryBoosterTimeout = CHIP_CONFIG_RMP_DEFAULT_MAX_RETRANS * CHIP_CONFIG_MRP_RETRY_INTERVAL_SENDER_BOOST; -#else -constexpr auto retryBoosterTimeout = System::Clock::Milliseconds32(0); -#endif class MockAppDelegate : public UnsolicitedMessageHandler, public ExchangeDelegate { diff --git a/src/protocols/secure_channel/tests/TestPASESession.cpp b/src/protocols/secure_channel/tests/TestPASESession.cpp index 66a6a74d2d9dc0..c9a3d6a2d45354 100644 --- a/src/protocols/secure_channel/tests/TestPASESession.cpp +++ b/src/protocols/secure_channel/tests/TestPASESession.cpp @@ -279,7 +279,8 @@ void SecurePairingHandshakeTestCommon(nlTestSuite * inSuite, void * inContext, S while (delegate.mMessageDropped) { - chip::test_utils::SleepMillis(100); + // Wait some time so the dropped message will be retransmitted when we drain the IO. + chip::test_utils::SleepMillis((100_ms + CHIP_CONFIG_MRP_RETRY_INTERVAL_SENDER_BOOST).count()); delegate.mMessageDropped = false; ReliableMessageMgr::Timeout(&ctx.GetSystemLayer(), ctx.GetExchangeManager().GetReliableMessageMgr()); ctx.DrainAndServiceIO(); diff --git a/src/setup_payload/tests/TestHelpers.h b/src/setup_payload/tests/TestHelpers.h index 8d84791e8b103a..dedd9040ae205e 100644 --- a/src/setup_payload/tests/TestHelpers.h +++ b/src/setup_payload/tests/TestHelpers.h @@ -141,7 +141,12 @@ inline bool CheckWriteRead(SetupPayload & inPayload, bool allowInvalidPayload = memset(optionalInfo, 0xFF, sizeof(optionalInfo)); auto generator = QRCodeSetupPayloadGenerator(inPayload); generator.SetAllowInvalidPayload(allowInvalidPayload); - generator.payloadBase38Representation(result, optionalInfo, sizeof(optionalInfo)); + CHIP_ERROR err = generator.payloadBase38Representation(result, optionalInfo, sizeof(optionalInfo)); + + if (err != CHIP_NO_ERROR) + { + return false; + } outPayload = {}; QRCodeSetupPayloadParser(result).populatePayload(outPayload); diff --git a/third_party/asr/asr582x/asr_sdk b/third_party/asr/asr582x/asr_sdk index 66ab48a1ab851f..5942c485ce3a75 160000 --- a/third_party/asr/asr582x/asr_sdk +++ b/third_party/asr/asr582x/asr_sdk @@ -1 +1 @@ -Subproject commit 66ab48a1ab851f77117307ac410aca8f175bc4b1 +Subproject commit 5942c485ce3a75585883abba389a4336c190a86b diff --git a/third_party/asr/asr595x/asr_sdk b/third_party/asr/asr595x/asr_sdk index d85ca3cb552e8e..9161981339b656 160000 --- a/third_party/asr/asr595x/asr_sdk +++ b/third_party/asr/asr595x/asr_sdk @@ -1 +1 @@ -Subproject commit d85ca3cb552e8e7a72b2f8b04bf62e12c9a58835 +Subproject commit 9161981339b656ba6ea39eed13b7e0b78950bbe9 diff --git a/third_party/asr/asr_executable.gni b/third_party/asr/asr_executable.gni index 0be41a4b120e8d..5303a7ca12137e 100644 --- a/third_party/asr/asr_executable.gni +++ b/third_party/asr/asr_executable.gni @@ -40,29 +40,33 @@ template("asr_executable") { outputs = [ "${root_out_dir}/${output_base_name}_ota.bin" ] - if (asr_ic_family == "asr595x") { - gen_ota_tool = "${asr_sdk_build_root}/asr_sdk/tools/image_gen_header/image_gen_header" - } else { - gen_ota_tool = - "${asr_sdk_build_root}/asr_sdk/tools/otaImage/image_gen_header" - } + gen_ota_tool = + "${asr_sdk_build_root}/asr_sdk/tools/otaImage/image_gen_header" _ota_tool_path = rebase_path(gen_ota_tool, root_build_dir) + _image_path = + rebase_path("$root_out_dir/${objcopy_image_name}", root_build_dir) + if (asr_ic_family == "asr595x") { args = [ _ota_tool_path, - "${root_out_dir}/${objcopy_image_name}", + _image_path, "-d", - "LEGA_A0V2", + "ALTO", "-b", "REMAPPING", + "-r", ] } else { args = [ _ota_tool_path, - "${root_out_dir}/${objcopy_image_name}", - "flash_remapping", + _image_path, + "-d", + "COMBO", + "-b", + "REMAPPING", + "-r", ] }