-
Hi all, I'm building my project based on the ESP-Matter "light" example. During the startup process, I encountered the following log error:
Here is a snippet of my log for context:
Here is my code: extern "C" void app_main()
{
esp_err_t err = ESP_OK;
/* Initialize the ESP NVS layer */
nvs_flash_init();
MEMORY_PROFILER_DUMP_HEAP_STAT("Bootup");
/* Initialize driver */
/* Create a Matter node and add the mandatory Root Node device type on endpoint 0 */
node::config_t node_config;
strncpy(node_config.root_node.basic_information.node_label, "Fan", sizeof(node_config.root_node.basic_information.node_label) - 1);
// node handle can be used to add/modify other endpoints.
node_t *node = node::create(&node_config, app_attribute_update_cb, app_identification_cb);
ABORT_APP_ON_FAILURE(node != nullptr, ESP_LOGE(TAG, "Failed to create Matter node"));
MEMORY_PROFILER_DUMP_HEAP_STAT("node created");
endpoint::fan::config_t fan_config = {};
// endpoint handles can be used to add/modify clusters.
endpoint_t *fan_endpoint = endpoint::fan::create(node, &fan_config, ENDPOINT_FLAG_NONE, nullptr);
ABORT_APP_ON_FAILURE(fan_endpoint != nullptr, ESP_LOGE(TAG, "Failed to create fan endpoint"));
fan_endpoint_id = endpoint::get_id(fan_endpoint);
ESP_LOGI(TAG, "Fan created with endpoint_id %d", fan_endpoint_id);
// Add OnOff cluster to fan endpoint for power control
cluster::on_off::config_t on_off_config = {};
cluster_t *on_off_cluster = cluster::on_off::create(fan_endpoint, &on_off_config, CLUSTER_FLAG_SERVER);
ABORT_APP_ON_FAILURE(on_off_cluster != nullptr, ESP_LOGE(TAG, "Failed to create OnOff cluster"));
// Get FanControl cluster
cluster_t *fan_control_cluster = cluster::get(fan_endpoint_id, FanControl::Id);
ABORT_APP_ON_FAILURE(fan_control_cluster != nullptr, ESP_LOGE(TAG, "Failed to get FanControl cluster"));
// Add multi-speed feature to FanControl cluster
cluster::fan_control::feature::multi_speed::config_t multi_speed_config = {};
multi_speed_config.speed_max = 10;
multi_speed_config.speed_setting = 1;
multi_speed_config.speed_current = 1;
err = cluster::fan_control::feature::multi_speed::add(fan_control_cluster, &multi_speed_config);
ABORT_APP_ON_FAILURE(err == ESP_OK, ESP_LOGE(TAG, "Failed to add multi-speed feature, err:%d", err));
#ifdef CONFIG_ENABLE_SET_CERT_DECLARATION_API
auto *dac_provider = get_dac_provider();
#ifdef CONFIG_SEC_CERT_DAC_PROVIDER
static_cast<ESP32SecureCertDACProvider *>(dac_provider)->SetCertificationDeclaration(cdSpan);
#elif defined(CONFIG_FACTORY_PARTITION_DAC_PROVIDER)
static_cast<ESP32FactoryDataProvider *>(dac_provider)->SetCertificationDeclaration(cdSpan);
#endif
#endif // CONFIG_ENABLE_SET_CERT_DECLARATION_API
/* Matter start */
err = esp_matter::start(app_event_cb);
ABORT_APP_ON_FAILURE(err == ESP_OK, ESP_LOGE(TAG, "Failed to start Matter, err:%d", err));
MEMORY_PROFILER_DUMP_HEAP_STAT("matter started");
/* Starting driver with default values */
// app_driver_fan_set_defaults(fan_endpoint_id);
#if CONFIG_ENABLE_ENCRYPTED_OTA
err = esp_matter_ota_requestor_encrypted_init(s_decryption_key, s_decryption_key_len);
ABORT_APP_ON_FAILURE(err == ESP_OK, ESP_LOGE(TAG, "Failed to initialized the encrypted OTA, err: %d", err));
#endif // CONFIG_ENABLE_ENCRYPTED_OTA
#if CONFIG_ENABLE_CHIP_SHELL
esp_matter::console::diagnostics_register_commands();
esp_matter::console::wifi_register_commands();
esp_matter::console::factoryreset_register_commands();
#if CONFIG_OPENTHREAD_CLI
esp_matter::console::otcli_register_commands();
#endif
esp_matter::console::init();
#endif
while (true)
{
MEMORY_PROFILER_DUMP_HEAP_STAT("Idle");
vTaskDelay(10000 / portTICK_PERIOD_MS);
} Although the error appears, the rest of the startup seems to proceed normally, and the Matter server reports success. Questions:
Any insights or suggestions would be greatly appreciated! Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
What does this error mean and what could cause it?
Is this something I should be concerned about for production devices?
Are there recommended ways to resolve or suppress this error?
|
Beta Was this translation helpful? Give feedback.
What does this error mean and what could cause it?
Is this something I should be concerned about for production devices?
Are there recommended ways to resolve or suppress this error?