Skip to content

Commit

Permalink
Merge branch 'master' into issue/27563
Browse files Browse the repository at this point in the history
  • Loading branch information
robszewczyk authored Jun 30, 2023
2 parents c217a96 + 5c7d81d commit 4f5d8ae
Show file tree
Hide file tree
Showing 12 changed files with 35 additions and 29 deletions.
1 change: 1 addition & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ RUN apt-get update \
docker.io \
iputils-ping net-tools \
libncurses5 \
libncursesw5 \
libpython2.7 \
&& :

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/nxp_k32w_android_commissioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -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):

```
Expand Down
4 changes: 2 additions & 2 deletions examples/ota-requestor-app/asr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 }]' <OTA REQUESTOR APP NODE ID> 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
Expand Down
2 changes: 0 additions & 2 deletions src/messaging/ReliableMessageMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
4 changes: 3 additions & 1 deletion src/messaging/ReliableMessageProtocolConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions src/messaging/tests/TestAbortExchangesForFabric.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 3 additions & 7 deletions src/messaging/tests/TestReliableMessageProtocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
3 changes: 2 additions & 1 deletion src/protocols/secure_channel/tests/TestPASESession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
7 changes: 6 additions & 1 deletion src/setup_payload/tests/TestHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion third_party/asr/asr582x/asr_sdk
24 changes: 14 additions & 10 deletions third_party/asr/asr_executable.gni
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]
}

Expand Down

0 comments on commit 4f5d8ae

Please sign in to comment.