Skip to content

Commit

Permalink
Merge branch 'master' into feature/unittest-transport-raw-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
feasel0 authored Apr 29, 2024
2 parents 811f3b0 + 040e5bf commit 11cc04c
Show file tree
Hide file tree
Showing 223 changed files with 6,587 additions and 3,486 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/examples-linux-tv-casting-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ name: Test TV Casting Example
on:
push:
branches-ignore:
- 'dependabot/**'
- "dependabot/**"
pull_request:
merge_group:

Expand Down Expand Up @@ -63,6 +63,12 @@ jobs:
./scripts/run_in_build_env.sh \
"scripts/examples/gn_build_example.sh examples/tv-casting-app/linux/ out/tv-casting-app"
- name: Test casting from Linux tv-casting-app to Linux tv-app
run: |
./scripts/run_in_build_env.sh \
"python3 ./scripts/tests/run_tv_casting_test.py"
timeout-minutes: 1

- name: Uploading Size Reports
uses: ./.github/actions/upload-size-reports
if: ${{ !env.ACT }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

# Build System
out/
/examples/virtual-device-app/android/App/buildSrc/build/
/src/test_driver/nrfconnect/build/
/src/darwin/Framework/build/

Expand Down
3 changes: 1 addition & 2 deletions config/nrfconnect/app/enable-gnu-std.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
add_library(gnu17 INTERFACE)
target_compile_options(gnu17
INTERFACE
$<$<COMPILE_LANGUAGE:CXX>:-std=gnu++17>
-D_SYS__PTHREADTYPES_H_)
$<$<COMPILE_LANGUAGE:CXX>:-std=gnu++17>)
target_link_libraries(app PRIVATE gnu17)
3 changes: 2 additions & 1 deletion config/nrfconnect/chip-module/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ else()
endif()

if (CONFIG_CHIP_CRYPTO_PSA)
matter_add_gn_arg_string("chip_crypto" "psa")
matter_add_gn_arg_string("chip_crypto" "psa")
matter_add_gn_arg_bool ("chip_crypto_psa_spake2p" CONFIG_PSA_WANT_ALG_SPAKE2P_MATTER)
endif()

if (BOARD STREQUAL "native_posix")
Expand Down
5 changes: 5 additions & 0 deletions config/nrfconnect/chip-module/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -302,4 +302,9 @@ config CHIP_FACTORY_RESET_ON_KEY_MIGRATION_FAILURE
Perform factory reset of the device if the operational key for Fabric has not been migrated
properly to PSA ITS storage.

config CHIP_PERSISTENT_SUBSCRIPTIONS
default n
# selecting experimental for this feature since there is an issue with multiple controllers.
select EXPERIMENTAL

endif # CHIP
13 changes: 9 additions & 4 deletions config/nrfconnect/chip-module/Kconfig.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ if CHIP
# System configuration
# ==============================================================================

choice LIBC_IMPLEMENTATION
default NEWLIB_LIBC
endchoice

config ASSERT
default y

Expand Down Expand Up @@ -298,6 +302,7 @@ config MBEDTLS_HEAP_SIZE

config CHIP_CRYPTO_PSA
default y if !CHIP_WIFI
imply PSA_WANT_ALG_SPAKE2P_MATTER

if CHIP_CRYPTO_PSA

Expand All @@ -317,13 +322,13 @@ if PSA_CRYPTO_DRIVER_CC3XX && PSA_CRYPTO_DRIVER_OBERON
config PSA_USE_CC3XX_HASH_DRIVER
default n

endif
endif # PSA_CRYPTO_DRIVER_CC3XX && PSA_CRYPTO_DRIVER_OBERON

# Spake2+ support
config MBEDTLS_MD_C
default y

endif
endif # CHIP_CRYPTO_PSA

if !CHIP_CRYPTO_PSA

Expand Down Expand Up @@ -366,7 +371,7 @@ config MBEDTLS_ECP_C
config MBEDTLS_ECP_DP_SECP256R1_ENABLED
default y

endif
endif # !CHIP_CRYPTO_PSA

config MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG
default n if CHIP_WIFI
Expand Down Expand Up @@ -486,4 +491,4 @@ config OPENTHREAD_SHELL

endif # SHELL

endif
endif # CHIP
4 changes: 1 addition & 3 deletions config/nrfconnect/chip-module/Kconfig.features
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,13 @@ config CHIP_WIFI

config CHIP_QSPI_NOR
bool "Enable QSPI NOR feature set"
imply NORDIC_QSPI_NOR
help
Enables QSPI NOR flash with a set of options for configuring pages and
buffer sizes.

if CHIP_QSPI_NOR

config NORDIC_QSPI_NOR
default y

config NORDIC_QSPI_NOR_STACK_WRITE_BUFFER_SIZE
default 16

Expand Down
17 changes: 1 addition & 16 deletions config/nrfconnect/chip-module/Kconfig.mcuboot.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,7 @@
config MAIN_STACK_SIZE
default 10240

config BOOT_SWAP_SAVE_ENCTLV
default n

config BOOT_ENCRYPT_RSA
default n

config BOOT_ENCRYPT_EC256
default n

config BOOT_ENCRYPT_X25519
config BOOT_ENCRYPT_IMAGE
default n

config BOOT_BOOTSTRAP
Expand All @@ -53,9 +44,6 @@ if BOARD_NRF7002DK_NRF5340_CPUAPP
config SPI
default y

config SPI_NOR
default y

choice SPI_NOR_SFDP
default SPI_NOR_SFDP_DEVICETREE
endchoice
Expand All @@ -74,9 +62,6 @@ endif
# All boards beside nRF7002DK use QSPI NOR external flash
if BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_NRF52840DK_NRF52840

config NORDIC_QSPI_NOR
default y

config NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE
default 4096

Expand Down
7 changes: 5 additions & 2 deletions config/zephyr/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,8 @@ config CHIP_PROJECT_CONFIG

config CHIP_ENABLE_DNSSD_SRP
bool "OpenThread Service Registration Protocol"
default y if NET_L2_OPENTHREAD
default y
depends on NET_L2_OPENTHREAD
imply OPENTHREAD_ECDSA
imply OPENTHREAD_SRP_CLIENT
help
Expand All @@ -318,7 +319,8 @@ config CHIP_ENABLE_DNSSD_SRP

config CHIP_ENABLE_DNS_CLIENT
bool "OpenThread DNS client"
default y if NET_L2_OPENTHREAD
default y
depends on NET_L2_OPENTHREAD
imply OPENTHREAD_DNS_CLIENT
help
Enables using the OpenThread DNS client for the Matter service discovery.
Expand Down Expand Up @@ -413,6 +415,7 @@ config CHIP_THREAD_SSED

config CHIP_OPENTHREAD_CONFIG
string "Custom OpenThread configuration file"
depends on NET_L2_OPENTHREAD
help
Provides a path to an OpenThread configuration file. The path can be
either absolute or relative to the application directory. When this option
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <iostream>
#include <lib/support/logging/CHIPLogging.h>

#ifdef MATTER_DM_PLUGIN_DOOR_LOCK_SERVER
#include "chef-lock-manager.h"

#include <algorithm>
#include <iostream>

using chip::to_underlying;

LockManager LockManager::instance;
Expand Down
2 changes: 2 additions & 0 deletions examples/chef/common/clusters/door-lock/chef-lock-manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@

#include "chef-lock-endpoint.h"
#include <app/clusters/door-lock-server/door-lock-server.h>

#include <cstdint>
#include <vector>

class LockManager
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include <app/clusters/target-navigator-server/target-navigator-server.h>

#include <list>
#include <string>

class TargetNavigatorManager : public chip::app::Clusters::TargetNavigator::Delegate
Expand Down
1 change: 1 addition & 0 deletions examples/chef/esp32/main/QRCodeScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#include <setup_payload/QRCodeSetupPayloadGenerator.h>

#include <string>
#include <vector>

// TODO need sensible library tag when put in library
extern const char TAG[];
Expand Down
7 changes: 4 additions & 3 deletions examples/chip-tool/commands/common/DeviceScanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ CHIP_ERROR DeviceScanner::Stop()

void DeviceScanner::OnNodeDiscovered(const DiscoveredNodeData & nodeData)
{
auto & commissionData = nodeData.nodeData;
VerifyOrReturn(nodeData.Is<CommissionNodeData>());
auto & commissionData = nodeData.Get<CommissionNodeData>();

auto discriminator = commissionData.longDiscriminator;
auto vendorId = static_cast<VendorId>(commissionData.vendorId);
Expand All @@ -64,7 +65,7 @@ void DeviceScanner::OnNodeDiscovered(const DiscoveredNodeData & nodeData)
ChipLogProgress(chipTool, "OnNodeDiscovered (MDNS): discriminator: %u, vendorId: %u, productId: %u", discriminator, vendorId,
productId);

auto & resolutionData = nodeData.resolutionData;
const CommonResolutionData & resolutionData = commissionData;

auto & instanceData = mDiscoveredResults[commissionData.instanceName];
auto & interfaceData = instanceData[resolutionData.interfaceId.GetPlatformInterface()];
Expand All @@ -76,7 +77,7 @@ void DeviceScanner::OnNodeDiscovered(const DiscoveredNodeData & nodeData)
interfaceData.push_back(result);
}

nodeData.LogDetail();
commissionData.LogDetail();
}

void DeviceScanner::OnBrowseAdd(chip::Dnssd::DnssdService service)
Expand Down
22 changes: 11 additions & 11 deletions examples/chip-tool/commands/common/RemoteDataModelLogger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,12 @@ CHIP_ERROR LogIssueNOCChain(const char * noc, const char * icac, const char * rc
return gDelegate->LogJSON(valueStr.c_str());
}

CHIP_ERROR LogDiscoveredNodeData(const chip::Dnssd::DiscoveredNodeData & nodeData)
CHIP_ERROR LogDiscoveredNodeData(const chip::Dnssd::CommissionNodeData & nodeData)
{
VerifyOrReturnError(gDelegate != nullptr, CHIP_NO_ERROR);

auto & resolutionData = nodeData.resolutionData;
auto & commissionData = nodeData.nodeData;
auto & commissionData = nodeData;
auto & resolutionData = commissionData;

if (!chip::CanCastTo<uint8_t>(resolutionData.numIPs))
{
Expand Down Expand Up @@ -245,24 +245,24 @@ CHIP_ERROR LogDiscoveredNodeData(const chip::Dnssd::DiscoveredNodeData & nodeDat
value["port"] = resolutionData.port;
value["numIPs"] = static_cast<uint8_t>(resolutionData.numIPs);

if (resolutionData.mrpRetryIntervalIdle.HasValue())
if (resolutionData.mrpRetryIntervalIdle.has_value())
{
value["mrpRetryIntervalIdle"] = resolutionData.mrpRetryIntervalIdle.Value().count();
value["mrpRetryIntervalIdle"] = resolutionData.mrpRetryIntervalIdle->count();
}

if (resolutionData.mrpRetryIntervalActive.HasValue())
if (resolutionData.mrpRetryIntervalActive.has_value())
{
value["mrpRetryIntervalActive"] = resolutionData.mrpRetryIntervalActive.Value().count();
value["mrpRetryIntervalActive"] = resolutionData.mrpRetryIntervalActive->count();
}

if (resolutionData.mrpRetryActiveThreshold.HasValue())
if (resolutionData.mrpRetryActiveThreshold.has_value())
{
value["mrpRetryActiveThreshold"] = resolutionData.mrpRetryActiveThreshold.Value().count();
value["mrpRetryActiveThreshold"] = resolutionData.mrpRetryActiveThreshold->count();
}

if (resolutionData.isICDOperatingAsLIT.HasValue())
if (resolutionData.isICDOperatingAsLIT.has_value())
{
value["isICDOperatingAsLIT"] = resolutionData.isICDOperatingAsLIT.Value();
value["isICDOperatingAsLIT"] = *(resolutionData.isICDOperatingAsLIT);
}

Json::Value rootValue;
Expand Down
2 changes: 1 addition & 1 deletion examples/chip-tool/commands/common/RemoteDataModelLogger.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ CHIP_ERROR LogErrorAsJSON(const CHIP_ERROR & error);
CHIP_ERROR LogGetCommissionerNodeId(chip::NodeId value);
CHIP_ERROR LogGetCommissionerRootCertificate(const char * value);
CHIP_ERROR LogIssueNOCChain(const char * noc, const char * icac, const char * rcac, const char * ipk);
CHIP_ERROR LogDiscoveredNodeData(const chip::Dnssd::DiscoveredNodeData & nodeData);
CHIP_ERROR LogDiscoveredNodeData(const chip::Dnssd::CommissionNodeData & nodeData);
void SetDelegate(RemoteDataModelLoggerDelegate * delegate);
}; // namespace RemoteDataModelLogger
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

using namespace ::chip;

void DiscoverCommissionablesCommandBase::OnDiscoveredDevice(const chip::Dnssd::DiscoveredNodeData & nodeData)
void DiscoverCommissionablesCommandBase::OnDiscoveredDevice(const chip::Dnssd::CommissionNodeData & nodeData)
{
nodeData.LogDetail();
LogErrorOnFailure(RemoteDataModelLogger::LogDiscoveredNodeData(nodeData));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class DiscoverCommissionablesCommandBase : public CHIPCommand, public chip::Cont
}

/////////// DeviceDiscoveryDelegate Interface /////////
void OnDiscoveredDevice(const chip::Dnssd::DiscoveredNodeData & nodeData) override;
void OnDiscoveredDevice(const chip::Dnssd::CommissionNodeData & nodeData) override;

/////////// CHIPCommand Interface /////////
chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(30); }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void DiscoverCommissionersCommand::Shutdown()
[[maybe_unused]] int commissionerCount = 0;
for (int i = 0; i < CHIP_DEVICE_CONFIG_MAX_DISCOVERED_NODES; i++)
{
const Dnssd::DiscoveredNodeData * commissioner = mCommissionableNodeController.GetDiscoveredCommissioner(i);
const Dnssd::CommissionNodeData * commissioner = mCommissionableNodeController.GetDiscoveredCommissioner(i);
if (commissioner != nullptr)
{
ChipLogProgress(chipTool, "Discovered Commissioner #%d", commissionerCount);
Expand Down
6 changes: 3 additions & 3 deletions examples/chip-tool/commands/pairing/PairingCommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -479,12 +479,12 @@ void PairingCommand::OnICDStayActiveComplete(NodeId deviceId, uint32_t promisedA
ChipLogValueX64(deviceId), promisedActiveDuration);
}

void PairingCommand::OnDiscoveredDevice(const chip::Dnssd::DiscoveredNodeData & nodeData)
void PairingCommand::OnDiscoveredDevice(const chip::Dnssd::CommissionNodeData & nodeData)
{
// Ignore nodes with closed commissioning window
VerifyOrReturn(nodeData.nodeData.commissioningMode != 0);
VerifyOrReturn(nodeData.commissioningMode != 0);

auto & resolutionData = nodeData.resolutionData;
auto & resolutionData = nodeData;

const uint16_t port = resolutionData.port;
char buf[chip::Inet::IPAddress::kMaxStringLength];
Expand Down
2 changes: 1 addition & 1 deletion examples/chip-tool/commands/pairing/PairingCommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ class PairingCommand : public CHIPCommand,
void OnICDStayActiveComplete(NodeId deviceId, uint32_t promisedActiveDuration) override;

/////////// DeviceDiscoveryDelegate Interface /////////
void OnDiscoveredDevice(const chip::Dnssd::DiscoveredNodeData & nodeData) override;
void OnDiscoveredDevice(const chip::Dnssd::CommissionNodeData & nodeData) override;

/////////// DeviceAttestationDelegate /////////
chip::Optional<uint16_t> FailSafeExpiryTimeoutSecs() const override;
Expand Down
2 changes: 1 addition & 1 deletion examples/common/websocket-server/WebSocketServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ CHIP_ERROR WebSocketServer::Run(chip::Optional<uint16_t> port, WebSocketServerDe
info.protocols = protocols;
static const lws_retry_bo_t retry = {
.secs_since_valid_ping = 400,
.secs_since_valid_hangup = 400,
.secs_since_valid_hangup = 420,
};
info.retry_and_idle_policy = &retry;

Expand Down
4 changes: 2 additions & 2 deletions examples/contact-sensor-app/nxp/k32w/k32w0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -559,10 +559,10 @@ This is the list of all supported partitions:
00 -----------------> 0x00 Bootable flag
00 -----------------> 0x00 Image type (0x00 = SSBL)
004000000f020101: Application partition
00400000c9040101: Application partition
00400000 -----------> 0x00004000 Start Address
0f02 ---------------> 0x020f Number of 512-bytes pages
c904 ---------------> 0x04c9 Number of 512-bytes pages
01 -----------------> 0x01 Bootable flag
01 -----------------> 0x01 Image type (0x01 = Application)
Expand Down
Loading

0 comments on commit 11cc04c

Please sign in to comment.