CHIP-submodule: Update connectedhomeip submodule to commit 0460715589413cb32e32f1626e43ad8000b84f2d

This commit is contained in:
Rohit Jadhav
2024-08-13 19:49:57 +08:00
committed by Hrishikesh Dhayagude
parent 6148f093ee
commit 7e80758817
23 changed files with 121 additions and 67 deletions
+2 -1
View File
@@ -25,7 +25,7 @@ variables:
IDF_CHECKOUT_REF: "v5.2.1"
# This variable represents the short hash of the connectedhomeip submodule.
# Note: Do change this short hash on submodule update MRs.
CHIP_SHORT_HASH: "d83caf7fef"
CHIP_SHORT_HASH: "0460715589"
DOCKER_IMAGE_NAME: "espressif/chip-idf"
.add_gitlab_ssh_key: &add_gitlab_ssh_key |
@@ -62,6 +62,7 @@ variables:
.setup_ot_br: &setup_ot_br
- cd ${CI_PROJECT_DIR}
- apt-get install -y openssh-client
- git clone ${ESP_THREAD_BR_REPO_URL}
- cd ${BR_PATH}/examples/basic_thread_border_router
- git checkout v1.0
+1 -1
View File
@@ -29,7 +29,7 @@ section in the ESP-Matter Programming Guide.
## Supported ESP-IDF and connectedhomeip versions
- This SDK currently works with commit [d83caf7fef](https://github.com/project-chip/connectedhomeip/tree/d83caf7fef) of connectedhomeip.
- This SDK currently works with commit [0460715589](https://github.com/project-chip/connectedhomeip/tree/0460715589) of connectedhomeip.
- For Matter projects development with this SDK, it is recommended to utilize ESP-IDF [v5.2.1](https://github.com/espressif/esp-idf/tree/v5.2.1).
@@ -21,6 +21,7 @@
#include <string.h>
#include <app/util/attribute-storage.h>
#include <app/util/attribute-table.h>
#include <app/reporting/reporting.h>
#include <protocols/interaction_model/Constants.h>
@@ -19,7 +19,6 @@
#include <app-common/zap-generated/callback.h>
#include <app/InteractionModelEngine.h>
#include <app/util/af.h>
#include <app/clusters/mode-base-server/mode-base-cluster-objects.h>
using namespace chip::app::Clusters;
@@ -23,6 +23,7 @@
#include <app/server/Dnssd.h>
#include <app/server/Server.h>
#include <app/util/attribute-storage.h>
#include <app/util/endpoint-config-api.h>
#include <credentials/DeviceAttestationCredsProvider.h>
#include <credentials/FabricTable.h>
#include <lib/core/DataModelTypes.h>
@@ -92,6 +92,7 @@ void MatterRvcOperationalStatePluginServerInitCallback();
void MatterRvcRunModePluginServerInitCallback();
void MatterSampleMeiPluginServerInitCallback();
void MatterScenesManagementPluginServerInitCallback();
void MatterServiceAreaPluginServerInitCallback();
void MatterSmokeCoAlarmPluginServerInitCallback();
void MatterSoftwareDiagnosticsPluginServerInitCallback();
void MatterSwitchPluginServerInitCallback();
@@ -100,7 +101,9 @@ void MatterTemperatureControlPluginServerInitCallback();
void MatterTemperatureMeasurementPluginServerInitCallback();
void MatterThermostatPluginServerInitCallback();
void MatterThermostatUserInterfaceConfigurationPluginServerInitCallback();
void MatterThreadBorderRouterManagementPluginServerInitCallback();
void MatterThreadNetworkDiagnosticsPluginServerInitCallback();
void MatterThreadNetworkDirectoryPluginServerInitCallback();
void MatterTimeFormatLocalizationPluginServerInitCallback();
void MatterTimeSynchronizationPluginServerInitCallback();
void MatterTotalVolatileOrganicCompoundsConcentrationMeasurementPluginServerInitCallback();
@@ -110,6 +113,7 @@ void MatterUserLabelPluginServerInitCallback();
void MatterValveConfigurationAndControlPluginServerInitCallback();
void MatterWakeOnLanPluginServerInitCallback();
void MatterWiFiNetworkDiagnosticsPluginServerInitCallback();
void MatterWiFiNetworkManagementPluginServerInitCallback();
void MatterWindowCoveringPluginServerInitCallback();
#include <esp_matter_cluster.h>
@@ -466,6 +466,11 @@ void __attribute__((weak)) emberAfScenesManagementClusterInitCallback(EndpointId
// To prevent warning
(void) endpoint;
}
void __attribute__((weak)) emberAfServiceAreaClusterInitCallback(EndpointId endpoint)
{
// To prevent warning
(void) endpoint;
}
void __attribute__((weak)) emberAfSmokeCoAlarmClusterInitCallback(EndpointId endpoint)
{
// To prevent warning
@@ -506,11 +511,21 @@ void __attribute__((weak)) emberAfThermostatUserInterfaceConfigurationClusterIni
// To prevent warning
(void) endpoint;
}
void __attribute__((weak)) emberAfThreadBorderRouterManagementClusterInitCallback(EndpointId endpoint)
{
// To prevent warning
(void) endpoint;
}
void __attribute__((weak)) emberAfThreadNetworkDiagnosticsClusterInitCallback(EndpointId endpoint)
{
// To prevent warning
(void) endpoint;
}
void __attribute__((weak)) emberAfThreadNetworkDirectoryClusterInitCallback(EndpointId endpoint)
{
// To prevent warning
(void) endpoint;
}
void __attribute__((weak)) emberAfTimeFormatLocalizationClusterInitCallback(EndpointId endpoint)
{
// To prevent warning
@@ -556,6 +571,11 @@ void __attribute__((weak)) emberAfWiFiNetworkDiagnosticsClusterInitCallback(Endp
// To prevent warning
(void) endpoint;
}
void __attribute__((weak)) emberAfWiFiNetworkManagementClusterInitCallback(EndpointId endpoint)
{
// To prevent warning
(void) endpoint;
}
void __attribute__((weak)) emberAfWindowCoveringClusterInitCallback(EndpointId endpoint)
{
// To prevent warning
@@ -289,6 +289,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId)
case app::Clusters::ScenesManagement::Id:
emberAfScenesManagementClusterInitCallback(endpoint);
break;
case app::Clusters::ServiceArea::Id:
emberAfServiceAreaClusterInitCallback(endpoint);
break;
case app::Clusters::SmokeCoAlarm::Id:
emberAfSmokeCoAlarmClusterInitCallback(endpoint);
break;
@@ -313,9 +316,15 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId)
case app::Clusters::ThermostatUserInterfaceConfiguration::Id:
emberAfThermostatUserInterfaceConfigurationClusterInitCallback(endpoint);
break;
case app::Clusters::ThreadBorderRouterManagement::Id:
emberAfThreadBorderRouterManagementClusterInitCallback(endpoint);
break;
case app::Clusters::ThreadNetworkDiagnostics::Id:
emberAfThreadNetworkDiagnosticsClusterInitCallback(endpoint);
break;
case app::Clusters::ThreadNetworkDirectory::Id:
emberAfThreadNetworkDirectoryClusterInitCallback(endpoint);
break;
case app::Clusters::TimeFormatLocalization::Id:
emberAfTimeFormatLocalizationClusterInitCallback(endpoint);
break;
@@ -343,6 +352,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId)
case app::Clusters::WiFiNetworkDiagnostics::Id:
emberAfWiFiNetworkDiagnosticsClusterInitCallback(endpoint);
break;
case app::Clusters::WiFiNetworkManagement::Id:
emberAfWiFiNetworkManagementClusterInitCallback(endpoint);
break;
case app::Clusters::WindowCovering::Id:
emberAfWindowCoveringClusterInitCallback(endpoint);
break;
@@ -95,7 +95,7 @@ def word_format(word):
def format_cluster_name(cluster_name):
words = re.split(r'[ /]', cluster_name)
words = re.split(r'[ /-]', cluster_name)
capitalized_words = [word_format(word) for word in words]
return ''.join(capitalized_words)
@@ -26,6 +26,8 @@
0x00000101, /* Cluster: Door Lock, Attribute: AliroGroupResolvingKey, Privilege: administer */ \
0x00000101, /* Cluster: Door Lock, Attribute: AliroSupportedBLEUWBProtocolVersions, Privilege: administer */ \
0x00000101, /* Cluster: Door Lock, Attribute: AliroBLEAdvertisingVersion, Privilege: administer */ \
0x00000453, /* Cluster: Thread Network Directory, Attribute: PreferredExtendedPanID, Privilege: manage */ \
0x00000453, /* Cluster: Thread Network Directory, Attribute: ThreadNetworks, Privilege: operate */ \
0x0000050D, /* Cluster: Application Basic, Attribute: AllowedVendorList, Privilege: administer */ \
}
@@ -48,6 +50,8 @@
0x00000084, /* Cluster: Door Lock, Attribute: AliroGroupResolvingKey, Privilege: administer */ \
0x00000085, /* Cluster: Door Lock, Attribute: AliroSupportedBLEUWBProtocolVersions, Privilege: administer */ \
0x00000086, /* Cluster: Door Lock, Attribute: AliroBLEAdvertisingVersion, Privilege: administer */ \
0x00000000, /* Cluster: Thread Network Directory, Attribute: PreferredExtendedPanID, Privilege: manage */ \
0x00000001, /* Cluster: Thread Network Directory, Attribute: ThreadNetworks, Privilege: operate */ \
0x00000007, /* Cluster: Application Basic, Attribute: AllowedVendorList, Privilege: administer */ \
}
@@ -70,6 +74,8 @@
chip::Access::Privilege::kAdminister, /* Cluster: Door Lock, Attribute: AliroGroupResolvingKey, Privilege: administer */ \
chip::Access::Privilege::kAdminister, /* Cluster: Door Lock, Attribute: AliroSupportedBLEUWBProtocolVersions, Privilege: administer */ \
chip::Access::Privilege::kAdminister, /* Cluster: Door Lock, Attribute: AliroBLEAdvertisingVersion, Privilege: administer */ \
chip::Access::Privilege::kManage, /* Cluster: Thread Network Directory, Attribute: PreferredExtendedPanID, Privilege: manage */ \
chip::Access::Privilege::kOperate, /* Cluster: Thread Network Directory, Attribute: ThreadNetworks, Privilege: operate */ \
chip::Access::Privilege::kAdminister, /* Cluster: Application Basic, Attribute: AllowedVendorList, Privilege: administer */ \
}
@@ -179,6 +185,7 @@
0x00000406, /* Cluster: Occupancy Sensing, Attribute: PhysicalContactOccupiedToUnoccupiedDelay, Privilege: manage */ \
0x00000406, /* Cluster: Occupancy Sensing, Attribute: PhysicalContactUnoccupiedToOccupiedDelay, Privilege: manage */ \
0x00000406, /* Cluster: Occupancy Sensing, Attribute: PhysicalContactUnoccupiedToOccupiedThreshold, Privilege: manage */ \
0x00000453, /* Cluster: Thread Network Directory, Attribute: PreferredExtendedPanID, Privilege: manage */ \
}
// Parallel array data (cluster, *attribute*, privilege) for write attribute
@@ -285,6 +292,7 @@
0x00000030, /* Cluster: Occupancy Sensing, Attribute: PhysicalContactOccupiedToUnoccupiedDelay, Privilege: manage */ \
0x00000031, /* Cluster: Occupancy Sensing, Attribute: PhysicalContactUnoccupiedToOccupiedDelay, Privilege: manage */ \
0x00000032, /* Cluster: Occupancy Sensing, Attribute: PhysicalContactUnoccupiedToOccupiedThreshold, Privilege: manage */ \
0x00000000, /* Cluster: Thread Network Directory, Attribute: PreferredExtendedPanID, Privilege: manage */ \
}
// Parallel array data (cluster, attribute, *privilege*) for write attribute
@@ -391,6 +399,7 @@
chip::Access::Privilege::kManage, /* Cluster: Occupancy Sensing, Attribute: PhysicalContactOccupiedToUnoccupiedDelay, Privilege: manage */ \
chip::Access::Privilege::kManage, /* Cluster: Occupancy Sensing, Attribute: PhysicalContactUnoccupiedToOccupiedDelay, Privilege: manage */ \
chip::Access::Privilege::kManage, /* Cluster: Occupancy Sensing, Attribute: PhysicalContactUnoccupiedToOccupiedThreshold, Privilege: manage */ \
chip::Access::Privilege::kManage, /* Cluster: Thread Network Directory, Attribute: PreferredExtendedPanID, Privilege: manage */ \
}
////////////////////////////////////////////////////////////////////////////////
@@ -467,6 +476,13 @@
0x00000201, /* Cluster: Thermostat, Command: CancelPresetsSchedulesEditRequest, Privilege: manage */ \
0x00000201, /* Cluster: Thermostat, Command: CommitPresetsSchedulesRequest, Privilege: manage */ \
0x00000201, /* Cluster: Thermostat, Command: CancelSetActivePresetRequest, Privilege: manage */ \
0x00000451, /* Cluster: Wi-Fi Network Management, Command: NetworkPassphraseRequest, Privilege: administer */ \
0x00000452, /* Cluster: Thread Border Router Management, Command: GetActiveDatasetRequest, Privilege: manage */ \
0x00000452, /* Cluster: Thread Border Router Management, Command: GetPendingDatasetRequest, Privilege: manage */ \
0x00000452, /* Cluster: Thread Border Router Management, Command: SetActiveDatasetRequest, Privilege: manage */ \
0x00000452, /* Cluster: Thread Border Router Management, Command: SetPendingDatasetRequest, Privilege: manage */ \
0x00000453, /* Cluster: Thread Network Directory, Command: AddNetwork, Privilege: manage */ \
0x00000453, /* Cluster: Thread Network Directory, Command: RemoveNetwork, Privilege: manage */ \
0x00000507, /* Cluster: Media Input, Command: RenameInput, Privilege: manage */ \
0x0000050B, /* Cluster: Audio Output, Command: RenameOutput, Privilege: manage */ \
0x0000050E, /* Cluster: Account Login, Command: GetSetupPIN, Privilege: administer */ \
@@ -547,6 +563,13 @@
0x00000008, /* Cluster: Thermostat, Command: CancelPresetsSchedulesEditRequest, Privilege: manage */ \
0x00000009, /* Cluster: Thermostat, Command: CommitPresetsSchedulesRequest, Privilege: manage */ \
0x0000000A, /* Cluster: Thermostat, Command: CancelSetActivePresetRequest, Privilege: manage */ \
0x00000000, /* Cluster: Wi-Fi Network Management, Command: NetworkPassphraseRequest, Privilege: administer */ \
0x00000000, /* Cluster: Thread Border Router Management, Command: GetActiveDatasetRequest, Privilege: manage */ \
0x00000001, /* Cluster: Thread Border Router Management, Command: GetPendingDatasetRequest, Privilege: manage */ \
0x00000004, /* Cluster: Thread Border Router Management, Command: SetActiveDatasetRequest, Privilege: manage */ \
0x00000005, /* Cluster: Thread Border Router Management, Command: SetPendingDatasetRequest, Privilege: manage */ \
0x00000000, /* Cluster: Thread Network Directory, Command: AddNetwork, Privilege: manage */ \
0x00000001, /* Cluster: Thread Network Directory, Command: RemoveNetwork, Privilege: manage */ \
0x00000003, /* Cluster: Media Input, Command: RenameInput, Privilege: manage */ \
0x00000001, /* Cluster: Audio Output, Command: RenameOutput, Privilege: manage */ \
0x00000000, /* Cluster: Account Login, Command: GetSetupPIN, Privilege: administer */ \
@@ -627,6 +650,13 @@
chip::Access::Privilege::kManage, /* Cluster: Thermostat, Command: CancelPresetsSchedulesEditRequest, Privilege: manage */ \
chip::Access::Privilege::kManage, /* Cluster: Thermostat, Command: CommitPresetsSchedulesRequest, Privilege: manage */ \
chip::Access::Privilege::kManage, /* Cluster: Thermostat, Command: CancelSetActivePresetRequest, Privilege: manage */ \
chip::Access::Privilege::kAdminister, /* Cluster: Wi-Fi Network Management, Command: NetworkPassphraseRequest, Privilege: administer */ \
chip::Access::Privilege::kManage, /* Cluster: Thread Border Router Management, Command: GetActiveDatasetRequest, Privilege: manage */ \
chip::Access::Privilege::kManage, /* Cluster: Thread Border Router Management, Command: GetPendingDatasetRequest, Privilege: manage */ \
chip::Access::Privilege::kManage, /* Cluster: Thread Border Router Management, Command: SetActiveDatasetRequest, Privilege: manage */ \
chip::Access::Privilege::kManage, /* Cluster: Thread Border Router Management, Command: SetPendingDatasetRequest, Privilege: manage */ \
chip::Access::Privilege::kManage, /* Cluster: Thread Network Directory, Command: AddNetwork, Privilege: manage */ \
chip::Access::Privilege::kManage, /* Cluster: Thread Network Directory, Command: RemoveNetwork, Privilege: manage */ \
chip::Access::Privilege::kManage, /* Cluster: Media Input, Command: RenameInput, Privilege: manage */ \
chip::Access::Privilege::kManage, /* Cluster: Audio Output, Command: RenameOutput, Privilege: manage */ \
chip::Access::Privilege::kAdminister, /* Cluster: Account Login, Command: GetSetupPIN, Privilege: administer */ \
@@ -641,18 +671,21 @@
#define GENERATED_ACCESS_READ_EVENT__CLUSTER { \
0x0000001F, /* Cluster: Access Control, Event: AccessControlEntryChanged, Privilege: administer */ \
0x0000001F, /* Cluster: Access Control, Event: AccessControlExtensionChanged, Privilege: administer */ \
0x00000453, /* Cluster: Thread Network Directory, Event: NetworkChanged, Privilege: operate */ \
}
// Parallel array data (cluster, *event*, privilege) for read event
#define GENERATED_ACCESS_READ_EVENT__EVENT { \
0x00000000, /* Cluster: Access Control, Event: AccessControlEntryChanged, Privilege: administer */ \
0x00000001, /* Cluster: Access Control, Event: AccessControlExtensionChanged, Privilege: administer */ \
0x00000000, /* Cluster: Thread Network Directory, Event: NetworkChanged, Privilege: operate */ \
}
// Parallel array data (cluster, event, *privilege*) for read event
#define GENERATED_ACCESS_READ_EVENT__PRIVILEGE { \
chip::Access::Privilege::kAdminister, /* Cluster: Access Control, Event: AccessControlEntryChanged, Privilege: administer */ \
chip::Access::Privilege::kAdminister, /* Cluster: Access Control, Event: AccessControlExtensionChanged, Privilege: administer */ \
chip::Access::Privilege::kOperate, /* Cluster: Thread Network Directory, Event: NetworkChanged, Privilege: operate */ \
}
////////////////////////////////////////////////////////////////////////////////
@@ -118,7 +118,7 @@ void commissioning_window_opener::on_device_connected_fcn(void *context, Exchang
if (generate_pase_verifier(window_opener->m_iteration, window_opener->m_pincode, salt, verifier) != ESP_OK) {
return;
}
chip::Spake2pVerifierSerialized serialized_verifier;
chip::Crypto::Spake2pVerifierSerialized serialized_verifier;
chip::MutableByteSpan serialized_verifier_span(serialized_verifier);
if (verifier.Serialize(serialized_verifier_span) != CHIP_NO_ERROR) {
ESP_LOGE(TAG, "Failed to serialize the verifier");
@@ -91,23 +91,23 @@ CommissioningParameters pairing_command::get_commissioning_params()
return CommissioningParameters();
}
void pairing_command::OnDiscoveredDevice(const chip::Dnssd::DiscoveredNodeData &nodeData)
void pairing_command::OnDiscoveredDevice(const chip::Dnssd::CommissionNodeData &nodeData)
{
auto &controller_instance = esp_matter::controller::matter_controller_client::get_instance();
// Ignore nodes with closed comissioning window
VerifyOrReturn(nodeData.commissionData.commissioningMode != 0);
const uint16_t port = nodeData.resolutionData.port;
VerifyOrReturn(nodeData.commissioningMode != 0);
const uint16_t port = nodeData.port;
char buf[chip::Inet::IPAddress::kMaxStringLength];
nodeData.resolutionData.ipAddress[0].ToString(buf);
nodeData.ipAddress[0].ToString(buf);
ESP_LOGI(TAG, "Discovered Device: %s:%u", buf, port);
// Stop Mdns discovery. TODO: Check whether it is a right method
controller_instance.get_commissioner()->RegisterDeviceDiscoveryDelegate(nullptr);
Inet::InterfaceId interfaceId = nodeData.resolutionData.ipAddress[0].IsIPv6LinkLocal()
? nodeData.resolutionData.interfaceId
Inet::InterfaceId interfaceId = nodeData.ipAddress[0].IsIPv6LinkLocal()
? nodeData.interfaceId
: Inet::InterfaceId::Null();
PeerAddress peerAddress = PeerAddress::UDP(nodeData.resolutionData.ipAddress[0], port, interfaceId);
PeerAddress peerAddress = PeerAddress::UDP(nodeData.ipAddress[0], port, interfaceId);
RendezvousParameters params = RendezvousParameters().SetSetupPINCode(m_setup_pincode).SetPeerAddress(peerAddress);
CommissioningParameters commissioning_params = get_commissioning_params();
controller_instance.get_commissioner()->PairDevice(m_remote_node_id, params, commissioning_params);
@@ -16,6 +16,7 @@
#include <controller/CHIPDeviceController.h>
#include <esp_matter.h>
#include "dnssd/Types.h"
using chip::NodeId;
using chip::ScopedNodeId;
@@ -53,7 +54,7 @@ public:
void OnCommissioningComplete(NodeId deviceId, CHIP_ERROR error) override;
/****************** DeviceDiscoveryDelegate Interface ***************/
void OnDiscoveredDevice(const chip::Dnssd::DiscoveredNodeData &nodeData) override;
void OnDiscoveredDevice(const chip::Dnssd::CommissionNodeData &nodeData) override;
static pairing_command &get_instance()
{
@@ -138,7 +138,7 @@ class ESPCommissionerCallback : public CommissionerCallback {
chip::RendezvousParameters params = chip::RendezvousParameters()
.SetSetupPINCode(pincode).SetDiscriminator(longDiscriminator).SetPeerAddress(peerAddress);
do {
chip::DRBG_get_bytes(reinterpret_cast<uint8_t *>(&gRemoteId), sizeof(gRemoteId));
chip::Crypto::DRBG_get_bytes(reinterpret_cast<uint8_t *>(&gRemoteId), sizeof(gRemoteId));
} while (!chip::IsOperationalNodeId(gRemoteId));
matter_controller_client::get_instance().get_commissioner()->PairDevice(gRemoteId, params);
}
@@ -36,6 +36,7 @@
#include <lib/support/CodeUtils.h>
#include <platform/CHIPDeviceLayer.h>
#include <protocols/secure_channel/RendezvousParameters.h>
#include <protocols/user_directed_commissioning/UserDirectedCommissioning.h>
using chip::NodeId;
using chip::Inet::IPAddress;
@@ -261,7 +262,7 @@ static esp_err_t controller_udc_handler(int argc, char **argv)
UDCClientState *state =
instance.get_commissioner()->GetUserDirectedCommissioningServer()->GetUDCClients().GetUDCClientState(index);
ESP_RETURN_ON_FALSE(state != nullptr, ESP_FAIL, TAG, "UDC client not found");
state->SetUDCClientProcessingState(chip::Controller::UDCClientProcessingState::kCommissioningNode);
state->SetUDCClientProcessingState(chip::Protocols::UserDirectedCommissioning::UDCClientProcessingState::kCommissioningNode);
chip::NodeId gRemoteId = chip::kTestDeviceNodeId;
chip::RendezvousParameters params = chip::RendezvousParameters()
@@ -269,7 +270,7 @@ static esp_err_t controller_udc_handler(int argc, char **argv)
.SetDiscriminator(state->GetLongDiscriminator())
.SetPeerAddress(state->GetPeerAddress());
do {
chip::DRBG_get_bytes(reinterpret_cast<uint8_t *>(&gRemoteId), sizeof(gRemoteId));
chip::Crypto::DRBG_get_bytes(reinterpret_cast<uint8_t *>(&gRemoteId), sizeof(gRemoteId));
} while (!chip::IsOperationalNodeId(gRemoteId));
ESP_RETURN_ON_FALSE(instance.get_commissioner()->PairDevice(gRemoteId, params) == CHIP_NO_ERROR, ESP_FAIL, TAG,
@@ -2517,7 +2517,7 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent,
}
}
{
CHIP_ERROR err = LogValue("SlotIsPauseable", indent + 1, value.slotIsPauseable);
CHIP_ERROR err = LogValue("SlotIsPauseable", indent + 1, value.slotIsPausable);
if (err != CHIP_NO_ERROR)
{
DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'SlotIsPauseable'");
@@ -2631,7 +2631,7 @@ DataModelLogger::LogValue(const char * label, size_t indent,
{
DataModelLogger::LogString(label, indent, "{");
{
CHIP_ERROR err = LogValue("ForecastId", indent + 1, value.forecastId);
CHIP_ERROR err = LogValue("ForecastId", indent + 1, value.forecastID);
if (err != CHIP_NO_ERROR)
{
DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'ForecastId'");
@@ -2679,7 +2679,7 @@ DataModelLogger::LogValue(const char * label, size_t indent,
}
}
{
CHIP_ERROR err = LogValue("IsPauseable", indent + 1, value.isPauseable);
CHIP_ERROR err = LogValue("IsPauseable", indent + 1, value.isPausable);
if (err != CHIP_NO_ERROR)
{
DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'IsPauseable'");
@@ -18,6 +18,9 @@
#include <esp_matter_thread_br_launcher.h>
#include <app/util/attribute-storage.h>
#include <app/AttributeValueDecoder.h>
#include <app/AttributeAccessInterface.h>
#include <app/AttributeAccessInterfaceRegistry.h>
#define TAG "thread_br_custom_cluster"
@@ -80,7 +83,6 @@ namespace command {
static esp_err_t configure_dataset_tlvs_command_callback(const ConcreteCommandPath &command_path, TLVReader &tlv_data,
void *opaque_ptr)
{
uint16_t endpoint_id = command_path.mEndpointId;
uint32_t cluster_id = command_path.mClusterId;
uint32_t command_id = command_path.mCommandId;
@@ -92,7 +92,6 @@ namespace Internal {
namespace {
TimerHandle_t sbleAdvTimeoutTimer; // FreeRTOS sw timer.
#if CONFIG_ENABLE_ESP32_BLE_CONTROLLER
static constexpr uint16_t kNewConnectionScanTimeout = 60;
static constexpr uint16_t kConnectTimeout = 20;
@@ -228,16 +227,6 @@ CHIP_ERROR BLEManagerImpl::_Init()
{
CHIP_ERROR err;
// Create FreeRTOS sw timer for BLE timeouts and interval change.
sbleAdvTimeoutTimer = xTimerCreate("BleAdvTimer", // Just a text name, not used by the RTOS kernel
1, // == default timer period
false, // no timer reload (==one-shot)
(void *) this, // init timer id = ble obj context
BleAdvTimeoutHandler // timer callback handler
);
VerifyOrReturnError(sbleAdvTimeoutTimer != nullptr, CHIP_ERROR_NO_MEMORY);
// Initialize the Chip BleLayer.
#if CONFIG_ENABLE_ESP32_BLE_CONTROLLER
err = BleLayer::Init(this, this, this, &DeviceLayer::SystemLayer());
@@ -273,9 +262,7 @@ exit:
void BLEManagerImpl::_Shutdown()
{
VerifyOrReturn(sbleAdvTimeoutTimer != nullptr);
xTimerDelete(sbleAdvTimeoutTimer, portMAX_DELAY);
sbleAdvTimeoutTimer = nullptr;
CancelBleAdvTimeoutTimer();
BleLayer::Shutdown();
@@ -310,7 +297,7 @@ exit:
return err;
}
void BLEManagerImpl::BleAdvTimeoutHandler(TimerHandle_t xTimer)
void BLEManagerImpl::BleAdvTimeoutHandler(System::Layer *, void *)
{
if (BLEMgrImpl().mFlags.Has(Flags::kFastAdvertisingEnabled))
{
@@ -322,7 +309,6 @@ void BLEManagerImpl::BleAdvTimeoutHandler(TimerHandle_t xTimer)
BLEMgrImpl().mFlags.Clear(Flags::kExtAdvertisingEnabled);
BLEMgrImpl().StartBleAdvTimeoutTimer(CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING_INTERVAL_CHANGE_TIME_MS);
#endif
PlatformMgr().ScheduleWork(DriveBLEState, 0);
}
#if CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING
else
@@ -332,9 +318,9 @@ void BLEManagerImpl::BleAdvTimeoutHandler(TimerHandle_t xTimer)
BLEMgrImpl().mFlags.Set(Flags::kExtAdvertisingEnabled);
BLEMgr().SetAdvertisingMode(BLEAdvertisingMode::kSlowAdvertising);
BLEMgrImpl().mFlags.Set(Flags::kAdvertisingRefreshNeeded, 1);
PlatformMgr().ScheduleWork(DriveBLEState, 0);
}
#endif
PlatformMgr().ScheduleWork(DriveBLEState, 0);
}
CHIP_ERROR BLEManagerImpl::_SetAdvertisingMode(BLEAdvertisingMode mode)
@@ -628,7 +614,7 @@ bool BLEManagerImpl::SendIndication(BLE_CONNECTION_OBJECT conId, const ChipBleUU
ESP_LOGD(TAG, "Sending indication for CHIPoBLE TX characteristic (con %u, len %u)", conId, data->DataLength());
om = ble_hs_mbuf_from_flat(data->Start(), data->DataLength());
om = ble_hs_mbuf_from_flat(data->Start(), static_cast<uint16_t>(data->DataLength()));
if (om == NULL)
{
ChipLogError(DeviceLayer, "ble_hs_mbuf_from_flat failed:");
@@ -698,20 +684,6 @@ bool BLEManagerImpl::SendWriteRequest(BLE_CONNECTION_OBJECT conId, const ChipBle
#endif
}
bool BLEManagerImpl::SendReadRequest(BLE_CONNECTION_OBJECT conId, const ChipBleUUID * svcId, const ChipBleUUID * charId,
chip::System::PacketBufferHandle pBuf)
{
ChipLogError(DeviceLayer, "BLEManagerImpl::SendReadRequest() not supported");
return false;
}
bool BLEManagerImpl::SendReadResponse(BLE_CONNECTION_OBJECT conId, BLE_READ_REQUEST_CONTEXT requestContext,
const ChipBleUUID * svcId, const ChipBleUUID * charId)
{
ChipLogError(DeviceLayer, "BLEManagerImpl::SendReadResponse() not supported");
return false;
}
void BLEManagerImpl::NotifyChipConnectionClosed(BLE_CONNECTION_OBJECT conId) {}
CHIP_ERROR BLEManagerImpl::MapBLEError(int bleErr)
@@ -745,26 +717,17 @@ CHIP_ERROR BLEManagerImpl::MapBLEError(int bleErr)
}
void BLEManagerImpl::CancelBleAdvTimeoutTimer(void)
{
VerifyOrReturn(sbleAdvTimeoutTimer != nullptr);
if (xTimerStop(sbleAdvTimeoutTimer, pdMS_TO_TICKS(0)) == pdFAIL)
if (SystemLayer().IsTimerActive(BleAdvTimeoutHandler, nullptr))
{
ChipLogError(DeviceLayer, "Failed to stop BledAdv timeout timer");
SystemLayer().CancelTimer(BleAdvTimeoutHandler, nullptr);
}
}
void BLEManagerImpl::StartBleAdvTimeoutTimer(uint32_t aTimeoutInMs)
{
VerifyOrReturn(sbleAdvTimeoutTimer != nullptr);
if (xTimerIsTimerActive(sbleAdvTimeoutTimer))
{
CancelBleAdvTimeoutTimer();
}
// timer is not active, change its period to required value (== restart).
// FreeRTOS- Block for a maximum of 100 ticks if the change period command
// cannot immediately be sent to the timer command queue.
if (xTimerChangePeriod(sbleAdvTimeoutTimer, pdMS_TO_TICKS(aTimeoutInMs), pdMS_TO_TICKS(100)) != pdPASS)
CHIP_ERROR err = SystemLayer().StartTimer(System::Clock::Milliseconds32(aTimeoutInMs), BleAdvTimeoutHandler, nullptr);
if ((err != CHIP_NO_ERROR))
{
ChipLogError(DeviceLayer, "Failed to start BledAdv timeout timer");
}
@@ -24,6 +24,11 @@ if(IDF_TARGET STREQUAL "esp32c2")
endif()
endif()
get_filename_component(SDKCONFIG_SHELL_IDF_VER "${SDKCONFIG_COMMON_DIR}.shell.v4.4" ABSOLUTE)
if(EXISTS ${SDKCONFIG_SHELL_IDF_VER} AND ${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}.${IDF_VERSION_PATCH} STRLESS "5.0.0")
list(APPEND SDKCONFIG_FILES "${SDKCONFIG_SHELL_IDF_VER}")
endif()
# setting the final sdkconfig path
message(SDKCONFIG_PATH ": ${SDKCONFIG_FILES}")
list(APPEND SDKCONFIG_DEFAULTS ${SDKCONFIG_FILES})
@@ -0,0 +1 @@
CONFIG_ENABLE_CHIP_SHELL=n
+4
View File
@@ -53,3 +53,7 @@ RUN set -x \
&& bash -c "source scripts/bootstrap.sh" \
&& ./scripts/examples/gn_build_example.sh examples/chip-tool out/host \
&& : # last line
COPY entrypoint.sh /opt/espressif//entrypoint.sh
ENTRYPOINT [ "/opt/espressif/entrypoint.sh" ]
CMD [ "/bin/bash" ]
+6
View File
@@ -0,0 +1,6 @@
#!/usr/bin/env bash
set -e
source $IDF_PATH/export.sh
exec "$@"