submodule: Update connectedhomeip submodule to bc8c9ece1 to support ESP32-C6 and ESP32-H2-MP

docs: Add details for esp32h2, esp32c2, and esp32c6
This commit is contained in:
WanqQixiang
2023-03-13 17:24:34 +08:00
committed by zhangwenxu
parent e91db67957
commit 7b2912a9e5
68 changed files with 3184 additions and 2408 deletions
+21 -14
View File
@@ -90,10 +90,9 @@ variables:
- idf.py build
- idf.py set-target esp32c3
- idf.py build
# Controller and zap_light example builds are failing for te_1_1 disabling them for the short_term on this branch
# - cd $ESP_MATTER_PATH/examples/zap_light
# - idf.py set-target esp32
# - idf.py build
- cd $ESP_MATTER_PATH/examples/zap_light
- idf.py set-target esp32
- idf.py build
- cd $ESP_MATTER_PATH/examples/light_switch
- idf.py set-target esp32
- idf.py build
@@ -102,9 +101,9 @@ variables:
- idf.py build
- idf.py set-target esp32c3
- idf.py build
# - cd $ESP_MATTER_PATH/examples/controller
# - idf.py set-target esp32
# - idf.py build
- cd $ESP_MATTER_PATH/examples/controller
- idf.py set-target esp32
- idf.py build
.build_external_platform_example: &build_external_platform_example
- rm -rf $ESP_MATTER_PATH/../platform
@@ -118,16 +117,24 @@ variables:
- idf.py build
- cp sdkconfig.defaults.backup sdkconfig.defaults
.build_examples_idf_v5_0: &build_examples_idf_v5_0
# - cd $ESP_MATTER_PATH/examples/zap_light
# - idf.py --preview set-target esp32h2
# - idf.py build
.build_examples_idf_v5_1: &build_examples_idf_v5_1
- cd $ESP_MATTER_PATH/examples/zap_light
- idf.py --preview set-target esp32h2
- idf.py build
- cd $ESP_MATTER_PATH/examples/light_switch
- idf.py --preview set-target esp32h2
- idf.py build
- idf.py --preview set-target esp32c6
- idf.py build
- idf.py set-target esp32c2
- idf.py build
- cd $ESP_MATTER_PATH/examples/light
- idf.py --preview set-target esp32h2
- idf.py build
- idf.py --preview set-target esp32c6
- idf.py build
- idf.py set-target esp32c2
- idf.py build
- cd $ESP_MATTER_PATH/examples/zigbee_bridge
- idf.py set-target esp32
- idf.py build
@@ -162,13 +169,13 @@ build_esp_matter_examples:
- *build_examples
- *build_external_platform_example
build_esp_matter_examples_idf_v5_0:
build_esp_matter_examples_idf_v5_1:
extends:
- .build_examples_template
variables:
IDF_VERSION: "20949d444f466e1b1247b10e2b8d6a2fb8212815"
IDF_VERSION: "bb9200acec7dd60e9adb4a381e5400dcd5024534"
script:
- *build_examples_idf_v5_0
- *build_examples_idf_v5_1
build_upstream_examples:
extends:
+3 -3
View File
@@ -21,9 +21,9 @@ git clone --recursive https://github.com/espressif/esp-matter.git
## Supported ESP-IDF and connectedhomeip versions
- This SDK currently works with matter 1.1 TE1 [commit 7e69c66b](https://github.com/espressif/connectedhomeip/tree/7e69c66b) of connectedhomeip.
- For Wi-Fi devices (ESP32, ESP32-C3, ESP32-S3), ESP-IDF [v4.4.3 release](https://github.com/espressif/esp-idf/releases/tag/v4.4.3) is required.
- For Thread devices (ESP32-H2) and Zigbee Bridge example, ESP-IDF release/v5.0 branch at [commit 20949d44](https://github.com/espressif/esp-idf/tree/20949d44) should be used.
- This SDK currently works with [commit bc8c9ece1](https://github.com/espressif/connectedhomeip/tree/bc8c9ece1) of connectedhomeip.
- For ESP32, ESP32-C3, and ESP32-S3, ESP-IDF [v4.4.3 release](https://github.com/espressif/esp-idf/releases/tag/v4.4.3) is required.
- For ESP32-C2, ESP32-H2(preview) and ESP32-C6(preview) and Zigbee Bridge example, ESP-IDF branch at [commit bb9200ace](https://github.com/espressif/esp-idf/tree/bb9200ace) in branch release/v5.1 should be used.
## Documentation
+2 -8
View File
@@ -27,9 +27,7 @@ set(SRC_DIRS_LIST "."
"${MATTER_SDK_PATH}/src/app/clusters/general-commissioning-server"
"${MATTER_SDK_PATH}/src/app/clusters/general-diagnostics-server"
"${MATTER_SDK_PATH}/src/app/clusters/group-key-mgmt-server"
"${MATTER_SDK_PATH}/src/app/clusters/groups-client"
"${MATTER_SDK_PATH}/src/app/clusters/groups-server"
"${MATTER_SDK_PATH}/src/app/clusters/identify-client"
"${MATTER_SDK_PATH}/src/app/clusters/identify-server"
"${MATTER_SDK_PATH}/src/app/clusters/keypad-input-server"
"${MATTER_SDK_PATH}/src/app/clusters/level-control"
@@ -49,7 +47,6 @@ set(SRC_DIRS_LIST "."
"${MATTER_SDK_PATH}/src/app/clusters/pump-configuration-and-control-client"
"${MATTER_SDK_PATH}/src/app/clusters/pump-configuration-and-control-server"
"${MATTER_SDK_PATH}/src/app/clusters/scenes"
"${MATTER_SDK_PATH}/src/app/clusters/scenes-client"
"${MATTER_SDK_PATH}/src/app/clusters/software-diagnostics-server"
"${MATTER_SDK_PATH}/src/app/clusters/switch-server"
"${MATTER_SDK_PATH}/src/app/clusters/target-navigator-server"
@@ -71,11 +68,7 @@ set(INCLUDE_DIRS_LIST "."
"${MATTER_SDK_PATH}/src"
"${ZAP_GENERATED_PATH}/../")
set(REQUIRES_LIST chip bt esp_matter_console nvs_flash app_update esp_secure_cert_mgr esp32_mbedtls esp_system)
if ("${IDF_TARGET}" STREQUAL "esp32h2")
list(APPEND REQUIRES_LIST openthread esp_matter_openthread)
endif()
set(REQUIRES_LIST chip bt esp_matter_console nvs_flash app_update esp_secure_cert_mgr esp32_mbedtls esp_system openthread)
idf_component_register( SRC_DIRS ${SRC_DIRS_LIST}
INCLUDE_DIRS ${INCLUDE_DIRS_LIST}
@@ -85,5 +78,6 @@ idf_component_register( SRC_DIRS ${SRC_DIRS_LIST}
# esp-matter/connectedhomeip/connectedhomeip/src/app/EventManagement.cpp:467:23: error: 'writer' is
# used uninitialized in this function
idf_build_set_property(COMPILE_OPTIONS "-Wno-error=uninitialized;-Wno-error=maybe-uninitialized;-Wno-missing-field-initializers;" APPEND)
idf_build_set_property(COMPILE_OPTIONS "-Wno-error=array-bounds" APPEND)
target_compile_options(${COMPONENT_LIB} PUBLIC
"-DCHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=<lib/address_resolve/AddressResolve_DefaultImpl.h>")
+2 -7
View File
@@ -55,13 +55,8 @@ typedef enum cluster_flags {
CLUSTER_FLAG_INIT_FUNCTION = CLUSTER_MASK_INIT_FUNCTION, /* 0x01 */
/** The cluster has an attribute changed function (function_flag) */
CLUSTER_FLAG_ATTRIBUTE_CHANGED_FUNCTION = CLUSTER_MASK_ATTRIBUTE_CHANGED_FUNCTION, /* 0x02 */
/** The cluster has a default response function (function_flag) */
CLUSTER_FLAG_DEFAULT_RESPONSE_FUNCTION = CLUSTER_MASK_DEFAULT_RESPONSE_FUNCTION, /* 0x04 */
/** The cluster has a message sent function (function_flag) */
CLUSTER_FLAG_MESSAGE_SENT_FUNCTION = CLUSTER_MASK_MESSAGE_SENT_FUNCTION, /* 0x08 */
/** The cluster has a manufacturer specific attribute changed function (function_flag) */
CLUSTER_FLAG_MANUFACTURER_SPECIFIC_ATTRIBUTE_CHANGED_FUNCTION =
CLUSTER_MASK_MANUFACTURER_SPECIFIC_ATTRIBUTE_CHANGED_FUNCTION, /* 0x10 */
/** The cluster has a shutdown function (function_flag) */
CLUSTER_FLAG_SHUTDOWN_FUNCTION = CLUSTER_MASK_SHUTDOWN_FUNCTION, /* 0x10 */
/** The cluster has a pre attribute changed function (function_flag) */
CLUSTER_FLAG_PRE_ATTRIBUTE_CHANGED_FUNCTION = CLUSTER_MASK_PRE_ATTRIBUTE_CHANGED_FUNCTION, /* 0x20 */
/** The cluster is a server cluster */
@@ -1645,7 +1645,7 @@ esp_err_t get_val_raw(uint16_t endpoint_id, uint32_t cluster_id, uint32_t attrib
return ESP_FAIL;
}
EmberAfStatus status = emberAfReadServerAttribute(endpoint_id, cluster_id, attribute_id, value, attribute_size);
EmberAfStatus status = emberAfReadAttribute(endpoint_id, cluster_id, attribute_id, value, attribute_size);
if (status != EMBER_ZCL_STATUS_SUCCESS) {
ESP_LOGE(TAG, "Error getting raw value from matter: 0x%x", status);
if (lock_status == lock::SUCCESS) {
@@ -1687,7 +1687,7 @@ esp_err_t update(uint16_t endpoint_id, uint32_t cluster_id, uint32_t attribute_i
/* Update matter */
EmberAfStatus status = EMBER_ZCL_STATUS_SUCCESS;
if (emberAfContainsServer(endpoint_id, cluster_id)) {
status = emberAfWriteServerAttribute(endpoint_id, cluster_id, attribute_id, value, attribute_type);
status = emberAfWriteAttribute(endpoint_id, cluster_id, attribute_id, value, attribute_type);
if (status != EMBER_ZCL_STATUS_SUCCESS) {
ESP_LOGE(TAG, "Error updating attribute to matter: 0x%X", status);
free(value);
+3 -3
View File
@@ -1000,7 +1000,7 @@ esp_err_t send_add_group(peer_device_t *remote_device, uint16_t remote_endpoint_
add_group_callback add_group_cb)
{
Groups::Commands::AddGroup::Type command_data;
command_data.groupId = group_id;
command_data.groupID = group_id;
command_data.groupName = chip::CharSpan(group_name, strnlen(group_name, 16));
chip::Controller::GroupsCluster cluster(*remote_device->GetExchangeManager(),
@@ -1013,7 +1013,7 @@ esp_err_t send_view_group(peer_device_t *remote_device, uint16_t remote_endpoint
view_group_callback view_group_cb)
{
Groups::Commands::ViewGroup::Type command_data;
command_data.groupId = group_id;
command_data.groupID = group_id;
chip::Controller::GroupsCluster cluster(*remote_device->GetExchangeManager(),
remote_device->GetSecureSession().Value(), remote_endpoint_id);
@@ -1025,7 +1025,7 @@ esp_err_t send_remove_group(peer_device_t *remote_device, uint16_t remote_endpoi
remove_group_callback remove_group_cb)
{
Groups::Commands::RemoveGroup::Type command_data;
command_data.groupId = group_id;
command_data.groupID = group_id;
chip::Controller::GroupsCluster cluster(*remote_device->GetExchangeManager(),
remote_device->GetSecureSession().Value(), remote_endpoint_id);
+2 -1
View File
@@ -69,6 +69,7 @@ cluster_t *create_default_binding_cluster(endpoint_t *endpoint)
return binding::create(endpoint, &config, CLUSTER_FLAG_SERVER);
}
#if (FIXED_ENDPOINT_COUNT == 0)
namespace descriptor {
const function_generic_t *function_list = NULL;
const int function_flags = CLUSTER_FLAG_NONE;
@@ -1811,6 +1812,6 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
return cluster;
}
} /* pump_configuration_and_control */
#endif // FIXED_ENDPOINT_COUNT == 0
} /* cluster */
} /* esp_matter */
+7 -7
View File
@@ -20,7 +20,6 @@
#include <app-common/zap-generated/callback.h>
#include <app/InteractionModelEngine.h>
#include <app/util/af.h>
#include <app/util/ember-compatibility-functions.h>
using namespace chip::app::Clusters;
using chip::app::CommandHandler;
@@ -56,8 +55,13 @@ void DispatchSingleClusterCommandCommon(const ConcreteCommandPath &command_path,
}
int flags = get_flags(command);
if (flags & COMMAND_FLAG_CUSTOM) {
EmberAfStatus status = (err == ESP_OK) ? EMBER_ZCL_STATUS_SUCCESS : EMBER_ZCL_STATUS_FAILURE;
emberAfSendImmediateDefaultResponse(status);
chip::app::CommandHandler *command_obj = (chip::app::CommandHandler *)opaque_ptr;
if (!command_obj) {
ESP_LOGE(TAG, "Command Object cannot be NULL");
return;
}
command_obj->AddStatus(command_path, err == ESP_OK ? chip::Protocols::InteractionModel::Status::Success :
chip::Protocols::InteractionModel::Status::Failure);
}
}
@@ -70,11 +74,7 @@ namespace app {
void DispatchSingleClusterCommand(const ConcreteCommandPath &command_path, TLVReader &tlv_data,
CommandHandler *command_obj)
{
Compatibility::SetupEmberAfCommandHandler(command_obj, command_path);
esp_matter::command::DispatchSingleClusterCommandCommon(command_path, tlv_data, command_obj);
Compatibility::ResetEmberAfObjects();
}
} /* namespace app */
+21 -19
View File
@@ -39,10 +39,8 @@
#include <platform/DiagnosticDataProvider.h>
#include <platform/ESP32/ESP32DeviceInfoProvider.h>
#include <platform/ESP32/ESP32FactoryDataProvider.h>
#include <platform/ESP32/ESP32Utils.h>
#include <platform/ESP32/NetworkCommissioningDriver.h>
#if CHIP_DEVICE_CONFIG_ENABLE_THREAD
#include <esp_matter_openthread.h>
#endif
#include <esp_matter_ota.h>
#include <esp_matter_dac_provider.h>
@@ -840,24 +838,17 @@ static void device_callback_internal(const ChipDeviceEvent * event, intptr_t arg
chip::app::DnssdServer::Instance().StartServer();
}
#endif
if (event->InterfaceIpAddressChanged.Type == chip::DeviceLayer::InterfaceIpChangeType::kIpV6_Assigned) {
// When the OTA image is applied, the device will reboot and send the NotifyUpdateApplied to the Provider
// in esp_matter_ota_requestor_start(), so the device should be connected to the Wi-Fi network when calling
// esp_matter_ota_requestor_start(). IPv4 might be disabled on the Provider so we should call this function
// when the IPv6 address is assigned.
esp_matter_ota_requestor_start();
/* Initialize binding manager */
client::binding_manager_init();
}
break;
#if CHIP_DEVICE_CONFIG_ENABLE_THREAD
case chip::DeviceLayer::DeviceEventType::kDnssdPlatformInitialized:
esp_matter_ota_requestor_start();
/* Initialize binding manager */
client::binding_manager_init();
case chip::DeviceLayer::DeviceEventType::kDnssdInitialized:
// Wait some time to avoid issue https://github.com/project-chip/connectedhomeip/issues/25570
chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds16(2),
[](chip::System::Layer * systemLayer, void * appState) {
esp_matter_ota_requestor_start();
/* Initialize binding manager */
client::binding_manager_init();
} , NULL);
break;
#endif
#if CONFIG_BT_ENABLED
#if CONFIG_USE_BLE_ONLY_FOR_COMMISSIONING
@@ -953,9 +944,20 @@ esp_err_t start(event_callback_t callback, intptr_t callback_arg)
ESP_LOGE(TAG, "esp_matter has started");
return ESP_ERR_INVALID_STATE;
}
esp_err_t err = esp_event_loop_create_default();
if (err != ESP_OK) {
ESP_LOGE(TAG, "Error create default event loop");
return err;
}
#if CHIP_DEVICE_CONFIG_ENABLE_WIFI
if (chip::DeviceLayer::Internal::ESP32Utils::InitWiFiStack() != CHIP_NO_ERROR) {
ESP_LOGE(TAG, "Error initializing Wi-Fi stack");
return ESP_FAIL;
}
#endif
esp_matter_ota_requestor_init();
esp_err_t err = chip_init(callback, callback_arg);
err = chip_init(callback, callback_arg);
if (err != ESP_OK) {
ESP_LOGE(TAG, "Error initializing matter");
return err;
+1
View File
@@ -22,6 +22,7 @@
#include <platform/ESP32/OTAImageProcessorImpl.h>
#include <esp_matter.h>
#include <zap-generated/endpoint_config.h>
using chip::BDXDownloader;
using chip::DefaultOTARequestor;
@@ -31,64 +31,3 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId)
(void)endpoint;
(void)clusterId;
}
void __attribute__((weak)) emberAfAddToCurrentAppTasksCallback(EmberAfApplicationTask tasks) {}
void __attribute__((weak)) emberAfRemoveFromCurrentAppTasksCallback(EmberAfApplicationTask tasks) {}
EmberAfAttributeWritePermission __attribute__((weak))
emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId,uint8_t * value,
uint8_t type)
{
return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default
}
bool __attribute__((weak)) emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId)
{
return true;
}
bool __attribute__((weak)) emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId)
{
return true;
}
bool __attribute__((weak)) emberAfDefaultResponseCallback(ClusterId clusterId, CommandId commandId, EmberAfStatus status)
{
return false;
}
bool __attribute__((weak)) emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberStatus * status)
{
return false;
}
bool __attribute__((weak)) emberAfMessageSentCallback(const MessageSendDestination & destination, EmberApsFrame * apsFrame,
uint16_t msgLen, uint8_t * message, EmberStatus status)
{
return false;
}
uint32_t __attribute__((weak)) emberAfGetCurrentTimeCallback()
{
return 0;
}
bool __attribute__((weak))
emberAfGetEndpointInfoCallback(EndpointId endpoint, uint8_t * returnNetworkIndex, EmberAfEndpointInfoStruct * returnEndpointInfo)
{
return false;
}
void __attribute__((weak)) emberAfRegistrationAbortCallback() {}
EmberStatus __attribute__((weak))
emberAfInterpanSendMessageCallback(EmberAfInterpanHeader * header, uint16_t messageLength, uint8_t * message)
{
return EMBER_LIBRARY_NOT_PRESENT;
}
bool __attribute__((weak)) emberAfStartMoveCallback()
{
return false;
}
@@ -19,7 +19,7 @@
#include <esp_matter_core.h>
#define MAX_BRIDGED_DEVICE_COUNT \
CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT - 1 - CONFIG_ESP_MATTER_AGGREGATOR_ENDPOINT_COUNT
CONFIG_ESP_MATTER_MAX_DYNAMIC_ENDPOINT_COUNT - 1 - CONFIG_ESP_MATTER_AGGREGATOR_ENDPOINT_COUNT
// There is an endpoint reserved as root endpoint
namespace esp_matter_bridge {
@@ -84,6 +84,7 @@ class ESPCommissionerCallback : public CommissionerCallback {
ESPCommissionerCallback commissioner_callback;
DeviceCommissioner device_commissioner;
CommissionerDiscoveryController commissioner_discovery_controller;
Crypto::RawKeySessionKeystore session_keystore;
constexpr uint16_t kUdcListenPort = 5560;
@@ -98,8 +99,10 @@ esp_err_t init(uint16_t commissioner_port)
factoryParams.listenPort = commissioner_port;
factoryParams.fabricIndependentStorage = &controller_server_storage;
factoryParams.fabricTable = &Server::GetInstance().GetFabricTable();
factoryParams.sessionKeystore = &session_keystore;
group_data_provider.SetStorageDelegate(&controller_server_storage);
group_data_provider.SetSessionKeystore(factoryParams.sessionKeystore);
if (group_data_provider.Init() != CHIP_NO_ERROR) {
return ESP_FAIL;
}
@@ -199,7 +199,7 @@ static esp_err_t send_command(command_data_t *command_data, peer_device_t *remot
} // namespace color_control
namespace group_key_management {
using chip::app::Clusters::GroupKeyManagement::GroupKeySecurityPolicy;
using chip::app::Clusters::GroupKeyManagement::GroupKeySecurityPolicyEnum;
using cluster::group_key_management::command::group_keyset_struct;
constexpr size_t k_epoch_key_bytes_len = chip::Credentials::GroupDataProvider::EpochKey::kLengthBytes;
@@ -228,7 +228,7 @@ static bool parse_group_keyset(group_keyset_struct *keyset, char *json_str, epoc
if (json_obj_get_int(&jctx, "groupKeySecurityPolicy", &int_val) != 0) {
return false;
}
keyset->groupKeySecurityPolicy = static_cast<GroupKeySecurityPolicy>(int_val);
keyset->groupKeySecurityPolicy = static_cast<GroupKeySecurityPolicyEnum>(int_val);
// epochKey0 & epochStartTime0
if (json_obj_get_int64(&jctx, "epochStartTime0", &int64_val) == 0 &&
json_obj_get_string(&jctx, "epochKey0", epoch_key_oct_str, k_epoch_key_bytes_len * 2 + 1) == 0 &&
@@ -366,7 +366,7 @@ static esp_err_t send_command(command_data_t *command_data, peer_device_t *remot
} // namespace clusters
void cluster_command::on_device_connected_fcn(void *context, ExchangeManager &exchangeMgr, SessionHandle &sessionHandle)
void cluster_command::on_device_connected_fcn(void *context, ExchangeManager &exchangeMgr, const SessionHandle &sessionHandle)
{
cluster_command *cmd = reinterpret_cast<cluster_command *>(context);
chip::OperationalDeviceProxy device_proxy(&exchangeMgr, sessionHandle);
@@ -64,7 +64,7 @@ private:
uint16_t m_endpoint_id;
command_data_t *m_command_data;
static void on_device_connected_fcn(void *context, ExchangeManager &exchangeMgr, SessionHandle &sessionHandle);
static void on_device_connected_fcn(void *context, ExchangeManager &exchangeMgr, const SessionHandle &sessionHandle);
static void on_device_connection_failure_fcn(void *context, const ScopedNodeId &peerId, CHIP_ERROR error);
static esp_err_t dispatch_group_command(void *context);
@@ -35,9 +35,6 @@ void pairing_command::OnStatusUpdate(DevicePairingDelegate::Status status)
case DevicePairingDelegate::Status::SecurePairingFailed:
ESP_LOGI(TAG, "Secure Pairing Failed");
break;
case DevicePairingDelegate::Status::SecurePairingDiscoveringMoreDevices:
ESP_LOGI(TAG, "Secure Pairing Discovering More Device");
break;
}
}
@@ -74,7 +71,7 @@ void pairing_command::OnCommissioningComplete(NodeId nodeId, CHIP_ERROR err)
}
}
void pairing_command::OnDeviceConnectedFn(void *context, ExchangeManager &exchangeMgr, SessionHandle &sessionHandle)
void pairing_command::OnDeviceConnectedFn(void *context, ExchangeManager &exchangeMgr, const SessionHandle &sessionHandle)
{
ESP_LOGI(TAG, "OnDeviceConnectedFn");
CommissionerDiscoveryController *cdc = esp_matter::commissioner::get_discovery_controller();
@@ -70,7 +70,7 @@ public:
private:
static pairing_command instance;
static void OnDeviceConnectedFn(void *context, ExchangeManager &exchangeMgr, SessionHandle &sessionHandle);
static void OnDeviceConnectedFn(void *context, ExchangeManager &exchangeMgr, const SessionHandle &sessionHandle);
static void OnDeviceConnectionFailureFn(void *context, const ScopedNodeId &peerId, CHIP_ERROR error);
CommissioningParameters get_commissioning_params();
@@ -34,7 +34,7 @@ static const char *TAG = "read_command";
namespace esp_matter {
namespace controller {
void read_command::on_device_connected_fcn(void *context, ExchangeManager &exchangeMgr, SessionHandle &sessionHandle)
void read_command::on_device_connected_fcn(void *context, ExchangeManager &exchangeMgr, const SessionHandle &sessionHandle)
{
read_command *cmd = (read_command *)context;
ReadPrepareParams params(sessionHandle);
@@ -90,7 +90,7 @@ private:
};
BufferedReadCallback m_buffered_read_cb;
static void on_device_connected_fcn(void *context, ExchangeManager &exchangeMgr, SessionHandle &sessionHandle);
static void on_device_connected_fcn(void *context, ExchangeManager &exchangeMgr, const SessionHandle &sessionHandle);
static void on_device_connection_failure_fcn(void *context, const ScopedNodeId &peerId, CHIP_ERROR error);
chip::Callback::Callback<chip::OnDeviceConnected> on_device_connected_cb;
@@ -35,7 +35,7 @@ namespace esp_matter {
namespace controller {
void subscribe_command::on_device_connected_fcn(void *context, ExchangeManager &exchangeMgr,
SessionHandle &sessionHandle)
const SessionHandle &sessionHandle)
{
subscribe_command *cmd = (subscribe_command *)context;
ReadPrepareParams params(sessionHandle);
@@ -100,7 +100,7 @@ private:
};
BufferedReadCallback m_buffered_read_cb;
static void on_device_connected_fcn(void *context, ExchangeManager &exchangeMgr, SessionHandle &sessionHandle);
static void on_device_connected_fcn(void *context, ExchangeManager &exchangeMgr, const SessionHandle &sessionHandle);
static void on_device_connection_failure_fcn(void *context, const ScopedNodeId &peerId, CHIP_ERROR error);
chip::Callback::Callback<chip::OnDeviceConnected> on_device_connected_cb;
@@ -35,7 +35,7 @@ namespace controller {
template <class T>
void write_command<T>::on_device_connected_fcn(void *context, ExchangeManager &exchangeMgr,
SessionHandle &sessionHandle)
const SessionHandle &sessionHandle)
{
write_command<T> *cmd = (write_command<T> *)context;
CHIP_ERROR err = CHIP_NO_ERROR;
@@ -184,14 +184,14 @@ static esp_err_t write_attribute(uint64_t node_id, uint16_t endpoint_id, uint32_
namespace access_control {
using AccessControl::AuthMode;
using AccessControl::Privilege;
using AccessControl::AccessControlEntryAuthModeEnum;
using AccessControl::AccessControlEntryPrivilegeEnum;
constexpr size_t k_max_acl_entries = CHIP_CONFIG_EXAMPLE_ACCESS_CONTROL_MAX_ENTRIES_PER_FABRIC;
constexpr size_t k_max_subjects_per_acl = CHIP_CONFIG_EXAMPLE_ACCESS_CONTROL_MAX_SUBJECTS_PER_ENTRY;
constexpr size_t k_max_targets_per_acl = CHIP_CONFIG_EXAMPLE_ACCESS_CONTROL_MAX_TARGETS_PER_ENTRY;
using acl_obj = AccessControl::Structs::AccessControlEntry::Type;
using acl_obj = AccessControl::Structs::AccessControlEntryStruct::Type;
using acl_target_obj = AccessControl::Structs::Target::Type;
typedef struct acl_attr {
acl_obj acl_array[k_max_acl_entries];
@@ -220,11 +220,11 @@ static esp_err_t parse_acl_json(char *json_str, acl_attr_t *acl, size_t *acl_siz
// Privilege
ESP_RETURN_ON_FALSE(json_obj_get_int(&jctx, "privilege", &int_val) == 0, ESP_ERR_INVALID_ARG, TAG,
"Failed to get privilege from the ACL json string");
acl->acl_array[acl_index].privilege = Privilege(int_val);
acl->acl_array[acl_index].privilege = AccessControlEntryPrivilegeEnum(int_val);
// AuthMode
ESP_RETURN_ON_FALSE(json_obj_get_int(&jctx, "authMode", &int_val) == 0, ESP_ERR_INVALID_ARG, TAG,
"Failed to get authMode from the ACL json string");
acl->acl_array[acl_index].authMode = AuthMode(int_val);
acl->acl_array[acl_index].authMode = AccessControlEntryAuthModeEnum(int_val);
// Subjects
int subjects_num = 0;
if (json_obj_get_array(&jctx, "subjects", &subjects_num) == 0 && subjects_num > 0) {
@@ -301,7 +301,7 @@ static esp_err_t parse_acl_json(char *json_str, acl_attr_t *acl, size_t *acl_siz
constexpr size_t k_max_extension_entries = CHIP_CONFIG_EXAMPLE_ACCESS_CONTROL_MAX_ENTRIES_PER_FABRIC;
constexpr size_t k_max_extension_data_len = 128;
using extension_obj = AccessControl::Structs::ExtensionEntry::Type;
using extension_obj = AccessControl::Structs::AccessControlExtensionStruct::Type;
typedef struct extension_attr {
extension_obj extension_array[k_max_extension_entries];
uint8_t data_array[k_max_extension_entries][k_max_extension_data_len];
@@ -100,7 +100,7 @@ private:
attribute_free_handler m_attr_free;
void *m_attr_free_ctx;
static void on_device_connected_fcn(void *context, ExchangeManager &exchangeMgr, SessionHandle &sessionHandle);
static void on_device_connected_fcn(void *context, ExchangeManager &exchangeMgr, const SessionHandle &sessionHandle);
static void on_device_connection_failure_fcn(void *context, const ScopedNodeId &peerId, CHIP_ERROR error);
chip::Callback::Callback<chip::OnDeviceConnected> on_device_connected_cb;
File diff suppressed because it is too large Load Diff
@@ -21,18 +21,17 @@
#include <lib/core/CHIPError.h>
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::AccessControl::Structs::AccessControlEntry::DecodableType & value);
const chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::Actions::Structs::ActionStruct::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::ContentLauncher::Structs::AdditionalInfo::DecodableType & value);
const chip::app::Clusters::ContentLauncher::Structs::AdditionalInfoStruct::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::ApplicationLauncher::Structs::Application::DecodableType & value);
static CHIP_ERROR
LogValue(const char * label, size_t indent,
const chip::app::Clusters::ApplicationBasic::Structs::ApplicationBasicApplication::DecodableType & value);
const chip::app::Clusters::ApplicationLauncher::Structs::ApplicationEPStruct::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::ApplicationLauncher::Structs::ApplicationEP::DecodableType & value);
const chip::app::Clusters::detail::Structs::ApplicationStruct::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::Scenes::Structs::AttributeValuePair::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
@@ -42,31 +41,30 @@ static CHIP_ERROR LogValue(const char * label, size_t indent,
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::PowerSource::Structs::BatFaultChangeType::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::ContentLauncher::Structs::BrandingInformation::DecodableType & value);
const chip::app::Clusters::ContentLauncher::Structs::BrandingInformationStruct::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::BasicInformation::Structs::CapabilityMinimaStruct::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::Channel::Structs::ChannelInfo::DecodableType & value);
const chip::app::Clusters::Channel::Structs::ChannelInfoStruct::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::ContentLauncher::Structs::ContentSearch::DecodableType & value);
const chip::app::Clusters::ContentLauncher::Structs::ContentSearchStruct::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::DoorLock::Structs::CredentialStruct::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::TimeSynchronization::Structs::DSTOffsetStruct::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::Descriptor::Structs::DeviceTypeStruct::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::ContentLauncher::Structs::Dimension::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::DoorLock::Structs::DlCredential::DecodableType & value);
const chip::app::Clusters::ContentLauncher::Structs::DimensionStruct::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::UnitTesting::Structs::DoubleNestedStructList::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::TimeSynchronization::Structs::DstOffsetType::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::Actions::Structs::EndpointListStruct::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::AccessControl::Structs::ExtensionEntry::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::Scenes::Structs::ExtensionFieldSet::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType & value);
static CHIP_ERROR
LogValue(const char * label, size_t indent,
const chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::GroupKeyManagement::Structs::GroupInfoMapStruct::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
@@ -74,11 +72,11 @@ static CHIP_ERROR LogValue(const char * label, size_t indent,
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::GroupKeyManagement::Structs::GroupKeySetStruct::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::MediaInput::Structs::InputInfo::DecodableType & value);
const chip::app::Clusters::MediaInput::Structs::InputInfoStruct::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::detail::Structs::LabelStruct::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::Channel::Structs::LineupInfo::DecodableType & value);
const chip::app::Clusters::Channel::Structs::LineupInfoStruct::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::ModeSelect::Structs::ModeOptionStruct::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
@@ -94,18 +92,18 @@ static CHIP_ERROR LogValue(const char * label, size_t indent,
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::NetworkCommissioning::Structs::NetworkInfo::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::GeneralDiagnostics::Structs::NetworkInterfaceType::DecodableType & value);
const chip::app::Clusters::GeneralDiagnostics::Structs::NetworkInterface::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::UnitTesting::Structs::NullablesAndOptionalsStruct::DecodableType & value);
static CHIP_ERROR
LogValue(const char * label, size_t indent,
const chip::app::Clusters::ThreadNetworkDiagnostics::Structs::OperationalDatasetComponents::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::AudioOutput::Structs::OutputInfo::DecodableType & value);
const chip::app::Clusters::AudioOutput::Structs::OutputInfoStruct::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::ContentLauncher::Structs::Parameter::DecodableType & value);
const chip::app::Clusters::ContentLauncher::Structs::ParameterStruct::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::MediaPlayback::Structs::PlaybackPosition::DecodableType & value);
const chip::app::Clusters::MediaPlayback::Structs::PlaybackPositionStruct::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::OtaSoftwareUpdateRequestor::Structs::ProviderLocation::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
@@ -113,15 +111,15 @@ static CHIP_ERROR LogValue(const char * label, size_t indent,
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::ThreadNetworkDiagnostics::Structs::SecurityPolicy::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::ModeSelect::Structs::SemanticTag::DecodableType & value);
const chip::app::Clusters::ModeSelect::Structs::SemanticTagStruct::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::UnitTesting::Structs::SimpleStruct::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::ContentLauncher::Structs::StyleInformation::DecodableType & value);
const chip::app::Clusters::ContentLauncher::Structs::StyleInformationStruct::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::AccessControl::Structs::Target::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::TargetNavigator::Structs::TargetInfo::DecodableType & value);
const chip::app::Clusters::TargetNavigator::Structs::TargetInfoStruct::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::Binding::Structs::TargetStruct::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
@@ -134,9 +132,9 @@ static CHIP_ERROR
LogValue(const char * label, size_t indent,
const chip::app::Clusters::NetworkCommissioning::Structs::ThreadInterfaceScanResult::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::SoftwareDiagnostics::Structs::ThreadMetrics::DecodableType & value);
const chip::app::Clusters::SoftwareDiagnostics::Structs::ThreadMetricsStruct::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::TimeSynchronization::Structs::TimeZoneType::DecodableType & value);
const chip::app::Clusters::TimeSynchronization::Structs::TimeZoneStruct::DecodableType & value);
static CHIP_ERROR
LogValue(const char * label, size_t indent,
const chip::app::Clusters::NetworkCommissioning::Structs::WiFiInterfaceScanResult::DecodableType & value);
@@ -165,6 +163,12 @@ static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::OtaSoftwareUpdateRequestor::Events::VersionApplied::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::OtaSoftwareUpdateRequestor::Events::DownloadError::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::PowerSource::Events::WiredFaultChange::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::PowerSource::Events::BatFaultChange::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::PowerSource::Events::BatChargeFaultChange::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::GeneralDiagnostics::Events::HardwareFaultChange::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
@@ -186,13 +190,14 @@ static CHIP_ERROR LogValue(const char * label, size_t indent,
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::WiFiNetworkDiagnostics::Events::ConnectionStatus::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::BridgedDeviceBasic::Events::StartUp::DecodableType & value);
const chip::app::Clusters::BridgedDeviceBasicInformation::Events::StartUp::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::BridgedDeviceBasic::Events::ShutDown::DecodableType & value);
const chip::app::Clusters::BridgedDeviceBasicInformation::Events::ShutDown::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::BridgedDeviceBasic::Events::Leave::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::BridgedDeviceBasic::Events::ReachableChanged::DecodableType & value);
const chip::app::Clusters::BridgedDeviceBasicInformation::Events::Leave::DecodableType & value);
static CHIP_ERROR
LogValue(const char * label, size_t indent,
const chip::app::Clusters::BridgedDeviceBasicInformation::Events::ReachableChanged::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::Switch::Events::SwitchLatched::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
@@ -353,7 +358,7 @@ static CHIP_ERROR LogValue(const char * label, size_t indent,
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::ContentLauncher::Commands::LaunchResponse::DecodableType & value);
const chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
@@ -1,7 +0,0 @@
if(CONFIG_OPENTHREAD_ENABLED)
set(srcs esp_matter_openthread.c)
endif()
idf_component_register(SRCS ${srcs}
INCLUDE_DIRS .
PRIV_REQUIRES openthread esp_netif driver)
@@ -1,81 +0,0 @@
// Copyright 2021 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include "esp_matter_openthread_config.h"
#include "esp_event.h"
#include "esp_netif.h"
#include "esp_netif_types.h"
#include "esp_openthread.h"
#include "esp_openthread_lock.h"
#include "esp_openthread_netif_glue.h"
#include "esp_openthread_types.h"
#include "esp_vfs_eventfd.h"
#include "driver/uart.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "openthread/instance.h"
#include "openthread/logging.h"
#include "openthread/tasklet.h"
static esp_netif_t *init_openthread_netif(const esp_openthread_platform_config_t *config)
{
esp_netif_config_t cfg = ESP_NETIF_DEFAULT_OPENTHREAD();
esp_netif_t *netif = esp_netif_new(&cfg);
assert(netif != NULL);
ESP_ERROR_CHECK(esp_netif_attach(netif, esp_openthread_netif_glue_init(config)));
return netif;
}
static void ot_task_worker(void *context)
{
esp_openthread_platform_config_t config = {
.radio_config = ESP_OPENTHREAD_DEFAULT_RADIO_CONFIG(),
.host_config = ESP_OPENTHREAD_DEFAULT_HOST_CONFIG(),
.port_config = ESP_OPENTHREAD_DEFAULT_PORT_CONFIG(),
};
esp_netif_t *openthread_netif;
// Initialize the OpenThread stack
ESP_ERROR_CHECK(esp_openthread_init(&config));
// The OpenThread log level directly matches ESP log level
(void)otLoggingSetLevel(OT_LOG_LEVEL_INFO);
// Initialize the esp_netif bindings
openthread_netif = init_openthread_netif(&config);
// Run the main loop
esp_openthread_launch_mainloop();
esp_netif_destroy(openthread_netif);
esp_openthread_netif_glue_deinit();
esp_vfs_eventfd_unregister();
vTaskDelete(NULL);
}
esp_err_t esp_matter_openthread_launch_task(void)
{
// Used eventfds:
// * netif
// * ot task queue
// * radio driver
esp_vfs_eventfd_config_t eventfd_config = {
.max_fds = 3,
};
ESP_ERROR_CHECK(esp_netif_init());
ESP_ERROR_CHECK(esp_vfs_eventfd_register(&eventfd_config));
xTaskCreate(ot_task_worker, "ot_cli_main", 10240, xTaskGetCurrentTaskHandle(), 5, NULL);
return ESP_OK;
}
@@ -1,27 +0,0 @@
// Copyright 2021 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#pragma once
#include "esp_openthread.h"
#ifdef __cplusplus
extern "C" {
#endif
esp_err_t esp_matter_openthread_launch_task(void);
#ifdef __cplusplus
}
#endif
@@ -1,35 +0,0 @@
// Copyright 2021 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#pragma once
#include "esp_openthread_types.h"
#include "sdkconfig.h"
#if !CONFIG_IDF_TARGET_ESP32H2
#error "Unsupported IDF target, Please set idf_target to esp32h2!"
#endif
#define ESP_OPENTHREAD_DEFAULT_RADIO_CONFIG() \
{ \
.radio_mode = RADIO_MODE_NATIVE, \
}
#define ESP_OPENTHREAD_DEFAULT_HOST_CONFIG() \
{ \
.host_connection_mode = HOST_CONNECTION_MODE_NONE, \
}
#define ESP_OPENTHREAD_DEFAULT_PORT_CONFIG() \
{ \
.storage_partition_name = "ot_storage", .netif_queue_size = 10, .task_queue_size = 10, \
}
@@ -0,0 +1,43 @@
// Copyright 2021 Espressif Systems (Shanghai) CO LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License
#include <esp_log.h>
#include <iot_button.h>
#include <led_driver.h>
#define LED_GPIO_PIN GPIO_NUM_8
#define LED_CHANNEL 0 /* RMT_CHANNEL_0 */
#define BUTTON_GPIO_PIN GPIO_NUM_9
static const char *TAG = "device";
led_driver_config_t led_driver_get_config()
{
led_driver_config_t config = {
.gpio = LED_GPIO_PIN,
.channel = LED_CHANNEL,
};
return config;
}
button_config_t button_driver_get_config()
{
button_config_t config = {
.type = BUTTON_TYPE_GPIO,
.gpio_button_config = {
.gpio_num = BUTTON_GPIO_PIN,
.active_level = 0,
}
};
return config;
}
@@ -0,0 +1,11 @@
cmake_minimum_required(VERSION 3.5)
if (NOT ("${IDF_TARGET}" STREQUAL "esp32c6" ))
message(FATAL_ERROR "please set esp32c6 as the IDF_TARGET using 'idf.py --preview set-target esp32c6'")
endif()
SET(device_type esp32c2_devkit_m)
SET(led_type gpio)
SET(button_type hollow_button)
SET(extra_components_dirs_append "$ENV{ESP_MATTER_DEVICE_PATH}/../../led_driver"
"$ENV{ESP_MATTER_DEVICE_PATH}/../../button_driver/button")
+6 -2
View File
@@ -97,14 +97,18 @@ The option ``-n`` (count) is the number of generated binaries. In the above comm
The option ``--paa-trust-store-path`` should be added when using chip-tool to pair the device for manual tests.
.. only:: esp32 or esp32c3
.. only:: esp32 or esp32c3 or esp32c2 or esp32c6
::
cd path/to/connnectedhomeip/out/host/
./chip-tool pairing ble-wifi 0x7283 <ssid> <passphrase> <setup-pin-code> <discriminator> --paa-trust-store-path <paa-certificate-path>
.. only:: esp32h2
.. only:: esp32c6
or
.. only:: esp32h2 or esp32c6
::
+41 -9
View File
@@ -24,7 +24,7 @@ Additionally, we also support developing on Windows Host using WSL.
The Prerequisites for ESP-IDF and Matter:
- Please see `Prerequisites <https://docs.espressif.com/projects/esp-idf/en/v4.4.3/esp32/get-started/index.html#step-1-install-prerequisites>`__ for ESP IDF.
- Please get the `Prerequisites <https://github.com/espressif/connectedhomeip/blob/v1.0.0.2/docs/guides/BUILDING.md#prerequisites>`__ for Matter.
- Please get the `Prerequisites <https://github.com/espressif/connectedhomeip/tree/bb9200ace/docs/guides/BUILDING.md#prerequisites>`__ for Matter.
@@ -56,12 +56,12 @@ For using VSCode for development, please check `Developing in WSL <https://code.
./install.sh
cd ..
.. only:: esp32h2
.. only:: esp32h2 or esp32c6 or esp32c2
::
git clone --recursive https://github.com/espressif/esp-idf.git
cd esp-idf; git checkout 20949d444f; git submodule update --init --recursive;
cd esp-idf; git checkout bb9200acec; git submodule update --init --recursive;
./install.sh
cd ..
@@ -155,12 +155,24 @@ Choose IDF target.
idf.py set-target esp32c3
.. only:: esp32c2
::
idf.py set-target esp32c2
.. only:: esp32h2
::
idf.py --preview set-target esp32h2
.. only:: esp32c6
::
idf.py --preview set-target esp32c6
- If IDF target has not been set explicitly, then ``esp32`` is
considered as default.
- The default device for ``esp32``/``esp32c3`` is
@@ -177,6 +189,13 @@ Choose IDF target.
- The configuration of the peripheral components can be found in
``$ESP_MATTER_DEVICE_PATH/esp_matter_device.cmake``.
.. only:: esp32c6
- ESP32-C6 supports both the Wi-Fi and IEEE 802.15.4 radio, so you can run Wi-Fi or Thread matter example on it.
- To enable Thread, you should change the menuconfig options to ``CONFIG_OPENTHREAD_ENABLED=y``, ``CONFIG_ENABLE_WIFI_STATION=n``, and ``CONFIG_USE_MINIMAL_MDNS=n``.
- To enable Wi-Fi. you should change the menuconfig options to ``CONFIG_OPENTHREAD_ENABLED=n``, ``CONFIG_ENABLE_WIFI_STATION=n``, and ``CONFIG_USE_MINIMAL_MDNS=y``.
(When flashing the SDK for the first time, it is recommended to do
``idf.py erase_flash`` to wipe out entire flash and start out fresh.)
@@ -224,13 +243,17 @@ Use ``chip-tool`` in interactive mode to commission the device:
chip-tool interactive start
.. only:: esp32 or esp32c3
.. only:: esp32 or esp32c3 or esp32c2 or esp32c6
::
pairing ble-wifi 0x7283 <ssid> <passphrase> 20202021 3840
.. only:: esp32h2
.. only:: esp32c6
or
.. only:: esp32h2 or esp32c6
::
@@ -247,15 +270,20 @@ Above method commissions the device using setup passcode and discriminator. Devi
To Commission the device using manual pairing code 34970112332
.. only:: esp32 or esp32c3
.. only:: esp32 or esp32c3 or esp32c2 or esp32c6
::
pairing code-wifi 0x7283 <ssid> <passphrase> 34970112332
.. only:: esp32h2
.. only:: esp32c6
or
.. only:: esp32h2 or esp32c6
::
pairing code-thread 0x7283 hex:<operationalDataset> 34970112332
Above default manual pairing code contains following values:
@@ -269,13 +297,17 @@ Above default manual pairing code contains following values:
To commission the device using QR code MT:Y.K9042C00KA0648G00
.. only:: esp32 or esp32c3
.. only:: esp32 or esp32c3 or esp32c2 or esp32c6
::
pairing code-wifi 0x7283 <ssid> <passphrase> MT:Y.K9042C00KA0648G00
.. only:: esp32h2
.. only:: esp32c6
or
.. only:: esp32h2 or esp32c6
::
+18 -10
View File
@@ -90,15 +90,12 @@ static_library("ESP32_custom") {
"KeyValueStoreManagerImpl.h",
"Logging.cpp",
"LwIPCoreLock.cpp",
"NetworkCommissioningDriver.h",
"NetworkCommissioningDriver.cpp",
"PlatformManagerImpl.cpp",
"PlatformManagerImpl.h",
"SystemTimeSupport.cpp",
"SystemTimeSupport.h",
"bluedroid/BLEManagerImpl.cpp",
"nimble/BLEManagerImpl.cpp",
"ConnectivityManagerImpl_WiFi.cpp",
]
deps = [
@@ -116,13 +113,6 @@ static_library("ESP32_custom") {
":ESP32_custom_include",
]
if (chip_mdns == "platform") {
sources += [
"DnssdImpl.cpp",
"DnssdImpl.h",
]
}
if (chip_enable_ota_requestor) {
sources += [
"OTAImageProcessorImpl.cpp",
@@ -130,6 +120,24 @@ static_library("ESP32_custom") {
]
}
if (chip_enable_wifi) {
sources += [
"ConnectivityManagerImpl_WiFi.cpp",
"NetworkCommissioningDriver.cpp",
"NetworkCommissioningDriver.h",
"route_hook/ESP32RouteHook.c",
"route_hook/ESP32RouteHook.h",
"route_hook/ESP32RouteTable.c",
"route_hook/ESP32RouteTable.h",
]
if (chip_mdns == "platform") {
sources += [
"DnssdImpl.cpp",
"DnssdImpl.h",
]
}
}
if (chip_use_factory_data_provider) {
sources += [
"ESP32FactoryDataProvider.cpp",
+2
View File
@@ -17,6 +17,8 @@ if(NOT DEFINED ENV{ESP_MATTER_DEVICE_PATH})
set(ENV{ESP_MATTER_DEVICE_PATH} $ENV{ESP_MATTER_PATH}/device_hal/device/esp32h2_devkit_c)
elseif("${IDF_TARGET}" STREQUAL "esp32s3")
set(ENV{ESP_MATTER_DEVICE_PATH} $ENV{ESP_MATTER_PATH}/device_hal/device/esp32s3_devkit_c)
elseif("${IDF_TARGET}" STREQUAL "esp32c6")
set(ENV{ESP_MATTER_DEVICE_PATH} $ENV{ESP_MATTER_PATH}/device_hal/device/esp32c6_devkit_c)
else()
message(FATAL_ERROR "Unsupported IDF_TARGET")
endif()
@@ -0,0 +1,9 @@
# Name, Type, SubType, Offset, Size, Flags
# Note: Firmware partition offset needs to be 64K aligned, initial 36K (9 sectors) are reserved for bootloader and partition table
esp_secure_cert, 0x3F, ,0xd000, 0x2000, , # Never mark this as an encrypted partition
nvs, data, nvs, 0x10000, 0x6000,
nvs_keys, data, nvs_keys, , 0x1000,
phy_init, data, phy, , 0x1000,
ota_0, app, ota_0, , 0x1C0000,
ota_1, app, ota_1, , 0x1C0000,
ot_storage,data, fat, , 0x6000,
1 # Name, Type, SubType, Offset, Size, Flags
2 # Note: Firmware partition offset needs to be 64K aligned, initial 36K (9 sectors) are reserved for bootloader and partition table
3 esp_secure_cert, 0x3F, ,0xd000, 0x2000, , # Never mark this as an encrypted partition
4 nvs, data, nvs, 0x10000, 0x6000,
5 nvs_keys, data, nvs_keys, , 0x1000,
6 phy_init, data, phy, , 0x1000,
7 ota_0, app, ota_0, , 0x1C0000,
8 ota_1, app, ota_1, , 0x1C0000,
9 ot_storage,data, fat, , 0x6000,
+4 -3
View File
@@ -1,8 +1,9 @@
# Name, Type, SubType, Offset, Size, Flags
# Note: Firmware partition offset needs to be 64K aligned, initial 36K (9 sectors) are reserved for bootloader and partition table
sec_cert, 0x3F, ,0xd000, 0x3000, , # Never mark this as an encrypted partition
esp_secure_cert, 0x3F, ,0xd000, 0x2000, , # Never mark this as an encrypted partition
nvs, data, nvs, 0x10000, 0x6000,
nvs_keys, data, nvs_keys, , 0x1000,
phy_init, data, phy, , 0x1000,
# Temporarily disable ota for ESP32-H2 because the use of flash need to be optimized.
factory, app, factory, , 0x1C0000,
ota_0, app, ota_0, , 0x1C0000,
ota_1, app, ota_1, , 0x1C0000,
ot_storage,data, fat, , 0x6000,
1 # Name, Type, SubType, Offset, Size, Flags
2 # Note: Firmware partition offset needs to be 64K aligned, initial 36K (9 sectors) are reserved for bootloader and partition table
3 sec_cert, 0x3F, ,0xd000, 0x3000, , # Never mark this as an encrypted partition esp_secure_cert, 0x3F, ,0xd000, 0x2000, , # Never mark this as an encrypted partition
4 nvs, data, nvs, 0x10000, 0x6000,
5 nvs_keys, data, nvs_keys, , 0x1000,
6 phy_init, data, phy, , 0x1000,
7 # Temporarily disable ota for ESP32-H2 because the use of flash need to be optimized. ota_0, app, ota_0, , 0x1C0000,
8 factory, app, factory, , 0x1C0000, ota_1, app, ota_1, , 0x1C0000,
9 ot_storage,data, fat, , 0x6000,
@@ -0,0 +1,72 @@
CONFIG_IDF_TARGET="esp32c6"
# Default to 921600 baud when flashing and monitoring device
CONFIG_ESPTOOLPY_BAUD_921600B=y
CONFIG_ESPTOOLPY_BAUD=921600
CONFIG_ESPTOOLPY_COMPRESSED=y
CONFIG_ESPTOOLPY_FLASHFREQ_40M=y
CONFIG_ESPTOOLPY_FLASHFREQ="40m"
CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B=y
CONFIG_ESPTOOLPY_MONITOR_BAUD=115200
# libsodium
CONFIG_LIBSODIUM_USE_MBEDTLS_SHA=y
# NIMBLE
CONFIG_BT_ENABLED=y
CONFIG_BT_NIMBLE_ENABLED=y
CONFIG_BT_NIMBLE_EXT_ADV=n
CONFIG_BT_NIMBLE_HCI_EVT_BUF_SIZE=70
CONFIG_USE_BLE_ONLY_FOR_COMMISSIONING=n
# FreeRTOS should use legacy API
CONFIG_FREERTOS_ENABLE_BACKWARD_COMPATIBILITY=y
# Enable OpenThread
CONFIG_OPENTHREAD_ENABLED=y
CONFIG_OPENTHREAD_SRP_CLIENT=y
CONFIG_OPENTHREAD_DNS_CLIENT=y
CONFIG_OPENTHREAD_LOG_LEVEL_DYNAMIC=n
CONFIG_OPENTHREAD_LOG_LEVEL_NOTE=y
CONFIG_OPENTHREAD_CLI=n
# Disable lwip ipv6 autoconfig
CONFIG_LWIP_IPV6_AUTOCONFIG=n
# Use a custom partition table
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_c6.csv"
# LwIP config for OpenThread
CONFIG_LWIP_IPV6_NUM_ADDRESSES=8
CONFIG_LWIP_MULTICAST_PING=y
# mbedTLS
CONFIG_MBEDTLS_HARDWARE_AES=n
CONFIG_MBEDTLS_HARDWARE_MPI=n
CONFIG_MBEDTLS_HARDWARE_SHA=n
CONFIG_MBEDTLS_HARDWARE_ECC=y
CONFIG_MBEDTLS_ATCA_HW_ECDSA_SIGN=n
CONFIG_MBEDTLS_ATCA_HW_ECDSA_VERIFY=n
CONFIG_MBEDTLS_CMAC_C=y
CONFIG_MBEDTLS_SSL_PROTO_DTLS=y
CONFIG_MBEDTLS_KEY_EXCHANGE_ECJPAKE=y
# MDNS platform
CONFIG_USE_MINIMAL_MDNS=n
CONFIG_ENABLE_EXTENDED_DISCOVERY=y
# Enable OTA Requestor
CONFIG_ENABLE_OTA_REQUESTOR=y
# Disable STA and AP for ESP32C6
CONFIG_ENABLE_WIFI_STATION=n
CONFIG_ENABLE_WIFI_AP=n
# Button
CONFIG_BUTTON_PERIOD_TIME_MS=20
CONFIG_BUTTON_LONG_PRESS_TIME_MS=5000
# Enable chip shell
CONFIG_ENABLE_CHIP_SHELL=y
@@ -1,5 +1,4 @@
CONFIG_IDF_TARGET="esp32h2"
CONFIG_IDF_TARGET_ESP32H2_BETA_VERSION_2=y
# Default to 921600 baud when flashing and monitoring device
CONFIG_ESPTOOLPY_BAUD_921600B=y
@@ -9,7 +8,6 @@ CONFIG_ESPTOOLPY_FLASHFREQ_40M=y
CONFIG_ESPTOOLPY_FLASHFREQ="40m"
CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B=y
CONFIG_ESPTOOLPY_MONITOR_BAUD=115200
CONFIG_ESPTOOLPY_FLASHSIZE_2MB=y
# libsodium
CONFIG_LIBSODIUM_USE_MBEDTLS_SHA=y
@@ -27,6 +25,11 @@ CONFIG_FREERTOS_ENABLE_BACKWARD_COMPATIBILITY=y
# Enable OpenThread
CONFIG_OPENTHREAD_ENABLED=y
CONFIG_OPENTHREAD_SRP_CLIENT=y
CONFIG_OPENTHREAD_DNS_CLIENT=y
CONFIG_OPENTHREAD_LOG_LEVEL_DYNAMIC=n
CONFIG_OPENTHREAD_LOG_LEVEL_NOTE=y
CONFIG_OPENTHREAD_CLI=n
# Disable lwip ipv6 autoconfig
CONFIG_LWIP_IPV6_AUTOCONFIG=n
@@ -55,7 +58,7 @@ CONFIG_USE_MINIMAL_MDNS=n
CONFIG_ENABLE_EXTENDED_DISCOVERY=y
# Enable OTA Requestor
CONFIG_ENABLE_OTA_REQUESTOR=n
CONFIG_ENABLE_OTA_REQUESTOR=y
# Disable STA and AP for ESP32H2
CONFIG_ENABLE_WIFI_STATION=n
+2
View File
@@ -17,6 +17,8 @@ if(NOT DEFINED ENV{ESP_MATTER_DEVICE_PATH})
set(ENV{ESP_MATTER_DEVICE_PATH} $ENV{ESP_MATTER_PATH}/device_hal/device/esp32h2_devkit_c)
elseif("${IDF_TARGET}" STREQUAL "esp32s3")
set(ENV{ESP_MATTER_DEVICE_PATH} $ENV{ESP_MATTER_PATH}/device_hal/device/esp32s3_devkit_c)
elseif("${IDF_TARGET}" STREQUAL "esp32c6")
set(ENV{ESP_MATTER_DEVICE_PATH} $ENV{ESP_MATTER_PATH}/device_hal/device/esp32c6_devkit_c)
else()
message(FATAL_ERROR "Unsupported IDF_TARGET")
endif()
+3 -3
View File
@@ -1,9 +1,9 @@
# Name, Type, SubType, Offset, Size, Flags
# Note: Firmware partition offset needs to be 64K aligned, initial 36K (9 sectors) are reserved for bootloader and partition table
esp_secure_cert, 0x3F, ,0xd000, 0x2000, , # Never mark this as an encrypted partition
esp_secure_cert, 0x3F, ,0xd000, 0x2000, , # Never mark this as an encrypted partition
nvs, data, nvs, 0x10000, 0x6000,
nvs_keys, data, nvs_keys, , 0x1000,
phy_init, data, phy, , 0x1000,
# Temporarily disable ota for ESP32-H2 because the use of flash need to be optimized.
factory, app, factory, , 0x1C0000,
ota_0, app, ota_0, , 0x1C0000,
ota_1, app, ota_1, , 0x1C0000,
ot_storage,data, fat, , 0x6000,
1 # Name, Type, SubType, Offset, Size, Flags
2 # Note: Firmware partition offset needs to be 64K aligned, initial 36K (9 sectors) are reserved for bootloader and partition table
3 esp_secure_cert, 0x3F, ,0xd000, 0x2000, , # Never mark this as an encrypted partition esp_secure_cert, 0x3F, ,0xd000, 0x2000, , # Never mark this as an encrypted partition
4 nvs, data, nvs, 0x10000, 0x6000,
5 nvs_keys, data, nvs_keys, , 0x1000,
6 phy_init, data, phy, , 0x1000,
7 # Temporarily disable ota for ESP32-H2 because the use of flash need to be optimized. ota_0, app, ota_0, , 0x1C0000,
8 factory, app, factory, , 0x1C0000, ota_1, app, ota_1, , 0x1C0000,
9 ot_storage,data, fat, , 0x6000,
+67
View File
@@ -0,0 +1,67 @@
CONFIG_IDF_TARGET="esp32c6"
# Default to 921600 baud when flashing and monitoring device
CONFIG_ESPTOOLPY_BAUD_921600B=y
CONFIG_ESPTOOLPY_BAUD=921600
CONFIG_ESPTOOLPY_COMPRESSED=y
CONFIG_ESPTOOLPY_FLASHFREQ_40M=y
CONFIG_ESPTOOLPY_FLASHFREQ="40m"
CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B=y
CONFIG_ESPTOOLPY_MONITOR_BAUD=115200
# libsodium
CONFIG_LIBSODIUM_USE_MBEDTLS_SHA=y
# NIMBLE
CONFIG_BT_ENABLED=y
CONFIG_BT_NIMBLE_ENABLED=y
CONFIG_BT_NIMBLE_EXT_ADV=n
CONFIG_BT_NIMBLE_HCI_EVT_BUF_SIZE=70
CONFIG_USE_BLE_ONLY_FOR_COMMISSIONING=n
# FreeRTOS should use legacy API
CONFIG_FREERTOS_ENABLE_BACKWARD_COMPATIBILITY=y
# Disable OpenThread
CONFIG_OPENTHREAD_ENABLED=n
# Disable lwip ipv6 autoconfig
CONFIG_LWIP_IPV6_AUTOCONFIG=n
# Use a custom partition table
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"
# LwIP config for OpenThread
CONFIG_LWIP_IPV6_NUM_ADDRESSES=8
CONFIG_LWIP_MULTICAST_PING=y
# mbedTLS
CONFIG_MBEDTLS_HARDWARE_AES=n
CONFIG_MBEDTLS_HARDWARE_MPI=n
CONFIG_MBEDTLS_HARDWARE_SHA=n
CONFIG_MBEDTLS_HARDWARE_ECC=y
CONFIG_MBEDTLS_ATCA_HW_ECDSA_SIGN=n
CONFIG_MBEDTLS_ATCA_HW_ECDSA_VERIFY=n
CONFIG_MBEDTLS_CMAC_C=y
CONFIG_MBEDTLS_SSL_PROTO_DTLS=y
CONFIG_MBEDTLS_KEY_EXCHANGE_ECJPAKE=y
# MDNS platform
CONFIG_USE_MINIMAL_MDNS=y
CONFIG_ENABLE_EXTENDED_DISCOVERY=y
# Enable OTA Requestor
CONFIG_ENABLE_OTA_REQUESTOR=y
# Disable AP
CONFIG_ENABLE_WIFI_STATION=y
CONFIG_ENABLE_WIFI_AP=n
# Button
CONFIG_BUTTON_PERIOD_TIME_MS=20
CONFIG_BUTTON_LONG_PRESS_TIME_MS=5000
# Enable chip shell
CONFIG_ENABLE_CHIP_SHELL=y
+6 -3
View File
@@ -1,5 +1,4 @@
CONFIG_IDF_TARGET="esp32h2"
CONFIG_IDF_TARGET_ESP32H2_BETA_VERSION_2=y
# Default to 921600 baud when flashing and monitoring device
CONFIG_ESPTOOLPY_BAUD_921600B=y
@@ -9,7 +8,6 @@ CONFIG_ESPTOOLPY_FLASHFREQ_40M=y
CONFIG_ESPTOOLPY_FLASHFREQ="40m"
CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B=y
CONFIG_ESPTOOLPY_MONITOR_BAUD=115200
CONFIG_ESPTOOLPY_FLASHSIZE_2MB=y
# libsodium
CONFIG_LIBSODIUM_USE_MBEDTLS_SHA=y
@@ -27,6 +25,11 @@ CONFIG_FREERTOS_ENABLE_BACKWARD_COMPATIBILITY=y
# Enable OpenThread
CONFIG_OPENTHREAD_ENABLED=y
CONFIG_OPENTHREAD_SRP_CLIENT=y
CONFIG_OPENTHREAD_DNS_CLIENT=y
CONFIG_OPENTHREAD_LOG_LEVEL_DYNAMIC=n
CONFIG_OPENTHREAD_LOG_LEVEL_NOTE=y
CONFIG_OPENTHREAD_CLI=n
# Disable lwip ipv6 autoconfig
CONFIG_LWIP_IPV6_AUTOCONFIG=n
@@ -55,7 +58,7 @@ CONFIG_USE_MINIMAL_MDNS=n
CONFIG_ENABLE_EXTENDED_DISCOVERY=y
# Enable OTA Requestor
CONFIG_ENABLE_OTA_REQUESTOR=n
CONFIG_ENABLE_OTA_REQUESTOR=y
# Disable STA and AP for ESP32H2
CONFIG_ENABLE_WIFI_STATION=n
+2
View File
@@ -15,6 +15,8 @@ if(NOT DEFINED ENV{ESP_MATTER_DEVICE_PATH})
set(ENV{ESP_MATTER_DEVICE_PATH} $ENV{ESP_MATTER_PATH}/device_hal/device/esp32c2_devkit_m)
elseif("${IDF_TARGET}" STREQUAL "esp32h2")
set(ENV{ESP_MATTER_DEVICE_PATH} $ENV{ESP_MATTER_PATH}/device_hal/device/esp32h2_devkit_c)
elseif("${IDF_TARGET}" STREQUAL "esp32c6")
set(ENV{ESP_MATTER_DEVICE_PATH} $ENV{ESP_MATTER_PATH}/device_hal/device/esp32c6_devkit_c)
else()
message(FATAL_ERROR "Unsupported IDF_TARGET")
endif()
+9
View File
@@ -0,0 +1,9 @@
# Name, Type, SubType, Offset, Size, Flags
# Note: Firmware partition offset needs to be 64K aligned, initial 36K (9 sectors) are reserved for bootloader and partition table
esp_secure_cert, 0x3F, ,0xd000, 0x2000, , # Never mark this as an encrypted partition
nvs, data, nvs, 0x10000, 0x6000,
nvs_keys, data, nvs_keys, , 0x1000,
phy_init, data, phy, , 0x1000,
ota_0, app, ota_0, , 0x1C0000,
ota_1, app, ota_1, , 0x1C0000,
ot_storage,data, fat, , 0x6000,
1 # Name, Type, SubType, Offset, Size, Flags
2 # Note: Firmware partition offset needs to be 64K aligned, initial 36K (9 sectors) are reserved for bootloader and partition table
3 esp_secure_cert, 0x3F, ,0xd000, 0x2000, , # Never mark this as an encrypted partition
4 nvs, data, nvs, 0x10000, 0x6000,
5 nvs_keys, data, nvs_keys, , 0x1000,
6 phy_init, data, phy, , 0x1000,
7 ota_0, app, ota_0, , 0x1C0000,
8 ota_1, app, ota_1, , 0x1C0000,
9 ot_storage,data, fat, , 0x6000,
+3 -3
View File
@@ -1,9 +1,9 @@
# Name, Type, SubType, Offset, Size, Flags
# Note: Firmware partition offset needs to be 64K aligned, initial 36K (9 sectors) are reserved for bootloader and partition table
esp_secure_cert, 0x3F, ,0xd000, 0x2000, , # Never mark this as an encrypted partition
esp_secure_cert, 0x3F, ,0xd000, 0x2000, , # Never mark this as an encrypted partition
nvs, data, nvs, 0x10000, 0x6000,
nvs_keys, data, nvs_keys, , 0x1000,
phy_init, data, phy, , 0x1000,
# Temporarily disable ota for ESP32-H2 because the use of flash need to be optimized.
factory, app, factory, , 0x1C0000,
ota_0, app, ota_0, , 0x1C0000,
ota_1, app, ota_1, , 0x1C0000,
ot_storage,data, fat, , 0x6000,
1 # Name, Type, SubType, Offset, Size, Flags
2 # Note: Firmware partition offset needs to be 64K aligned, initial 36K (9 sectors) are reserved for bootloader and partition table
3 esp_secure_cert, 0x3F, ,0xd000, 0x2000, , # Never mark this as an encrypted partition esp_secure_cert, 0x3F, ,0xd000, 0x2000, , # Never mark this as an encrypted partition
4 nvs, data, nvs, 0x10000, 0x6000,
5 nvs_keys, data, nvs_keys, , 0x1000,
6 phy_init, data, phy, , 0x1000,
7 # Temporarily disable ota for ESP32-H2 because the use of flash need to be optimized. ota_0, app, ota_0, , 0x1C0000,
8 factory, app, factory, , 0x1C0000, ota_1, app, ota_1, , 0x1C0000,
9 ot_storage,data, fat, , 0x6000,
@@ -0,0 +1,72 @@
CONFIG_IDF_TARGET="esp32c6"
# Default to 921600 baud when flashing and monitoring device
CONFIG_ESPTOOLPY_BAUD_921600B=y
CONFIG_ESPTOOLPY_BAUD=921600
CONFIG_ESPTOOLPY_COMPRESSED=y
CONFIG_ESPTOOLPY_FLASHFREQ_40M=y
CONFIG_ESPTOOLPY_FLASHFREQ="40m"
CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B=y
CONFIG_ESPTOOLPY_MONITOR_BAUD=115200
# libsodium
CONFIG_LIBSODIUM_USE_MBEDTLS_SHA=y
# NIMBLE
CONFIG_BT_ENABLED=y
CONFIG_BT_NIMBLE_ENABLED=y
CONFIG_BT_NIMBLE_EXT_ADV=n
CONFIG_BT_NIMBLE_HCI_EVT_BUF_SIZE=70
CONFIG_USE_BLE_ONLY_FOR_COMMISSIONING=n
# FreeRTOS should use legacy API
CONFIG_FREERTOS_ENABLE_BACKWARD_COMPATIBILITY=y
# Enable OpenThread
CONFIG_OPENTHREAD_ENABLED=y
CONFIG_OPENTHREAD_SRP_CLIENT=y
CONFIG_OPENTHREAD_DNS_CLIENT=y
CONFIG_OPENTHREAD_LOG_LEVEL_DYNAMIC=n
CONFIG_OPENTHREAD_LOG_LEVEL_NOTE=y
CONFIG_OPENTHREAD_CLI=n
# Disable lwip ipv6 autoconfig
CONFIG_LWIP_IPV6_AUTOCONFIG=n
# Use a custom partition table
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_c6.csv"
# LwIP config for OpenThread
CONFIG_LWIP_IPV6_NUM_ADDRESSES=8
CONFIG_LWIP_MULTICAST_PING=y
# mbedTLS
CONFIG_MBEDTLS_HARDWARE_AES=n
CONFIG_MBEDTLS_HARDWARE_MPI=n
CONFIG_MBEDTLS_HARDWARE_SHA=n
CONFIG_MBEDTLS_HARDWARE_ECC=y
CONFIG_MBEDTLS_ATCA_HW_ECDSA_SIGN=n
CONFIG_MBEDTLS_ATCA_HW_ECDSA_VERIFY=n
CONFIG_MBEDTLS_CMAC_C=y
CONFIG_MBEDTLS_SSL_PROTO_DTLS=y
CONFIG_MBEDTLS_KEY_EXCHANGE_ECJPAKE=y
# MDNS platform
CONFIG_USE_MINIMAL_MDNS=n
CONFIG_ENABLE_EXTENDED_DISCOVERY=y
# Enable OTA Requestor
CONFIG_ENABLE_OTA_REQUESTOR=y
# Disable STA and AP for ESP32C6
CONFIG_ENABLE_WIFI_STATION=n
CONFIG_ENABLE_WIFI_AP=n
# Button
CONFIG_BUTTON_PERIOD_TIME_MS=20
CONFIG_BUTTON_LONG_PRESS_TIME_MS=5000
# Enable chip shell
CONFIG_ENABLE_CHIP_SHELL=y
@@ -1,5 +1,4 @@
CONFIG_IDF_TARGET="esp32h2"
CONFIG_IDF_TARGET_ESP32H2_BETA_VERSION_2=y
# Default to 921600 baud when flashing and monitoring device
CONFIG_ESPTOOLPY_BAUD_921600B=y
@@ -9,7 +8,6 @@ CONFIG_ESPTOOLPY_FLASHFREQ_40M=y
CONFIG_ESPTOOLPY_FLASHFREQ="40m"
CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B=y
CONFIG_ESPTOOLPY_MONITOR_BAUD=115200
CONFIG_ESPTOOLPY_FLASHSIZE_2MB=y
# libsodium
CONFIG_LIBSODIUM_USE_MBEDTLS_SHA=y
@@ -27,6 +25,11 @@ CONFIG_FREERTOS_ENABLE_BACKWARD_COMPATIBILITY=y
# Enable OpenThread
CONFIG_OPENTHREAD_ENABLED=y
CONFIG_OPENTHREAD_SRP_CLIENT=y
CONFIG_OPENTHREAD_DNS_CLIENT=y
CONFIG_OPENTHREAD_LOG_LEVEL_DYNAMIC=n
CONFIG_OPENTHREAD_LOG_LEVEL_NOTE=y
CONFIG_OPENTHREAD_CLI=n
# Disable lwip ipv6 autoconfig
CONFIG_LWIP_IPV6_AUTOCONFIG=n
@@ -55,7 +58,7 @@ CONFIG_USE_MINIMAL_MDNS=n
CONFIG_ENABLE_EXTENDED_DISCOVERY=y
# Enable OTA Requestor
CONFIG_ENABLE_OTA_REQUESTOR=n
CONFIG_ENABLE_OTA_REQUESTOR=y
# Disable STA and AP for ESP32H2
CONFIG_ENABLE_WIFI_STATION=n
+2
View File
@@ -15,6 +15,8 @@ if(NOT DEFINED ENV{ESP_MATTER_DEVICE_PATH})
set(ENV{ESP_MATTER_DEVICE_PATH} $ENV{ESP_MATTER_PATH}/device_hal/device/esp32h2_devkit_c)
elseif("${IDF_TARGET}" STREQUAL "esp32s3")
set(ENV{ESP_MATTER_DEVICE_PATH} $ENV{ESP_MATTER_PATH}/device_hal/device/esp32s3_devkit_c)
elseif("${IDF_TARGET}" STREQUAL "esp32c6")
set(ENV{ESP_MATTER_DEVICE_PATH} $ENV{ESP_MATTER_PATH}/device_hal/device/esp32c6_devkit_c)
else()
message(FATAL_ERROR "Unsupported IDF_TARGET")
endif()
@@ -19,9 +19,8 @@
#pragma once
#include <app-common/zap-generated/af-structs.h>
#include <app-common/zap-generated/cluster-objects.h>
#include <app/InteractionModelEngine.h>
#include <app-common/zap-generated/cluster-objects.h>
#include <app/data-model/DecodableList.h>
#include <app/util/af-enums.h>
#include <app/util/im-client-callbacks.h>
@@ -30,3 +29,4 @@
#include <lib/support/Span.h>
// List specific responses
@@ -33,10 +33,7 @@ namespace Controller {
class DLL_EXPORT OtaSoftwareUpdateProviderCluster : public ClusterBase
{
public:
OtaSoftwareUpdateProviderCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session,
EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::OtaSoftwareUpdateProvider::Id, endpoint)
{}
OtaSoftwareUpdateProviderCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~OtaSoftwareUpdateProviderCluster() {}
};
File diff suppressed because it is too large Load Diff
@@ -1,49 +1,56 @@
/*
*
* Copyright (c) 2022 Project CHIP Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// THIS FILE IS GENERATED BY ZAP
#pragma once
void MatterAccessControlPluginServerInitCallback();
void MatterAdministratorCommissioningPluginServerInitCallback();
void MatterBasicInformationPluginServerInitCallback();
void MatterColorControlPluginServerInitCallback();
void MatterDescriptorPluginServerInitCallback();
void MatterDiagnosticLogsPluginServerInitCallback();
void MatterEthernetNetworkDiagnosticsPluginServerInitCallback();
void MatterFixedLabelPluginServerInitCallback();
void MatterGeneralCommissioningPluginServerInitCallback();
void MatterGeneralDiagnosticsPluginServerInitCallback();
void MatterGroupKeyManagementPluginServerInitCallback();
void MatterGroupsPluginServerInitCallback();
void MatterIdentifyPluginServerInitCallback();
void MatterLevelControlPluginServerInitCallback();
void MatterLocalizationConfigurationPluginServerInitCallback();
void MatterNetworkCommissioningPluginServerInitCallback();
void MatterOccupancySensingPluginServerInitCallback();
void MatterOnOffPluginServerInitCallback();
void MatterOperationalCredentialsPluginServerInitCallback();
void MatterOtaSoftwareUpdateRequestorPluginServerInitCallback();
void MatterSoftwareDiagnosticsPluginServerInitCallback();
void MatterSwitchPluginServerInitCallback();
void MatterThreadNetworkDiagnosticsPluginServerInitCallback();
void MatterTimeFormatLocalizationPluginServerInitCallback();
void MatterUserLabelPluginServerInitCallback();
void MatterWiFiNetworkDiagnosticsPluginServerInitCallback();
#define MATTER_PLUGINS_INIT \
MatterAccessControlPluginServerInitCallback(); \
MatterAdministratorCommissioningPluginServerInitCallback(); \
MatterBasicInformationPluginServerInitCallback(); \
MatterColorControlPluginServerInitCallback(); \
MatterDescriptorPluginServerInitCallback(); \
MatterDiagnosticLogsPluginServerInitCallback(); \
MatterEthernetNetworkDiagnosticsPluginServerInitCallback(); \
MatterFixedLabelPluginServerInitCallback(); \
MatterGeneralCommissioningPluginServerInitCallback(); \
MatterGeneralDiagnosticsPluginServerInitCallback(); \
MatterGroupKeyManagementPluginServerInitCallback(); \
MatterGroupsPluginServerInitCallback(); \
MatterIdentifyPluginServerInitCallback(); \
MatterLevelControlPluginServerInitCallback(); \
MatterLocalizationConfigurationPluginServerInitCallback(); \
MatterNetworkCommissioningPluginServerInitCallback(); \
MatterOccupancySensingPluginServerInitCallback(); \
MatterOnOffPluginServerInitCallback(); \
MatterOperationalCredentialsPluginServerInitCallback(); \
MatterOtaSoftwareUpdateRequestorPluginServerInitCallback(); \
MatterSoftwareDiagnosticsPluginServerInitCallback(); \
MatterSwitchPluginServerInitCallback(); \
MatterThreadNetworkDiagnosticsPluginServerInitCallback(); \
MatterTimeFormatLocalizationPluginServerInitCallback(); \
MatterUserLabelPluginServerInitCallback(); \
MatterWiFiNetworkDiagnosticsPluginServerInitCallback();
#define MATTER_PLUGINS_INIT \
MatterIdentifyPluginServerInitCallback(); \
MatterGroupsPluginServerInitCallback(); \
MatterOnOffPluginServerInitCallback(); \
MatterLevelControlPluginServerInitCallback(); \
MatterDescriptorPluginServerInitCallback(); \
MatterAccessControlPluginServerInitCallback(); \
MatterBasicInformationPluginServerInitCallback(); \
MatterOtaSoftwareUpdateProviderPluginClientInitCallback(); \
MatterOtaSoftwareUpdateRequestorPluginServerInitCallback(); \
MatterLocalizationConfigurationPluginServerInitCallback(); \
MatterTimeFormatLocalizationPluginServerInitCallback(); \
MatterGeneralCommissioningPluginServerInitCallback(); \
MatterNetworkCommissioningPluginServerInitCallback(); \
MatterDiagnosticLogsPluginServerInitCallback(); \
MatterGeneralDiagnosticsPluginServerInitCallback(); \
MatterSoftwareDiagnosticsPluginServerInitCallback(); \
MatterThreadNetworkDiagnosticsPluginServerInitCallback(); \
MatterWiFiNetworkDiagnosticsPluginServerInitCallback(); \
MatterEthernetNetworkDiagnosticsPluginServerInitCallback(); \
MatterSwitchPluginServerInitCallback(); \
MatterAdministratorCommissioningPluginServerInitCallback(); \
MatterOperationalCredentialsPluginServerInitCallback(); \
MatterGroupKeyManagementPluginServerInitCallback(); \
MatterFixedLabelPluginServerInitCallback(); \
MatterUserLabelPluginServerInitCallback(); \
MatterColorControlPluginServerInitCallback(); \
MatterOccupancySensingPluginServerInitCallback();
+113 -113
View File
@@ -31,8 +31,8 @@
#define GENERATED_ACCESS_READ_ATTRIBUTE__CLUSTER { \
/* Cluster: On/Off, Attribute: StartUpOnOff, Privilege: view */ \
/* Cluster: Level Control, Attribute: StartUpCurrentLevel, Privilege: view */ \
31, /* Cluster: Access Control, Attribute: ACL, Privilege: administer */ \
31, /* Cluster: Access Control, Attribute: Extension, Privilege: administer */ \
0x0000001F, /* Cluster: Access Control, Attribute: ACL, Privilege: administer */ \
0x0000001F, /* Cluster: Access Control, Attribute: Extension, Privilege: administer */ \
/* Cluster: Access Control, Attribute: SubjectsPerAccessControlEntry, Privilege: view */ \
/* Cluster: Access Control, Attribute: TargetsPerAccessControlEntry, Privilege: view */ \
/* Cluster: Access Control, Attribute: AccessControlEntriesPerFabric, Privilege: view */ \
@@ -40,15 +40,15 @@
/* Cluster: Basic Information, Attribute: Location, Privilege: view */ \
/* Cluster: Basic Information, Attribute: LocalConfigDisabled, Privilege: view */ \
/* Cluster: General Commissioning, Attribute: Breadcrumb, Privilege: view */ \
49, /* Cluster: Network Commissioning, Attribute: MaxNetworks, Privilege: administer */ \
49, /* Cluster: Network Commissioning, Attribute: Networks, Privilege: administer */ \
0x00000031, /* Cluster: Network Commissioning, Attribute: MaxNetworks, Privilege: administer */ \
0x00000031, /* Cluster: Network Commissioning, Attribute: Networks, Privilege: administer */ \
/* Cluster: Network Commissioning, Attribute: InterfaceEnabled, Privilege: view */ \
49, /* Cluster: Network Commissioning, Attribute: LastNetworkingStatus, Privilege: administer */ \
49, /* Cluster: Network Commissioning, Attribute: LastNetworkID, Privilege: administer */ \
49, /* Cluster: Network Commissioning, Attribute: LastConnectErrorValue, Privilege: administer */ \
62, /* Cluster: Operational Credentials, Attribute: NOCs, Privilege: administer */ \
0x00000031, /* Cluster: Network Commissioning, Attribute: LastNetworkingStatus, Privilege: administer */ \
0x00000031, /* Cluster: Network Commissioning, Attribute: LastNetworkID, Privilege: administer */ \
0x00000031, /* Cluster: Network Commissioning, Attribute: LastConnectErrorValue, Privilege: administer */ \
0x0000003E, /* Cluster: Operational Credentials, Attribute: NOCs, Privilege: administer */ \
/* Cluster: Group Key Management, Attribute: GroupKeyMap, Privilege: view */ \
/* Cluster: User Label, Attribute: label list, Privilege: view */ \
/* Cluster: User Label, Attribute: LabelList, Privilege: view */ \
/* Cluster: Color Control, Attribute: StartUpColorTemperatureMireds, Privilege: view */ \
}
@@ -56,8 +56,8 @@
#define GENERATED_ACCESS_READ_ATTRIBUTE__ATTRIBUTE { \
/* Cluster: On/Off, Attribute: StartUpOnOff, Privilege: view */ \
/* Cluster: Level Control, Attribute: StartUpCurrentLevel, Privilege: view */ \
0, /* Cluster: Access Control, Attribute: ACL, Privilege: administer */ \
1, /* Cluster: Access Control, Attribute: Extension, Privilege: administer */ \
0x00000000, /* Cluster: Access Control, Attribute: ACL, Privilege: administer */ \
0x00000001, /* Cluster: Access Control, Attribute: Extension, Privilege: administer */ \
/* Cluster: Access Control, Attribute: SubjectsPerAccessControlEntry, Privilege: view */ \
/* Cluster: Access Control, Attribute: TargetsPerAccessControlEntry, Privilege: view */ \
/* Cluster: Access Control, Attribute: AccessControlEntriesPerFabric, Privilege: view */ \
@@ -65,15 +65,15 @@
/* Cluster: Basic Information, Attribute: Location, Privilege: view */ \
/* Cluster: Basic Information, Attribute: LocalConfigDisabled, Privilege: view */ \
/* Cluster: General Commissioning, Attribute: Breadcrumb, Privilege: view */ \
0, /* Cluster: Network Commissioning, Attribute: MaxNetworks, Privilege: administer */ \
1, /* Cluster: Network Commissioning, Attribute: Networks, Privilege: administer */ \
0x00000000, /* Cluster: Network Commissioning, Attribute: MaxNetworks, Privilege: administer */ \
0x00000001, /* Cluster: Network Commissioning, Attribute: Networks, Privilege: administer */ \
/* Cluster: Network Commissioning, Attribute: InterfaceEnabled, Privilege: view */ \
5, /* Cluster: Network Commissioning, Attribute: LastNetworkingStatus, Privilege: administer */ \
6, /* Cluster: Network Commissioning, Attribute: LastNetworkID, Privilege: administer */ \
7, /* Cluster: Network Commissioning, Attribute: LastConnectErrorValue, Privilege: administer */ \
0, /* Cluster: Operational Credentials, Attribute: NOCs, Privilege: administer */ \
0x00000005, /* Cluster: Network Commissioning, Attribute: LastNetworkingStatus, Privilege: administer */ \
0x00000006, /* Cluster: Network Commissioning, Attribute: LastNetworkID, Privilege: administer */ \
0x00000007, /* Cluster: Network Commissioning, Attribute: LastConnectErrorValue, Privilege: administer */ \
0x00000000, /* Cluster: Operational Credentials, Attribute: NOCs, Privilege: administer */ \
/* Cluster: Group Key Management, Attribute: GroupKeyMap, Privilege: view */ \
/* Cluster: User Label, Attribute: label list, Privilege: view */ \
/* Cluster: User Label, Attribute: LabelList, Privilege: view */ \
/* Cluster: Color Control, Attribute: StartUpColorTemperatureMireds, Privilege: view */ \
}
@@ -98,7 +98,7 @@
kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Attribute: LastConnectErrorValue, Privilege: administer */ \
kMatterAccessPrivilegeAdminister, /* Cluster: Operational Credentials, Attribute: NOCs, Privilege: administer */ \
/* Cluster: Group Key Management, Attribute: GroupKeyMap, Privilege: view */ \
/* Cluster: User Label, Attribute: label list, Privilege: view */ \
/* Cluster: User Label, Attribute: LabelList, Privilege: view */ \
/* Cluster: Color Control, Attribute: StartUpColorTemperatureMireds, Privilege: view */ \
}
@@ -106,34 +106,34 @@
// Parallel array data (*cluster*, attribute, privilege) for write attribute
#define GENERATED_ACCESS_WRITE_ATTRIBUTE__CLUSTER { \
6, /* Cluster: On/Off, Attribute: StartUpOnOff, Privilege: manage */ \
8, /* Cluster: Level Control, Attribute: StartUpCurrentLevel, Privilege: manage */ \
31, /* Cluster: Access Control, Attribute: ACL, Privilege: administer */ \
31, /* Cluster: Access Control, Attribute: Extension, Privilege: administer */ \
40, /* Cluster: Basic Information, Attribute: NodeLabel, Privilege: manage */ \
40, /* Cluster: Basic Information, Attribute: Location, Privilege: administer */ \
40, /* Cluster: Basic Information, Attribute: LocalConfigDisabled, Privilege: manage */ \
48, /* Cluster: General Commissioning, Attribute: Breadcrumb, Privilege: administer */ \
49, /* Cluster: Network Commissioning, Attribute: InterfaceEnabled, Privilege: administer */ \
63, /* Cluster: Group Key Management, Attribute: GroupKeyMap, Privilege: manage */ \
65, /* Cluster: User Label, Attribute: label list, Privilege: manage */ \
768, /* Cluster: Color Control, Attribute: StartUpColorTemperatureMireds, Privilege: manage */ \
0x00000006, /* Cluster: On/Off, Attribute: StartUpOnOff, Privilege: manage */ \
0x00000008, /* Cluster: Level Control, Attribute: StartUpCurrentLevel, Privilege: manage */ \
0x0000001F, /* Cluster: Access Control, Attribute: ACL, Privilege: administer */ \
0x0000001F, /* Cluster: Access Control, Attribute: Extension, Privilege: administer */ \
0x00000028, /* Cluster: Basic Information, Attribute: NodeLabel, Privilege: manage */ \
0x00000028, /* Cluster: Basic Information, Attribute: Location, Privilege: administer */ \
0x00000028, /* Cluster: Basic Information, Attribute: LocalConfigDisabled, Privilege: manage */ \
0x00000030, /* Cluster: General Commissioning, Attribute: Breadcrumb, Privilege: administer */ \
0x00000031, /* Cluster: Network Commissioning, Attribute: InterfaceEnabled, Privilege: administer */ \
0x0000003F, /* Cluster: Group Key Management, Attribute: GroupKeyMap, Privilege: manage */ \
0x00000041, /* Cluster: User Label, Attribute: LabelList, Privilege: manage */ \
0x00000300, /* Cluster: Color Control, Attribute: StartUpColorTemperatureMireds, Privilege: manage */ \
}
// Parallel array data (cluster, *attribute*, privilege) for write attribute
#define GENERATED_ACCESS_WRITE_ATTRIBUTE__ATTRIBUTE { \
16387, /* Cluster: On/Off, Attribute: StartUpOnOff, Privilege: manage */ \
16384, /* Cluster: Level Control, Attribute: StartUpCurrentLevel, Privilege: manage */ \
0, /* Cluster: Access Control, Attribute: ACL, Privilege: administer */ \
1, /* Cluster: Access Control, Attribute: Extension, Privilege: administer */ \
5, /* Cluster: Basic Information, Attribute: NodeLabel, Privilege: manage */ \
6, /* Cluster: Basic Information, Attribute: Location, Privilege: administer */ \
16, /* Cluster: Basic Information, Attribute: LocalConfigDisabled, Privilege: manage */ \
0, /* Cluster: General Commissioning, Attribute: Breadcrumb, Privilege: administer */ \
4, /* Cluster: Network Commissioning, Attribute: InterfaceEnabled, Privilege: administer */ \
0, /* Cluster: Group Key Management, Attribute: GroupKeyMap, Privilege: manage */ \
0, /* Cluster: User Label, Attribute: label list, Privilege: manage */ \
16400, /* Cluster: Color Control, Attribute: StartUpColorTemperatureMireds, Privilege: manage */ \
0x00004003, /* Cluster: On/Off, Attribute: StartUpOnOff, Privilege: manage */ \
0x00004000, /* Cluster: Level Control, Attribute: StartUpCurrentLevel, Privilege: manage */ \
0x00000000, /* Cluster: Access Control, Attribute: ACL, Privilege: administer */ \
0x00000001, /* Cluster: Access Control, Attribute: Extension, Privilege: administer */ \
0x00000005, /* Cluster: Basic Information, Attribute: NodeLabel, Privilege: manage */ \
0x00000006, /* Cluster: Basic Information, Attribute: Location, Privilege: administer */ \
0x00000010, /* Cluster: Basic Information, Attribute: LocalConfigDisabled, Privilege: manage */ \
0x00000000, /* Cluster: General Commissioning, Attribute: Breadcrumb, Privilege: administer */ \
0x00000004, /* Cluster: Network Commissioning, Attribute: InterfaceEnabled, Privilege: administer */ \
0x00000000, /* Cluster: Group Key Management, Attribute: GroupKeyMap, Privilege: manage */ \
0x00000000, /* Cluster: User Label, Attribute: LabelList, Privilege: manage */ \
0x00004010, /* Cluster: Color Control, Attribute: StartUpColorTemperatureMireds, Privilege: manage */ \
}
// Parallel array data (cluster, attribute, *privilege*) for write attribute
@@ -148,7 +148,7 @@
kMatterAccessPrivilegeAdminister, /* Cluster: General Commissioning, Attribute: Breadcrumb, Privilege: administer */ \
kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Attribute: InterfaceEnabled, Privilege: administer */ \
kMatterAccessPrivilegeManage, /* Cluster: Group Key Management, Attribute: GroupKeyMap, Privilege: manage */ \
kMatterAccessPrivilegeManage, /* Cluster: User Label, Attribute: label list, Privilege: manage */ \
kMatterAccessPrivilegeManage, /* Cluster: User Label, Attribute: LabelList, Privilege: manage */ \
kMatterAccessPrivilegeManage, /* Cluster: Color Control, Attribute: StartUpColorTemperatureMireds, Privilege: manage */ \
}
@@ -156,72 +156,72 @@
// Parallel array data (*cluster*, command, privilege) for invoke command
#define GENERATED_ACCESS_INVOKE_COMMAND__CLUSTER { \
3, /* Cluster: Identify, Command: Identify, Privilege: manage */ \
3, /* Cluster: Identify, Command: TriggerEffect, Privilege: manage */ \
4, /* Cluster: Groups, Command: AddGroup, Privilege: manage */ \
4, /* Cluster: Groups, Command: RemoveGroup, Privilege: manage */ \
4, /* Cluster: Groups, Command: RemoveAllGroups, Privilege: manage */ \
4, /* Cluster: Groups, Command: AddGroupIfIdentifying, Privilege: manage */ \
48, /* Cluster: General Commissioning, Command: ArmFailSafe, Privilege: administer */ \
48, /* Cluster: General Commissioning, Command: SetRegulatoryConfig, Privilege: administer */ \
48, /* Cluster: General Commissioning, Command: CommissioningComplete, Privilege: administer */ \
49, /* Cluster: Network Commissioning, Command: ScanNetworks, Privilege: administer */ \
49, /* Cluster: Network Commissioning, Command: AddOrUpdateWiFiNetwork, Privilege: administer */ \
49, /* Cluster: Network Commissioning, Command: AddOrUpdateThreadNetwork, Privilege: administer */ \
49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \
49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \
49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \
51, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \
60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \
60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \
60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \
62, /* Cluster: Operational Credentials, Command: AttestationRequest, Privilege: administer */ \
62, /* Cluster: Operational Credentials, Command: CertificateChainRequest, Privilege: administer */ \
62, /* Cluster: Operational Credentials, Command: CSRRequest, Privilege: administer */ \
62, /* Cluster: Operational Credentials, Command: AddNOC, Privilege: administer */ \
62, /* Cluster: Operational Credentials, Command: UpdateNOC, Privilege: administer */ \
62, /* Cluster: Operational Credentials, Command: UpdateFabricLabel, Privilege: administer */ \
62, /* Cluster: Operational Credentials, Command: RemoveFabric, Privilege: administer */ \
62, /* Cluster: Operational Credentials, Command: AddTrustedRootCertificate, Privilege: administer */ \
63, /* Cluster: Group Key Management, Command: KeySetWrite, Privilege: administer */ \
63, /* Cluster: Group Key Management, Command: KeySetRead, Privilege: administer */ \
63, /* Cluster: Group Key Management, Command: KeySetRemove, Privilege: administer */ \
63, /* Cluster: Group Key Management, Command: KeySetReadAllIndices, Privilege: administer */ \
0x00000003, /* Cluster: Identify, Command: Identify, Privilege: manage */ \
0x00000003, /* Cluster: Identify, Command: TriggerEffect, Privilege: manage */ \
0x00000004, /* Cluster: Groups, Command: AddGroup, Privilege: manage */ \
0x00000004, /* Cluster: Groups, Command: RemoveGroup, Privilege: manage */ \
0x00000004, /* Cluster: Groups, Command: RemoveAllGroups, Privilege: manage */ \
0x00000004, /* Cluster: Groups, Command: AddGroupIfIdentifying, Privilege: manage */ \
0x00000030, /* Cluster: General Commissioning, Command: ArmFailSafe, Privilege: administer */ \
0x00000030, /* Cluster: General Commissioning, Command: SetRegulatoryConfig, Privilege: administer */ \
0x00000030, /* Cluster: General Commissioning, Command: CommissioningComplete, Privilege: administer */ \
0x00000031, /* Cluster: Network Commissioning, Command: ScanNetworks, Privilege: administer */ \
0x00000031, /* Cluster: Network Commissioning, Command: AddOrUpdateWiFiNetwork, Privilege: administer */ \
0x00000031, /* Cluster: Network Commissioning, Command: AddOrUpdateThreadNetwork, Privilege: administer */ \
0x00000031, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \
0x00000031, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \
0x00000031, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \
0x00000033, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \
0x0000003C, /* Cluster: Administrator Commissioning, Command: OpenCommissioningWindow, Privilege: administer */ \
0x0000003C, /* Cluster: Administrator Commissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \
0x0000003C, /* Cluster: Administrator Commissioning, Command: RevokeCommissioning, Privilege: administer */ \
0x0000003E, /* Cluster: Operational Credentials, Command: AttestationRequest, Privilege: administer */ \
0x0000003E, /* Cluster: Operational Credentials, Command: CertificateChainRequest, Privilege: administer */ \
0x0000003E, /* Cluster: Operational Credentials, Command: CSRRequest, Privilege: administer */ \
0x0000003E, /* Cluster: Operational Credentials, Command: AddNOC, Privilege: administer */ \
0x0000003E, /* Cluster: Operational Credentials, Command: UpdateNOC, Privilege: administer */ \
0x0000003E, /* Cluster: Operational Credentials, Command: UpdateFabricLabel, Privilege: administer */ \
0x0000003E, /* Cluster: Operational Credentials, Command: RemoveFabric, Privilege: administer */ \
0x0000003E, /* Cluster: Operational Credentials, Command: AddTrustedRootCertificate, Privilege: administer */ \
0x0000003F, /* Cluster: Group Key Management, Command: KeySetWrite, Privilege: administer */ \
0x0000003F, /* Cluster: Group Key Management, Command: KeySetRead, Privilege: administer */ \
0x0000003F, /* Cluster: Group Key Management, Command: KeySetRemove, Privilege: administer */ \
0x0000003F, /* Cluster: Group Key Management, Command: KeySetReadAllIndices, Privilege: administer */ \
}
// Parallel array data (cluster, *command*, privilege) for invoke command
#define GENERATED_ACCESS_INVOKE_COMMAND__COMMAND { \
0, /* Cluster: Identify, Command: Identify, Privilege: manage */ \
64, /* Cluster: Identify, Command: TriggerEffect, Privilege: manage */ \
0, /* Cluster: Groups, Command: AddGroup, Privilege: manage */ \
3, /* Cluster: Groups, Command: RemoveGroup, Privilege: manage */ \
4, /* Cluster: Groups, Command: RemoveAllGroups, Privilege: manage */ \
5, /* Cluster: Groups, Command: AddGroupIfIdentifying, Privilege: manage */ \
0, /* Cluster: General Commissioning, Command: ArmFailSafe, Privilege: administer */ \
2, /* Cluster: General Commissioning, Command: SetRegulatoryConfig, Privilege: administer */ \
4, /* Cluster: General Commissioning, Command: CommissioningComplete, Privilege: administer */ \
0, /* Cluster: Network Commissioning, Command: ScanNetworks, Privilege: administer */ \
2, /* Cluster: Network Commissioning, Command: AddOrUpdateWiFiNetwork, Privilege: administer */ \
3, /* Cluster: Network Commissioning, Command: AddOrUpdateThreadNetwork, Privilege: administer */ \
4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \
6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \
8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \
0, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \
0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \
1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \
2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \
0, /* Cluster: Operational Credentials, Command: AttestationRequest, Privilege: administer */ \
2, /* Cluster: Operational Credentials, Command: CertificateChainRequest, Privilege: administer */ \
4, /* Cluster: Operational Credentials, Command: CSRRequest, Privilege: administer */ \
6, /* Cluster: Operational Credentials, Command: AddNOC, Privilege: administer */ \
7, /* Cluster: Operational Credentials, Command: UpdateNOC, Privilege: administer */ \
9, /* Cluster: Operational Credentials, Command: UpdateFabricLabel, Privilege: administer */ \
10, /* Cluster: Operational Credentials, Command: RemoveFabric, Privilege: administer */ \
11, /* Cluster: Operational Credentials, Command: AddTrustedRootCertificate, Privilege: administer */ \
0, /* Cluster: Group Key Management, Command: KeySetWrite, Privilege: administer */ \
1, /* Cluster: Group Key Management, Command: KeySetRead, Privilege: administer */ \
3, /* Cluster: Group Key Management, Command: KeySetRemove, Privilege: administer */ \
4, /* Cluster: Group Key Management, Command: KeySetReadAllIndices, Privilege: administer */ \
0x00000000, /* Cluster: Identify, Command: Identify, Privilege: manage */ \
0x00000040, /* Cluster: Identify, Command: TriggerEffect, Privilege: manage */ \
0x00000000, /* Cluster: Groups, Command: AddGroup, Privilege: manage */ \
0x00000003, /* Cluster: Groups, Command: RemoveGroup, Privilege: manage */ \
0x00000004, /* Cluster: Groups, Command: RemoveAllGroups, Privilege: manage */ \
0x00000005, /* Cluster: Groups, Command: AddGroupIfIdentifying, Privilege: manage */ \
0x00000000, /* Cluster: General Commissioning, Command: ArmFailSafe, Privilege: administer */ \
0x00000002, /* Cluster: General Commissioning, Command: SetRegulatoryConfig, Privilege: administer */ \
0x00000004, /* Cluster: General Commissioning, Command: CommissioningComplete, Privilege: administer */ \
0x00000000, /* Cluster: Network Commissioning, Command: ScanNetworks, Privilege: administer */ \
0x00000002, /* Cluster: Network Commissioning, Command: AddOrUpdateWiFiNetwork, Privilege: administer */ \
0x00000003, /* Cluster: Network Commissioning, Command: AddOrUpdateThreadNetwork, Privilege: administer */ \
0x00000004, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \
0x00000006, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \
0x00000008, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \
0x00000000, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \
0x00000000, /* Cluster: Administrator Commissioning, Command: OpenCommissioningWindow, Privilege: administer */ \
0x00000001, /* Cluster: Administrator Commissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \
0x00000002, /* Cluster: Administrator Commissioning, Command: RevokeCommissioning, Privilege: administer */ \
0x00000000, /* Cluster: Operational Credentials, Command: AttestationRequest, Privilege: administer */ \
0x00000002, /* Cluster: Operational Credentials, Command: CertificateChainRequest, Privilege: administer */ \
0x00000004, /* Cluster: Operational Credentials, Command: CSRRequest, Privilege: administer */ \
0x00000006, /* Cluster: Operational Credentials, Command: AddNOC, Privilege: administer */ \
0x00000007, /* Cluster: Operational Credentials, Command: UpdateNOC, Privilege: administer */ \
0x00000009, /* Cluster: Operational Credentials, Command: UpdateFabricLabel, Privilege: administer */ \
0x0000000A, /* Cluster: Operational Credentials, Command: RemoveFabric, Privilege: administer */ \
0x0000000B, /* Cluster: Operational Credentials, Command: AddTrustedRootCertificate, Privilege: administer */ \
0x00000000, /* Cluster: Group Key Management, Command: KeySetWrite, Privilege: administer */ \
0x00000001, /* Cluster: Group Key Management, Command: KeySetRead, Privilege: administer */ \
0x00000003, /* Cluster: Group Key Management, Command: KeySetRemove, Privilege: administer */ \
0x00000004, /* Cluster: Group Key Management, Command: KeySetReadAllIndices, Privilege: administer */ \
}
// Parallel array data (cluster, command, *privilege*) for invoke command
@@ -242,9 +242,9 @@
kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \
kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \
kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \
kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \
kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \
kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \
kMatterAccessPrivilegeAdminister, /* Cluster: Administrator Commissioning, Command: OpenCommissioningWindow, Privilege: administer */ \
kMatterAccessPrivilegeAdminister, /* Cluster: Administrator Commissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \
kMatterAccessPrivilegeAdminister, /* Cluster: Administrator Commissioning, Command: RevokeCommissioning, Privilege: administer */ \
kMatterAccessPrivilegeAdminister, /* Cluster: Operational Credentials, Command: AttestationRequest, Privilege: administer */ \
kMatterAccessPrivilegeAdminister, /* Cluster: Operational Credentials, Command: CertificateChainRequest, Privilege: administer */ \
kMatterAccessPrivilegeAdminister, /* Cluster: Operational Credentials, Command: CSRRequest, Privilege: administer */ \
@@ -263,14 +263,14 @@
// Parallel array data (*cluster*, event, privilege) for read event
#define GENERATED_ACCESS_READ_EVENT__CLUSTER { \
31, /* Cluster: Access Control, Event: AccessControlEntryChanged, Privilege: administer */ \
31, /* Cluster: Access Control, Event: AccessControlExtensionChanged, Privilege: administer */ \
0x0000001F, /* Cluster: Access Control, Event: AccessControlEntryChanged, Privilege: administer */ \
0x0000001F, /* Cluster: Access Control, Event: AccessControlExtensionChanged, Privilege: administer */ \
}
// Parallel array data (cluster, *event*, privilege) for read event
#define GENERATED_ACCESS_READ_EVENT__EVENT { \
0, /* Cluster: Access Control, Event: AccessControlEntryChanged, Privilege: administer */ \
1, /* Cluster: Access Control, Event: AccessControlExtensionChanged, Privilege: administer */ \
0x00000000, /* Cluster: Access Control, Event: AccessControlEntryChanged, Privilege: administer */ \
0x00000001, /* Cluster: Access Control, Event: AccessControlExtensionChanged, Privilege: administer */ \
}
// Parallel array data (cluster, event, *privilege*) for read event
File diff suppressed because it is too large Load Diff
@@ -20,14 +20,6 @@
// Prevent multiple inclusion
#pragma once
// User options for plugin Binding Table Library
#define EMBER_BINDING_TABLE_SIZE 10
/**** Network Section ****/
#define EMBER_SUPPORTED_NETWORKS (1)
#define EMBER_APS_UNICAST_MESSAGE_COUNT 10
/**** Cluster endpoint counts ****/
#define EMBER_AF_IDENTIFY_CLUSTER_SERVER_ENDPOINT_COUNT (1)
#define EMBER_AF_GROUPS_CLUSTER_SERVER_ENDPOINT_COUNT (2)
@@ -64,16 +56,19 @@
#define EMBER_AF_PLUGIN_IDENTIFY_SERVER
#define EMBER_AF_PLUGIN_IDENTIFY
// Use this macro to check if the server side of the Groups cluster is included
#define ZCL_USING_GROUPS_CLUSTER_SERVER
#define EMBER_AF_PLUGIN_GROUPS_SERVER
#define EMBER_AF_PLUGIN_GROUPS
// Use this macro to check if the server side of the On/Off cluster is included
#define ZCL_USING_ON_OFF_CLUSTER_SERVER
#define EMBER_AF_PLUGIN_ON_OFF_SERVER
#define EMBER_AF_PLUGIN_ON_OFF
// Use this macro to check if the server side of the Level Control cluster is included
#define ZCL_USING_LEVEL_CONTROL_CLUSTER_SERVER
#define EMBER_AF_PLUGIN_LEVEL_CONTROL_SERVER
@@ -83,110 +78,132 @@
#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL 0
#define EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE 0
// Use this macro to check if the server side of the Descriptor cluster is included
#define ZCL_USING_DESCRIPTOR_CLUSTER_SERVER
#define EMBER_AF_PLUGIN_DESCRIPTOR_SERVER
#define EMBER_AF_PLUGIN_DESCRIPTOR
// Use this macro to check if the server side of the Access Control cluster is included
#define ZCL_USING_ACCESS_CONTROL_CLUSTER_SERVER
#define EMBER_AF_PLUGIN_ACCESS_CONTROL_SERVER
#define EMBER_AF_PLUGIN_ACCESS_CONTROL
// Use this macro to check if the server side of the Basic Information cluster is included
#define ZCL_USING_BASIC_INFORMATION_CLUSTER_SERVER
#define EMBER_AF_PLUGIN_BASIC_INFORMATION_SERVER
#define EMBER_AF_PLUGIN_BASIC_INFORMATION
// Use this macro to check if the client side of the OTA Software Update Provider cluster is included
#define ZCL_USING_OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER_CLIENT
#define EMBER_AF_PLUGIN_OTA_SOFTWARE_UPDATE_PROVIDER_CLIENT
// Use this macro to check if the server side of the OTA Software Update Requestor cluster is included
#define ZCL_USING_OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER_SERVER
#define EMBER_AF_PLUGIN_OTA_SOFTWARE_UPDATE_REQUESTOR_SERVER
#define EMBER_AF_PLUGIN_OTA_SOFTWARE_UPDATE_REQUESTOR
// Use this macro to check if the server side of the Localization Configuration cluster is included
#define ZCL_USING_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER
#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION_SERVER
#define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION
// Use this macro to check if the server side of the Time Format Localization cluster is included
#define ZCL_USING_TIME_FORMAT_LOCALIZATION_CLUSTER_SERVER
#define EMBER_AF_PLUGIN_TIME_FORMAT_LOCALIZATION_SERVER
#define EMBER_AF_PLUGIN_TIME_FORMAT_LOCALIZATION
// Use this macro to check if the server side of the General Commissioning cluster is included
#define ZCL_USING_GENERAL_COMMISSIONING_CLUSTER_SERVER
#define EMBER_AF_PLUGIN_GENERAL_COMMISSIONING_SERVER
#define EMBER_AF_PLUGIN_GENERAL_COMMISSIONING
// Use this macro to check if the server side of the Network Commissioning cluster is included
#define ZCL_USING_NETWORK_COMMISSIONING_CLUSTER_SERVER
#define EMBER_AF_PLUGIN_NETWORK_COMMISSIONING_SERVER
#define EMBER_AF_PLUGIN_NETWORK_COMMISSIONING
// Use this macro to check if the server side of the Diagnostic Logs cluster is included
#define ZCL_USING_DIAGNOSTIC_LOGS_CLUSTER_SERVER
#define EMBER_AF_PLUGIN_DIAGNOSTIC_LOGS_SERVER
#define EMBER_AF_PLUGIN_DIAGNOSTIC_LOGS
// Use this macro to check if the server side of the General Diagnostics cluster is included
#define ZCL_USING_GENERAL_DIAGNOSTICS_CLUSTER_SERVER
#define EMBER_AF_PLUGIN_GENERAL_DIAGNOSTICS_SERVER
#define EMBER_AF_PLUGIN_GENERAL_DIAGNOSTICS
// Use this macro to check if the server side of the Software Diagnostics cluster is included
#define ZCL_USING_SOFTWARE_DIAGNOSTICS_CLUSTER_SERVER
#define EMBER_AF_PLUGIN_SOFTWARE_DIAGNOSTICS_SERVER
#define EMBER_AF_PLUGIN_SOFTWARE_DIAGNOSTICS
// Use this macro to check if the server side of the Thread Network Diagnostics cluster is included
#define ZCL_USING_THREAD_NETWORK_DIAGNOSTICS_CLUSTER_SERVER
#define EMBER_AF_PLUGIN_THREAD_NETWORK_DIAGNOSTICS_SERVER
#define EMBER_AF_PLUGIN_THREAD_NETWORK_DIAGNOSTICS
// Use this macro to check if the server side of the WiFi Network Diagnostics cluster is included
#define ZCL_USING_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_SERVER
#define EMBER_AF_PLUGIN_WI_FI_NETWORK_DIAGNOSTICS_SERVER
#define EMBER_AF_PLUGIN_WI_FI_NETWORK_DIAGNOSTICS
// Use this macro to check if the server side of the Ethernet Network Diagnostics cluster is included
#define ZCL_USING_ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER_SERVER
#define EMBER_AF_PLUGIN_ETHERNET_NETWORK_DIAGNOSTICS_SERVER
#define EMBER_AF_PLUGIN_ETHERNET_NETWORK_DIAGNOSTICS
// Use this macro to check if the server side of the Switch cluster is included
#define ZCL_USING_SWITCH_CLUSTER_SERVER
#define EMBER_AF_PLUGIN_SWITCH_SERVER
#define EMBER_AF_PLUGIN_SWITCH
// Use this macro to check if the server side of the AdministratorCommissioning cluster is included
// Use this macro to check if the server side of the Administrator Commissioning cluster is included
#define ZCL_USING_ADMINISTRATOR_COMMISSIONING_CLUSTER_SERVER
#define EMBER_AF_PLUGIN_ADMINISTRATOR_COMMISSIONING_SERVER
#define EMBER_AF_PLUGIN_ADMINISTRATOR_COMMISSIONING
// Use this macro to check if the server side of the Operational Credentials cluster is included
#define ZCL_USING_OPERATIONAL_CREDENTIALS_CLUSTER_SERVER
#define EMBER_AF_PLUGIN_OPERATIONAL_CREDENTIALS_SERVER
#define EMBER_AF_PLUGIN_OPERATIONAL_CREDENTIALS
// Use this macro to check if the server side of the Group Key Management cluster is included
#define ZCL_USING_GROUP_KEY_MANAGEMENT_CLUSTER_SERVER
#define EMBER_AF_PLUGIN_GROUP_KEY_MANAGEMENT_SERVER
#define EMBER_AF_PLUGIN_GROUP_KEY_MANAGEMENT
// Use this macro to check if the server side of the Fixed Label cluster is included
#define ZCL_USING_FIXED_LABEL_CLUSTER_SERVER
#define EMBER_AF_PLUGIN_FIXED_LABEL_SERVER
#define EMBER_AF_PLUGIN_FIXED_LABEL
// Use this macro to check if the server side of the User Label cluster is included
#define ZCL_USING_USER_LABEL_CLUSTER_SERVER
#define EMBER_AF_PLUGIN_USER_LABEL_SERVER
#define EMBER_AF_PLUGIN_USER_LABEL
// Use this macro to check if the server side of the Color Control cluster is included
#define ZCL_USING_COLOR_CONTROL_CLUSTER_SERVER
#define EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER
@@ -196,7 +213,9 @@
#define EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP
#define EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_HSV
// Use this macro to check if the server side of the Occupancy Sensing cluster is included
#define ZCL_USING_OCCUPANCY_SENSING_CLUSTER_SERVER
#define EMBER_AF_PLUGIN_OCCUPANCY_SENSING_SERVER
#define EMBER_AF_PLUGIN_OCCUPANCY_SENSING
File diff suppressed because it is too large Load Diff
+196 -49
View File
@@ -1,5 +1,5 @@
{
"featureLevel": 80,
"featureLevel": 92,
"creator": "zap",
"keyValuePairs": [
{
@@ -83,7 +83,7 @@
"enabled": 0,
"attributes": [
{
"name": "identify time",
"name": "IdentifyTime",
"code": 0,
"mfgCode": null,
"side": "server",
@@ -235,7 +235,7 @@
],
"attributes": [
{
"name": "name support",
"name": "NameSupport",
"code": 0,
"mfgCode": null,
"side": "server",
@@ -622,7 +622,7 @@
"name": "On/off Switch Configuration",
"code": 7,
"mfgCode": null,
"define": "ON_OFF_SWITCH_CONFIG_CLUSTER",
"define": "ON_OFF_SWITCH_CONFIGURATION_CLUSTER",
"side": "client",
"enabled": 0,
"attributes": [
@@ -648,7 +648,7 @@
"name": "On/off Switch Configuration",
"code": 7,
"mfgCode": null,
"define": "ON_OFF_SWITCH_CONFIG_CLUSTER",
"define": "ON_OFF_SWITCH_CONFIGURATION_CLUSTER",
"side": "server",
"enabled": 0,
"attributes": [
@@ -1076,7 +1076,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "3",
"defaultValue": "4",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -1130,13 +1130,29 @@
"maxInterval": 65534,
"reportableChange": 0
}
],
"events": [
{
"name": "AccessControlEntryChanged",
"code": 0,
"mfgCode": null,
"side": "server",
"included": 1
},
{
"name": "AccessControlExtensionChanged",
"code": 1,
"mfgCode": null,
"side": "server",
"included": 1
}
]
},
{
"name": "Basic",
"name": "Basic Information",
"code": 40,
"mfgCode": null,
"define": "BASIC_CLUSTER",
"define": "BASIC_INFORMATION_CLUSTER",
"side": "client",
"enabled": 0,
"attributes": [
@@ -1159,10 +1175,10 @@
]
},
{
"name": "Basic",
"name": "Basic Information",
"code": 40,
"mfgCode": null,
"define": "BASIC_CLUSTER",
"define": "BASIC_INFORMATION_CLUSTER",
"side": "server",
"enabled": 1,
"attributes": [
@@ -1518,13 +1534,36 @@
"maxInterval": 65344,
"reportableChange": 0
}
],
"events": [
{
"name": "StartUp",
"code": 0,
"mfgCode": null,
"side": "server",
"included": 1
},
{
"name": "ShutDown",
"code": 1,
"mfgCode": null,
"side": "server",
"included": 1
},
{
"name": "Leave",
"code": 2,
"mfgCode": null,
"side": "server",
"included": 1
}
]
},
{
"name": "OTA Software Update Provider",
"code": 41,
"mfgCode": null,
"define": "OTA_PROVIDER_CLUSTER",
"define": "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER",
"side": "client",
"enabled": 1,
"commands": [
@@ -1576,7 +1615,7 @@
"name": "OTA Software Update Provider",
"code": 41,
"mfgCode": null,
"define": "OTA_PROVIDER_CLUSTER",
"define": "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER",
"side": "server",
"enabled": 0,
"commands": [
@@ -1652,12 +1691,12 @@
"name": "OTA Software Update Requestor",
"code": 42,
"mfgCode": null,
"define": "OTA_REQUESTOR_CLUSTER",
"define": "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER",
"side": "client",
"enabled": 0,
"commands": [
{
"name": "AnnounceOtaProvider",
"name": "AnnounceOTAProvider",
"code": 0,
"mfgCode": null,
"source": "client",
@@ -1688,12 +1727,12 @@
"name": "OTA Software Update Requestor",
"code": 42,
"mfgCode": null,
"define": "OTA_REQUESTOR_CLUSTER",
"define": "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER",
"side": "server",
"enabled": 1,
"attributes": [
{
"name": "DefaultOtaProviders",
"name": "DefaultOTAProviders",
"code": 0,
"mfgCode": null,
"side": "server",
@@ -1804,6 +1843,29 @@
"maxInterval": 65344,
"reportableChange": 0
}
],
"events": [
{
"name": "StateTransition",
"code": 0,
"mfgCode": null,
"side": "server",
"included": 1
},
{
"name": "VersionApplied",
"code": 1,
"mfgCode": null,
"side": "server",
"included": 1
},
{
"name": "DownloadError",
"code": 2,
"mfgCode": null,
"side": "server",
"included": 1
}
]
},
{
@@ -1909,7 +1971,7 @@
"code": 0,
"mfgCode": null,
"side": "server",
"type": "HourFormat",
"type": "HourFormatEnum",
"included": 1,
"storageOption": "NVM",
"singleton": 0,
@@ -1925,7 +1987,7 @@
"code": 1,
"mfgCode": null,
"side": "server",
"type": "CalendarType",
"type": "CalendarTypeEnum",
"included": 1,
"storageOption": "NVM",
"singleton": 0,
@@ -2007,7 +2069,7 @@
"code": 0,
"mfgCode": null,
"side": "server",
"type": "TempUnit",
"type": "TempUnitEnum",
"included": 0,
"storageOption": "NVM",
"singleton": 0,
@@ -2685,11 +2747,11 @@
"reportableChange": 0
},
{
"name": "BootReasons",
"name": "BootReason",
"code": 4,
"mfgCode": null,
"side": "server",
"type": "enum8",
"type": "BootReasonEnum",
"included": 1,
"storageOption": "External",
"singleton": 0,
@@ -2796,6 +2858,36 @@
"maxInterval": 65344,
"reportableChange": 0
}
],
"events": [
{
"name": "HardwareFaultChange",
"code": 0,
"mfgCode": null,
"side": "server",
"included": 1
},
{
"name": "RadioFaultChange",
"code": 1,
"mfgCode": null,
"side": "server",
"included": 1
},
{
"name": "NetworkFaultChange",
"code": 2,
"mfgCode": null,
"side": "server",
"included": 1
},
{
"name": "BootReason",
"code": 3,
"mfgCode": null,
"side": "server",
"included": 1
}
]
},
{
@@ -2985,7 +3077,7 @@
"enabled": 1,
"attributes": [
{
"name": "channel",
"name": "Channel",
"code": 0,
"mfgCode": null,
"side": "server",
@@ -3097,7 +3189,7 @@
"reportableChange": 0
},
{
"name": "NeighborTableList",
"name": "NeighborTable",
"code": 7,
"mfgCode": null,
"side": "server",
@@ -3113,7 +3205,7 @@
"reportableChange": 0
},
{
"name": "RouteTableList",
"name": "RouteTable",
"code": 8,
"mfgCode": null,
"side": "server",
@@ -3145,7 +3237,7 @@
"reportableChange": 0
},
{
"name": "weighting",
"name": "Weighting",
"code": 10,
"mfgCode": null,
"side": "server",
@@ -4071,7 +4163,7 @@
"enabled": 1,
"attributes": [
{
"name": "bssid",
"name": "BSSID",
"code": 0,
"mfgCode": null,
"side": "server",
@@ -4091,7 +4183,7 @@
"code": 1,
"mfgCode": null,
"side": "server",
"type": "SecurityType",
"type": "SecurityTypeEnum",
"included": 1,
"storageOption": "External",
"singleton": 0,
@@ -4107,7 +4199,7 @@
"code": 2,
"mfgCode": null,
"side": "server",
"type": "WiFiVersionType",
"type": "WiFiVersionEnum",
"included": 1,
"storageOption": "External",
"singleton": 0,
@@ -4135,7 +4227,7 @@
"reportableChange": 0
},
{
"name": "Rssi",
"name": "RSSI",
"code": 4,
"mfgCode": null,
"side": "server",
@@ -4310,6 +4402,29 @@
"maxInterval": 65344,
"reportableChange": 0
}
],
"events": [
{
"name": "Disconnection",
"code": 0,
"mfgCode": null,
"side": "server",
"included": 1
},
{
"name": "AssociationFailure",
"code": 1,
"mfgCode": null,
"side": "server",
"included": 1
},
{
"name": "ConnectionStatus",
"code": 2,
"mfgCode": null,
"side": "server",
"included": 1
}
]
},
{
@@ -4361,7 +4476,7 @@
"code": 0,
"mfgCode": null,
"side": "server",
"type": "PHYRateType",
"type": "PHYRateEnum",
"included": 1,
"storageOption": "External",
"singleton": 0,
@@ -4550,6 +4665,38 @@
"side": "server",
"enabled": 1,
"attributes": [
{
"name": "NumberOfPositions",
"code": 0,
"mfgCode": null,
"side": "server",
"type": "int8u",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "2",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "CurrentPosition",
"code": 1,
"mfgCode": null,
"side": "server",
"type": "int8u",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "FeatureMap",
"code": 65532,
@@ -4585,7 +4732,7 @@
]
},
{
"name": "AdministratorCommissioning",
"name": "Administrator Commissioning",
"code": 60,
"mfgCode": null,
"define": "ADMINISTRATOR_COMMISSIONING_CLUSTER",
@@ -4637,7 +4784,7 @@
]
},
{
"name": "AdministratorCommissioning",
"name": "Administrator Commissioning",
"code": 60,
"mfgCode": null,
"define": "ADMINISTRATOR_COMMISSIONING_CLUSTER",
@@ -4649,7 +4796,7 @@
"code": 0,
"mfgCode": null,
"side": "server",
"type": "CommissioningWindowStatus",
"type": "CommissioningWindowStatusEnum",
"included": 1,
"storageOption": "External",
"singleton": 0,
@@ -5173,7 +5320,7 @@
"enabled": 1,
"attributes": [
{
"name": "label list",
"name": "LabelList",
"code": 0,
"mfgCode": null,
"side": "server",
@@ -5239,7 +5386,7 @@
"enabled": 1,
"attributes": [
{
"name": "label list",
"name": "LabelList",
"code": 0,
"mfgCode": null,
"side": "server",
@@ -5349,7 +5496,7 @@
"enabled": 1,
"attributes": [
{
"name": "identify time",
"name": "IdentifyTime",
"code": 0,
"mfgCode": null,
"side": "server",
@@ -5365,7 +5512,7 @@
"reportableChange": 0
},
{
"name": "identify type",
"name": "IdentifyType",
"code": 1,
"mfgCode": null,
"side": "server",
@@ -5533,7 +5680,7 @@
],
"attributes": [
{
"name": "name support",
"name": "NameSupport",
"code": 0,
"mfgCode": null,
"side": "server",
@@ -6261,7 +6408,7 @@
"code": 15,
"mfgCode": null,
"side": "server",
"type": "bitmap8",
"type": "LevelControlOptions",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
@@ -6583,10 +6730,10 @@
]
},
{
"name": "Basic",
"name": "Basic Information",
"code": 40,
"mfgCode": null,
"define": "BASIC_CLUSTER",
"define": "BASIC_INFORMATION_CLUSTER",
"side": "client",
"enabled": 0,
"attributes": [
@@ -6609,10 +6756,10 @@
]
},
{
"name": "Basic",
"name": "Basic Information",
"code": 40,
"mfgCode": null,
"define": "BASIC_CLUSTER",
"define": "BASIC_INFORMATION_CLUSTER",
"side": "server",
"enabled": 0,
"attributes": [
@@ -8091,11 +8238,11 @@
"enabled": 1,
"attributes": [
{
"name": "occupancy",
"name": "Occupancy",
"code": 0,
"mfgCode": null,
"side": "server",
"type": "bitmap8",
"type": "OccupancyBitmap",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
@@ -8107,11 +8254,11 @@
"reportableChange": 0
},
{
"name": "occupancy sensor type",
"name": "OccupancySensorType",
"code": 1,
"mfgCode": null,
"side": "server",
"type": "enum8",
"type": "OccupancySensorTypeEnum",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
@@ -8123,11 +8270,11 @@
"reportableChange": 0
},
{
"name": "occupancy sensor type bitmap",
"name": "OccupancySensorTypeBitmap",
"code": 2,
"mfgCode": null,
"side": "server",
"type": "bitmap8",
"type": "OccupancySensorTypeBitmap",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
+4 -3
View File
@@ -1,8 +1,9 @@
# Name, Type, SubType, Offset, Size, Flags
# Note: Firmware partition offset needs to be 64K aligned, initial 36K (9 sectors) are reserved for bootloader and partition table
sec_cert, 0x3F, ,0xd000, 0x3000, , # Never mark this as an encrypted partition
esp_secure_cert, 0x3F, ,0xd000, 0x2000, , # Never mark this as an encrypted partition
nvs, data, nvs, 0x10000, 0x6000,
nvs_keys, data, nvs_keys, , 0x1000,
phy_init, data, phy, , 0x1000,
# Temporarily disable ota for ESP32-H2 because the use of flash need to be optimized.
factory, app, factory, , 0x1C0000,
ota_0, app, ota_0, , 0x1C0000,
ota_1, app, ota_1, , 0x1C0000,
ot_storage,data, fat, , 0x6000,
1 # Name, Type, SubType, Offset, Size, Flags
2 # Note: Firmware partition offset needs to be 64K aligned, initial 36K (9 sectors) are reserved for bootloader and partition table
3 sec_cert, 0x3F, ,0xd000, 0x3000, , # Never mark this as an encrypted partition esp_secure_cert, 0x3F, ,0xd000, 0x2000, , # Never mark this as an encrypted partition
4 nvs, data, nvs, 0x10000, 0x6000,
5 nvs_keys, data, nvs_keys, , 0x1000,
6 phy_init, data, phy, , 0x1000,
7 # Temporarily disable ota for ESP32-H2 because the use of flash need to be optimized. ota_0, app, ota_0, , 0x1C0000,
8 factory, app, factory, , 0x1C0000, ota_1, app, ota_1, , 0x1C0000,
9 ot_storage,data, fat, , 0x6000,
@@ -1,5 +1,4 @@
CONFIG_IDF_TARGET="esp32h2"
CONFIG_IDF_TARGET_ESP32H2_BETA_VERSION_2=y
# Default to 921600 baud when flashing and monitoring device
CONFIG_ESPTOOLPY_BAUD_921600B=y
@@ -9,7 +8,6 @@ CONFIG_ESPTOOLPY_FLASHFREQ_40M=y
CONFIG_ESPTOOLPY_FLASHFREQ="40m"
CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B=y
CONFIG_ESPTOOLPY_MONITOR_BAUD=115200
CONFIG_ESPTOOLPY_FLASHSIZE_2MB=y
# libsodium
CONFIG_LIBSODIUM_USE_MBEDTLS_SHA=y
@@ -27,6 +25,11 @@ CONFIG_FREERTOS_ENABLE_BACKWARD_COMPATIBILITY=y
# Enable OpenThread
CONFIG_OPENTHREAD_ENABLED=y
CONFIG_OPENTHREAD_SRP_CLIENT=y
CONFIG_OPENTHREAD_DNS_CLIENT=y
CONFIG_OPENTHREAD_LOG_LEVEL_DYNAMIC=n
CONFIG_OPENTHREAD_LOG_LEVEL_NOTE=y
CONFIG_OPENTHREAD_CLI=n
# Disable lwip ipv6 autoconfig
CONFIG_LWIP_IPV6_AUTOCONFIG=n
@@ -55,7 +58,7 @@ CONFIG_USE_MINIMAL_MDNS=n
CONFIG_ENABLE_EXTENDED_DISCOVERY=y
# Enable OTA Requestor
CONFIG_ENABLE_OTA_REQUESTOR=n
CONFIG_ENABLE_OTA_REQUESTOR=y
# Disable STA and AP for ESP32H2
CONFIG_ENABLE_WIFI_STATION=n
+36 -42
View File
@@ -9,7 +9,7 @@
#include <app_zboss.h>
#include <esp_err.h>
#include <esp_log.h>
#include <esp_zigbee_api_core.h>
#include <esp_zigbee_core.h>
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
#include <zigbee_bridge.h>
@@ -20,7 +20,7 @@
static const char *TAG = "esp_zboss";
static void bdb_start_top_level_commissioning_cb(zb_uint8_t mode_mask)
static void bdb_start_top_level_commissioning_cb(uint8_t mode_mask)
{
ESP_ERROR_CHECK(esp_zb_bdb_start_top_level_commissioning(mode_mask));
}
@@ -31,77 +31,71 @@ static void bdb_start_top_level_commissioning_cb(zb_uint8_t mode_mask)
* @param bufid Reference to the Zigbee stack buffer used to pass signal.
*/
void zboss_signal_handler(zb_bufid_t bufid)
void esp_zb_app_signal_handler(esp_zb_app_signal_t *signal_struct)
{
// Read signal desription
zb_zdo_app_signal_hdr_t *p_sg_p = NULL;
zb_zdo_app_signal_type_t sig = zb_get_app_signal(bufid, &p_sg_p);
zb_ret_t status = ZB_GET_APP_SIGNAL_STATUS(bufid);
zb_zdo_signal_device_annce_params_t *device_annce_params = NULL;
zb_zdo_signal_macsplit_dev_boot_params_t *rcp_version = NULL;
uint32_t *p_sg_p = signal_struct->p_app_signal;
esp_err_t err_status = signal_struct->esp_err_status;
esp_zb_app_signal_type_t sig_type = *p_sg_p;
esp_zb_zdo_signal_device_annce_params_t *dev_annce_params = NULL;
esp_zb_zdo_signal_macsplit_dev_boot_params_t *rcp_version = NULL;
switch (sig) {
case ZB_ZDO_SIGNAL_SKIP_STARTUP:
switch (sig_type) {
case ESP_ZB_ZDO_SIGNAL_SKIP_STARTUP:
ESP_LOGI(TAG, "Zigbee stack initialized");
esp_zb_bdb_start_top_level_commissioning(ZB_BDB_INITIALIZATION);
esp_zb_bdb_start_top_level_commissioning(ESP_ZB_BDB_MODE_INITIALIZATION);
break;
case ZB_MACSPLIT_DEVICE_BOOT:
case ESP_ZB_MACSPLIT_DEVICE_BOOT:
ESP_LOGI(TAG, "Zigbee rcp device booted");
rcp_version = ZB_ZDO_SIGNAL_GET_PARAMS(p_sg_p, zb_zdo_signal_macsplit_dev_boot_params_t);
ESP_LOGI(TAG, "Zigbee rcp device version: %d.%d.%d", (rcp_version->dev_version >> 24 & 0x000000FF),
(rcp_version->dev_version >> 16 & 0x000000FF), (rcp_version->dev_version & 0x000000FF));
rcp_version = (esp_zb_zdo_signal_macsplit_dev_boot_params_t*)esp_zb_app_signal_get_params(p_sg_p);
ESP_LOGI(TAG, "Running RCP Version:%s", rcp_version->version_str);
break;
case ZB_BDB_SIGNAL_DEVICE_FIRST_START:
case ZB_BDB_SIGNAL_DEVICE_REBOOT:
if (status == RET_OK) {
case ESP_ZB_BDB_SIGNAL_DEVICE_FIRST_START:
case ESP_ZB_BDB_SIGNAL_DEVICE_REBOOT:
if (err_status == ESP_OK) {
ESP_LOGI(TAG, "Start network formation");
esp_zb_bdb_start_top_level_commissioning(ZB_BDB_NETWORK_FORMATION);
esp_zb_bdb_start_top_level_commissioning(ESP_ZB_BDB_MODE_NETWORK_FORMATION);
} else {
ESP_LOGE(TAG, "Failed to initialize Zigbee stack (status: %d)", status);
ESP_LOGE(TAG, "Failed to initialize Zigbee stack (status: %d)", err_status);
}
break;
case ZB_BDB_SIGNAL_FORMATION:
if (status == RET_OK) {
zb_ieee_addr_t ieee_address;
zb_get_long_address(ieee_address);
case ESP_ZB_BDB_SIGNAL_FORMATION:
if (err_status == ESP_OK) {
esp_zb_ieee_addr_t ieee_address;
esp_zb_get_long_address(ieee_address);
ESP_LOGI(TAG, "Formed network successfully");
ESP_LOGI(TAG, "ieee extended address: %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x, PAN ID: 0x%04hx)",
ieee_address[7], ieee_address[6], ieee_address[5], ieee_address[4], ieee_address[3],
ieee_address[2], ieee_address[1], ieee_address[0], ZB_PIBCACHE_PAN_ID());
esp_zb_bdb_start_top_level_commissioning(ZB_BDB_NETWORK_STEERING);
ieee_address[2], ieee_address[1], ieee_address[0], esp_zb_get_pan_id());
esp_zb_bdb_start_top_level_commissioning(ESP_ZB_BDB_MODE_NETWORK_STEERING);
} else {
ESP_LOGI(TAG, "Restart network formation (status: %d)", status);
ZB_SCHEDULE_APP_ALARM((zb_callback_t)bdb_start_top_level_commissioning_cb, ZB_BDB_NETWORK_FORMATION,
ZB_TIME_ONE_SECOND);
ESP_LOGI(TAG, "Restart network formation (status: %d)", err_status);
esp_zb_scheduler_alarm((esp_zb_callback_t)bdb_start_top_level_commissioning_cb, ESP_ZB_BDB_MODE_NETWORK_FORMATION, 1000);
}
break;
case ZB_BDB_SIGNAL_STEERING:
if (status == RET_OK) {
case ESP_ZB_BDB_SIGNAL_STEERING:
if (err_status == ESP_OK) {
ESP_LOGI(TAG, "Network steering started");
}
break;
case ZB_ZDO_SIGNAL_DEVICE_ANNCE:
device_annce_params = ZB_ZDO_SIGNAL_GET_PARAMS(p_sg_p, zb_zdo_signal_device_annce_params_t);
ESP_LOGI(TAG, "New device commissioned or rejoined (short: 0x%04hx)", device_annce_params->device_short_addr);
case ESP_ZB_ZDO_SIGNAL_DEVICE_ANNCE:
dev_annce_params = (esp_zb_zdo_signal_device_annce_params_t *)esp_zb_app_signal_get_params(p_sg_p);
ESP_LOGI(TAG, "New device commissioned or rejoined (short: 0x%04hx)", dev_annce_params->device_short_addr);
esp_zb_zdo_match_desc_req_param_t cmd_req;
cmd_req.dst_nwk_addr = device_annce_params->device_short_addr;
cmd_req.addr_of_interest = device_annce_params->device_short_addr;
esp_zb_zdo_find_on_off_light(&cmd_req, zigbee_bridge_find_bridged_on_off_light_cb);
cmd_req.dst_nwk_addr = dev_annce_params->device_short_addr;
cmd_req.addr_of_interest = dev_annce_params->device_short_addr;
esp_zb_zdo_find_on_off_light(&cmd_req, zigbee_bridge_find_bridged_on_off_light_cb, NULL);
break;
default:
ESP_LOGI(TAG, "status: %d", status);
ESP_LOGI(TAG, "status: %d", err_status);
break;
}
/* All callbacks should either reuse or free passed buffers. If bufid == 0, the buffer is invalid (not passed) */
if (bufid) {
zb_buf_free(bufid);
}
}
static void zboss_task(void *pvParameters)
@@ -1,8 +1,7 @@
## IDF Component Manager Manifest File
dependencies:
espressif/esp-zboss-lib: "~0.1.0"
espressif/esp-zigbee-lib: "~0.1.1"
espressif/mdns: "^1.0.3"
espressif/esp-zboss-lib: "~0.3.0"
espressif/esp-zigbee-lib: "~0.5.0"
## Required IDF version
idf:
version: ">=5.0.0"
@@ -22,10 +22,10 @@ using namespace esp_matter::cluster;
extern uint16_t aggregator_endpoint_id;
void zigbee_bridge_find_bridged_on_off_light_cb(zb_uint8_t zdo_status, zb_uint16_t addr, zb_uint8_t endpoint)
void zigbee_bridge_find_bridged_on_off_light_cb(esp_zb_zdp_status_t zdo_status, uint16_t addr, uint8_t endpoint, void *user_ctx)
{
ESP_LOGI(TAG, "on_off_light found: address:0x%x, endpoint:%d, response_status:%d", addr, endpoint, zdo_status);
if (zdo_status == ZB_ZDP_STATUS_SUCCESS) {
if (zdo_status == ESP_ZB_ZDP_STATUS_SUCCESS) {
node_t *node = node::get();
if (!node) {
ESP_LOGE(TAG, "Could not find esp_matter node");
@@ -62,7 +62,7 @@ esp_err_t zigbee_bridge_attribute_update(uint16_t endpoint_id, uint32_t cluster_
cmd_req.zcl_basic_cmd.dst_endpoint = zigbee_device->dev_addr.zigbee_endpointid;
cmd_req.zcl_basic_cmd.src_endpoint = esp_matter::endpoint::get_id(zigbee_device->dev->endpoint);
cmd_req.address_mode = ESP_ZB_APS_ADDR_MODE_16_ENDP_PRESENT;
cmd_req.on_off_cmd_id = val->val.b ? ZB_ZCL_CMD_ON_OFF_ON_ID : ZB_ZCL_CMD_ON_OFF_OFF_ID;
cmd_req.on_off_cmd_id = val->val.b ? ESP_ZB_ZCL_CMD_ON_OFF_ON_ID : ESP_ZB_ZCL_CMD_ON_OFF_OFF_ID;
esp_zb_zcl_on_off_cmd_req(&cmd_req);
}
}
+3 -3
View File
@@ -9,12 +9,12 @@
#pragma once
#include <esp_matter_attribute_utils.h>
#include <esp_zigbee_api_HA_standard.h>
#include <esp_zigbee_api_core.h>
#include <ha/esp_zigbee_ha_standard.h>
#include <esp_zigbee_core.h>
#include <app_bridged_device.h>
#include <stdint.h>
void zigbee_bridge_find_bridged_on_off_light_cb(zb_uint8_t zdo_status, zb_uint16_t addr, zb_uint8_t endpoint);
void zigbee_bridge_find_bridged_on_off_light_cb(esp_zb_zdp_status_t zdo_status, uint16_t addr, uint8_t endpoint, void *user_ctx);
esp_err_t zigbee_bridge_attribute_update(uint16_t endpoint_id, uint32_t cluster_id, uint32_t attribute_id,
esp_matter_attr_val_t *val, app_bridged_device_t *zigbee_device);
@@ -38,8 +38,5 @@ CONFIG_ZB_ENABLED=y
CONFIG_ZB_ZCZR=y
CONFIG_ZB_RADIO_MACSPLIT_UART=y
# disable softap by default
CONFIG_ESP_WIFI_SOFTAP_SUPPORT=n
# Disable DS Peripheral
CONFIG_ESP_SECURE_CERT_DS_PERIPHERAL=n
+1 -1
View File
@@ -54,7 +54,7 @@ esp_matter_export_main() {
export PATH=${PATH}:${ESP_MATTER_PATH}/connectedhomeip/connectedhomeip/out/host
# export zap-cli path
export export ZAP_INSTALL_PATH=${ESP_MATTER_PATH}/zap
export export ZAP_INSTALL_PATH=${ESP_MATTER_PATH}/.zap
}
esp_matter_export_main
+16 -14
View File
@@ -12,6 +12,22 @@ echo "Running Matter Setup"
echo ""
source ${MATTER_PATH}/scripts/bootstrap.sh
echo ""
echo "Installing zap-cli"
echo ""
# Run the zap_download.py and extract the path of installed binary
# eg output before cut: "export ZAP_INSTALL_PATH=zap/zap-v2023.03.06-nightly"
# output after cut: zap/zap-v2023.03.06-nightly
# TODO: Remove the zap-version after https://github.com/project-chip/connectedhomeip/pull/25727 merged
zap_path=`python3 ${ESP_MATTER_PATH}/connectedhomeip/connectedhomeip/scripts/tools/zap/zap_download.py \
--sdk-root ${ESP_MATTER_PATH}/connectedhomeip/connectedhomeip --zap RELEASE --zap-version v2023.03.06-nightly \
--extract-root .zap 2>/dev/null | cut -d= -f2`
# Move files to one directory up, so that binaries will be in zap/ directory and export.sh can leverage the fixed path
mkdir ${ESP_MATTER_PATH}/.zap
mv $zap_path/* ${ESP_MATTER_PATH}/.zap/
rm -r $zap_path
chmod +x ${ESP_MATTER_PATH}/.zap/zap-cli
echo ""
echo "Building host tools"
echo ""
@@ -36,20 +52,6 @@ echo "Installing python dependencies for Matter"
echo ""
python3 -m pip install -r ${ESP_MATTER_PATH}/requirements.txt
echo ""
echo "Installing zap-cli"
echo ""
# Run the zap_download.py and extract the path of installed binary
# eg output before cut: "export ZAP_INSTALL_PATH=zap/zap-v2023.01.19-nightly"
# output after cut: zap/zap-v2023.01.19-nightly
zap_path=`python3 connectedhomeip/connectedhomeip/scripts/tools/zap/zap_download.py \
--sdk-root connectedhomeip/connectedhomeip --zap RELEASE --extract-root zap \
2>/dev/null | cut -d= -f2`
# Move files to one directory up, so that binaries will be in zap/ directory and export.sh can leverage the fixed path
mv $zap_path/* zap/
rm -r $zap_path
chmod +x zap/zap-cli
echo "All done! You can now run:"
echo ""
echo " . ${basedir}/export.sh"