Skip to content

Commit

Permalink
esp-zigbee-sdk: release/v1.2.1(aaf0078d)
Browse files Browse the repository at this point in the history
- Updated esp-zboss-lib to v1.2.1
- Updated esp-zigbee-lib to v1.2.1
- Added manufacturer code setting API
- Supported the large data transmission for zcl commands
- Fixed mfg tool
- Fixed multiple link key initialization
- Fixed touchlink nwk update request handler

- Closes: #202
- Closes: #244
- Closes: #254
  • Loading branch information
xieqinan committed Mar 15, 2024
1 parent 1fb29a0 commit ba8582d
Show file tree
Hide file tree
Showing 32 changed files with 189 additions and 55 deletions.
18 changes: 18 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Espressif Zigbee SDK Release Notes

## 15-Mar-2024
1.2.1 version release of ESP-ZIGBEE-SDK is based on esp-idf v5.1.3

### Features
- Updated esp-zboss-lib to v1.2.1
- Updated esp-zigbee-lib to v1.2.1
- Added manufacturer code setting API
- Supported the large data transmission for zcl commands

### Bug Fixes
- Fixed mfg tool
- Fixed multiple link key initialization
- Fixed touchlink nwk update request handler
- Closes: https://github.com/espressif/esp-zigbee-sdk/issues/202
- Closes: https://github.com/espressif/esp-zigbee-sdk/issues/244
- Closes: https://github.com/espressif/esp-zigbee-sdk/issues/254


## 8-Mar-2024
1.2.0 version release of ESP-ZIGBEE-SDK is based on esp-idf v5.1.3

Expand Down
2 changes: 1 addition & 1 deletion components/esp-zigbee-lib/idf_component.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: "1.2.0"
version: "1.2.1"
description: esp-zigbee library component
url: https://github.com/espressif/esp-zigbee-sdk
dependencies:
Expand Down
9 changes: 9 additions & 0 deletions components/esp-zigbee-lib/include/esp_zigbee_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,15 @@ bool esp_zb_sleep_is_enable(void);
esp_zb_bdb_commissioning_status_t esp_zb_get_bdb_commissioning_status(void);
#endif

/**
* @brief Set the Zigbee node descriptor manufacturer code.
*
* @note The function should be called in ESP_ZB_ZDO_SIGNAL_PRODUCTION_CONFIG_READY signal
* @param[in] manufacturer_code The manufacturer code of Zigbee device
*/
void esp_zb_set_node_descriptor_manufacturer_code(uint16_t manufacturer_code);

#ifdef __cplusplus
}
#endif
Binary file modified components/esp-zigbee-lib/lib/esp32/libesp_zb_api_zczr.a
Binary file not shown.
Binary file modified components/esp-zigbee-lib/lib/esp32/libesp_zb_cli_command.a
Binary file not shown.
Binary file modified components/esp-zigbee-lib/lib/esp32c3/libesp_zb_api_zczr.a
Binary file not shown.
Binary file modified components/esp-zigbee-lib/lib/esp32c3/libesp_zb_cli_command.a
Binary file not shown.
Binary file modified components/esp-zigbee-lib/lib/esp32c6/libesp_zb_api_ed.a
Binary file not shown.
Binary file modified components/esp-zigbee-lib/lib/esp32c6/libesp_zb_api_zczr.a
Binary file not shown.
Binary file modified components/esp-zigbee-lib/lib/esp32c6/libesp_zb_cli_command.a
Binary file not shown.
Binary file modified components/esp-zigbee-lib/lib/esp32h2/libesp_zb_api_ed.a
Binary file not shown.
Binary file modified components/esp-zigbee-lib/lib/esp32h2/libesp_zb_api_zczr.a
Binary file not shown.
Binary file modified components/esp-zigbee-lib/lib/esp32h2/libesp_zb_cli_command.a
Binary file not shown.
Binary file modified components/esp-zigbee-lib/lib/esp32s2/libesp_zb_api_zczr.a
Binary file not shown.
Binary file modified components/esp-zigbee-lib/lib/esp32s2/libesp_zb_cli_command.a
Binary file not shown.
Binary file modified components/esp-zigbee-lib/lib/esp32s3/libesp_zb_api_zczr.a
Binary file not shown.
Binary file modified components/esp-zigbee-lib/lib/esp32s3/libesp_zb_cli_command.a
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@

static const char *TAG = "ESP_ZB_COLOR_DIMM_LIGHT";
/********************* Define functions **************************/
static esp_err_t deferred_driver_init(void)
{
light_driver_init(LIGHT_DEFAULT_OFF);
return ESP_OK;
}

static void bdb_start_top_level_commissioning_cb(uint8_t mode_mask)
{
ESP_RETURN_ON_FALSE(esp_zb_bdb_start_top_level_commissioning(mode_mask) == ESP_OK, , TAG, "Failed to start Zigbee commissioning");
Expand All @@ -44,6 +50,7 @@ void esp_zb_app_signal_handler(esp_zb_app_signal_t *signal_struct)
case ESP_ZB_BDB_SIGNAL_DEVICE_FIRST_START:
case ESP_ZB_BDB_SIGNAL_DEVICE_REBOOT:
if (err_status == ESP_OK) {
ESP_LOGI(TAG, "Deferred driver initialization %s", deferred_driver_init() ? "failed" : "successful");
ESP_LOGI(TAG, "Device started up in %s factory-reset mode", esp_zb_bdb_is_factory_new() ? "" : "non");
if (esp_zb_bdb_is_factory_new()) {
ESP_LOGI(TAG, "Start network steering");
Expand Down Expand Up @@ -177,6 +184,5 @@ void app_main(void)
};
ESP_ERROR_CHECK(nvs_flash_init());
ESP_ERROR_CHECK(esp_zb_platform_config(&config));
light_driver_init(LIGHT_DEFAULT_OFF);
xTaskCreate(esp_zb_task, "Zigbee_main", 4096, NULL, 5, NULL);
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ static uint16_t color_y_table[3] = {

static const char *TAG = "ESP_ZB_COLOR_DIMM_SWITCH";

static void esp_zb_buttons_handler(switch_func_pair_t *button_func_pair)
static void zb_buttons_handler(switch_func_pair_t *button_func_pair)
{
uint8_t step = 10;
static uint8_t level_value = 5;
Expand Down Expand Up @@ -81,6 +81,13 @@ static void esp_zb_buttons_handler(switch_func_pair_t *button_func_pair)
}
}

static esp_err_t deferred_driver_init(void)
{
ESP_RETURN_ON_FALSE(switch_driver_init(button_func_pair, PAIR_SIZE(button_func_pair), zb_buttons_handler), ESP_FAIL, TAG,
"Failed to initialize switch driver");
return ESP_OK;
}

static void bdb_start_top_level_commissioning_cb(uint8_t mode_mask)
{
ESP_RETURN_ON_FALSE(esp_zb_bdb_start_top_level_commissioning(mode_mask) == ESP_OK, , TAG, "Failed to start Zigbee bdb commissioning");
Expand Down Expand Up @@ -136,6 +143,7 @@ void esp_zb_app_signal_handler(esp_zb_app_signal_t *signal_struct)
case ESP_ZB_BDB_SIGNAL_DEVICE_FIRST_START:
case ESP_ZB_BDB_SIGNAL_DEVICE_REBOOT:
if (err_status == ESP_OK) {
ESP_LOGI(TAG, "Deferred driver initialization %s", deferred_driver_init() ? "failed" : "successful");
ESP_LOGI(TAG, "Device started up in %s factory-reset mode", esp_zb_bdb_is_factory_new() ? "" : "non");
if (esp_zb_bdb_is_factory_new()) {
ESP_LOGI(TAG, "Start network formation");
Expand Down Expand Up @@ -213,6 +221,5 @@ void app_main(void)
};
ESP_ERROR_CHECK(nvs_flash_init());
ESP_ERROR_CHECK(esp_zb_platform_config(&config));
switch_driver_init(button_func_pair, PAIR_SIZE(button_func_pair), esp_zb_buttons_handler);
xTaskCreate(esp_zb_task, "Zigbee_main", 4096, NULL, 5, NULL);
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@

static const char *TAG = "ESP_ZB_ON_OFF_LIGHT";
/********************* Define functions **************************/
static esp_err_t deferred_driver_init(void)
{
light_driver_init(LIGHT_DEFAULT_OFF);
return ESP_OK;
}

static void bdb_start_top_level_commissioning_cb(uint8_t mode_mask)
{
ESP_RETURN_ON_FALSE(esp_zb_bdb_start_top_level_commissioning(mode_mask) == ESP_OK, , TAG, "Failed to start Zigbee commissioning");
Expand All @@ -43,6 +49,7 @@ void esp_zb_app_signal_handler(esp_zb_app_signal_t *signal_struct)
case ESP_ZB_BDB_SIGNAL_DEVICE_FIRST_START:
case ESP_ZB_BDB_SIGNAL_DEVICE_REBOOT:
if (err_status == ESP_OK) {
ESP_LOGI(TAG, "Deferred driver initialization %s", deferred_driver_init() ? "failed" : "successful");
ESP_LOGI(TAG, "Device started up in %s factory-reset mode", esp_zb_bdb_is_factory_new() ? "" : "non");
if (esp_zb_bdb_is_factory_new()) {
ESP_LOGI(TAG, "Start network steering");
Expand Down Expand Up @@ -133,6 +140,5 @@ void app_main(void)
};
ESP_ERROR_CHECK(nvs_flash_init());
ESP_ERROR_CHECK(esp_zb_platform_config(&config));
light_driver_init(LIGHT_DEFAULT_OFF);
xTaskCreate(esp_zb_task, "Zigbee_main", 4096, NULL, 5, NULL);
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
*/

#include "esp_check.h"
#include "esp_err.h"
#include "string.h"
#include "nvs_flash.h"
#include "esp_log.h"
Expand All @@ -36,7 +37,7 @@ static switch_func_pair_t button_func_pair[] = {

static const char *TAG = "ESP_ZB_ON_OFF_SWITCH";

static void esp_zb_buttons_handler(switch_func_pair_t *button_func_pair)
static void zb_buttons_handler(switch_func_pair_t *button_func_pair)
{
if (button_func_pair->func == SWITCH_ONOFF_TOGGLE_CONTROL) {
/* implemented light switch toggle functionality */
Expand All @@ -51,6 +52,13 @@ static void esp_zb_buttons_handler(switch_func_pair_t *button_func_pair)
}
}

static esp_err_t deferred_driver_init(void)
{
ESP_RETURN_ON_FALSE(switch_driver_init(button_func_pair, PAIR_SIZE(button_func_pair), zb_buttons_handler), ESP_FAIL, TAG,
"Failed to initialize switch driver");
return ESP_OK;
}

static void bdb_start_top_level_commissioning_cb(uint8_t mode_mask)
{
ESP_RETURN_ON_FALSE(esp_zb_bdb_start_top_level_commissioning(mode_mask) == ESP_OK, , TAG, "Failed to start Zigbee bdb commissioning");
Expand Down Expand Up @@ -103,6 +111,7 @@ void esp_zb_app_signal_handler(esp_zb_app_signal_t *signal_struct)
case ESP_ZB_BDB_SIGNAL_DEVICE_FIRST_START:
case ESP_ZB_BDB_SIGNAL_DEVICE_REBOOT:
if (err_status == ESP_OK) {
ESP_LOGI(TAG, "Deferred driver initialization %s", deferred_driver_init() ? "failed" : "successful");
ESP_LOGI(TAG, "Device started up in %s factory-reset mode", esp_zb_bdb_is_factory_new() ? "" : "non");
if (esp_zb_bdb_is_factory_new()) {
ESP_LOGI(TAG, "Start network formation");
Expand Down Expand Up @@ -178,6 +187,6 @@ void app_main(void)
};
ESP_ERROR_CHECK(nvs_flash_init());
ESP_ERROR_CHECK(esp_zb_platform_config(&config));
switch_driver_init(button_func_pair, PAIR_SIZE(button_func_pair), esp_zb_buttons_handler);

xTaskCreate(esp_zb_task, "Zigbee_main", 4096, NULL, 5, NULL);
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,15 @@ static void bdb_start_top_level_commissioning_cb(uint8_t mode_mask)
TAG, "Failed to start Zigbee bdb commissioning");
}

static void deferred_driver_init()
static esp_err_t deferred_driver_init(void)
{
temperature_sensor_config_t temp_sensor_config =
TEMPERATURE_SENSOR_CONFIG_DEFAULT(ESP_TEMP_SENSOR_MIN_VALUE, ESP_TEMP_SENSOR_MAX_VALUE);
temp_sensor_driver_init(&temp_sensor_config, ESP_TEMP_SENSOR_UPDATE_INTERVAL, esp_app_temp_sensor_handler);
switch_driver_init(button_func_pair, PAIR_SIZE(button_func_pair), esp_app_buttons_handler);
ESP_RETURN_ON_ERROR(temp_sensor_driver_init(&temp_sensor_config, ESP_TEMP_SENSOR_UPDATE_INTERVAL, esp_app_temp_sensor_handler), TAG,
"Failed to initialize temperature sensor");
ESP_RETURN_ON_FALSE(switch_driver_init(button_func_pair, PAIR_SIZE(button_func_pair), esp_app_buttons_handler), ESP_FAIL, TAG,
"Failed to initialize switch driver");
return ESP_OK;
}

void esp_zb_app_signal_handler(esp_zb_app_signal_t *signal_struct)
Expand All @@ -92,8 +95,8 @@ void esp_zb_app_signal_handler(esp_zb_app_signal_t *signal_struct)
break;
case ESP_ZB_BDB_SIGNAL_DEVICE_FIRST_START:
case ESP_ZB_BDB_SIGNAL_DEVICE_REBOOT:
deferred_driver_init();
if (err_status == ESP_OK) {
ESP_LOGI(TAG, "Deferred driver initialization %s", deferred_driver_init() ? "failed" : "successful");
ESP_LOGI(TAG, "Device started up in %s factory-reset mode", esp_zb_bdb_is_factory_new() ? "" : "non");
if (esp_zb_bdb_is_factory_new()) {
ESP_LOGI(TAG, "Start network steering");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,12 @@ static void find_temperature_sensor(esp_zb_zdo_match_desc_req_param_t *param, es
esp_zb_zdo_match_cluster(param, user_cb, (void *)&temp_sensor);
}

static void deferred_driver_init()
static esp_err_t deferred_driver_init(void)
{
switch_driver_init(button_func_pair, PAIR_SIZE(button_func_pair), esp_app_buttons_handler);
ESP_RETURN_ON_FALSE(switch_driver_init(button_func_pair, PAIR_SIZE(button_func_pair), esp_app_buttons_handler), ESP_FAIL, TAG,
"Failed to initialize switch driver");
return ESP_OK;
}

void esp_zb_app_signal_handler(esp_zb_app_signal_t *signal_struct)
{
uint32_t *p_sg_p = signal_struct->p_app_signal;
Expand All @@ -224,8 +225,8 @@ void esp_zb_app_signal_handler(esp_zb_app_signal_t *signal_struct)
break;
case ESP_ZB_BDB_SIGNAL_DEVICE_FIRST_START:
case ESP_ZB_BDB_SIGNAL_DEVICE_REBOOT:
deferred_driver_init();
if (err_status == ESP_OK) {
ESP_LOGI(TAG, "Deferred driver initialization %s", deferred_driver_init() ? "failed" : "successful");
ESP_LOGI(TAG, "Device started up in %s factory-reset mode", esp_zb_bdb_is_factory_new() ? "" : "non");
if (esp_zb_bdb_is_factory_new()) {
ESP_LOGI(TAG, "Start network formation");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ typedef struct zdo_info_ctx_s {
/* remote device struct for recording and managing node info */
light_bulb_device_params_t on_off_light;

static void esp_zb_buttons_handler(switch_func_pair_t *button_func_pair)
static void zb_buttons_handler(switch_func_pair_t *button_func_pair)
{
switch (button_func_pair->func) {
case SWITCH_ONOFF_TOGGLE_CONTROL: {
Expand All @@ -66,6 +66,13 @@ static void esp_zb_buttons_handler(switch_func_pair_t *button_func_pair)
}
}

static esp_err_t deferred_driver_init(void)
{
ESP_RETURN_ON_FALSE(switch_driver_init(button_func_pair, PAIR_SIZE(button_func_pair), zb_buttons_handler), ESP_FAIL, TAG,
"Failed to initialize switch driver");
return ESP_OK;
}

static void bdb_start_top_level_commissioning_cb(uint8_t mode_mask)
{
ESP_RETURN_ON_FALSE(esp_zb_bdb_start_top_level_commissioning(mode_mask) == ESP_OK, , TAG, "Failed to start Zigbee bdb commissioning");
Expand Down Expand Up @@ -190,6 +197,7 @@ void esp_zb_app_signal_handler(esp_zb_app_signal_t *signal_struct)
esp_zb_scheduler_alarm((esp_zb_callback_t)bdb_start_top_level_commissioning_cb, ESP_ZB_BDB_MODE_NETWORK_STEERING, 1000);
} else {
/* device auto start successfully and on a formed network */
ESP_LOGI(TAG, "Deferred driver initialization %s", deferred_driver_init() ? "failed" : "successful");
esp_zb_ieee_addr_t extended_pan_id;
esp_zb_get_extended_pan_id(extended_pan_id);
ESP_LOGI(TAG, "Joined network successfully (Extended PAN ID: %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x, PAN ID: 0x%04hx, Channel:%d, Short Address: 0x%04hx)",
Expand Down Expand Up @@ -331,6 +339,5 @@ void app_main(void)
};
ESP_ERROR_CHECK(nvs_flash_init());
ESP_ERROR_CHECK(esp_zb_platform_config(&config));
switch_driver_init(button_func_pair, PAIR_SIZE(button_func_pair), esp_zb_buttons_handler);
xTaskCreate(esp_zb_task, "Zigbee_main", 4096, NULL, 5, NULL);
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@

static const char *TAG = "ESP_HA_ON_OFF_LIGHT";

static esp_err_t deferred_driver_init(void)
{
light_driver_init(LIGHT_DEFAULT_OFF);
return ESP_OK;
}

static void bdb_start_top_level_commissioning_cb(uint8_t mode_mask)
{
ESP_RETURN_ON_FALSE(esp_zb_bdb_start_top_level_commissioning(mode_mask) == ESP_OK, , TAG, "Failed to start Zigbee bdb commissioning");
Expand All @@ -42,6 +48,7 @@ void esp_zb_app_signal_handler(esp_zb_app_signal_t *signal_struct)
case ESP_ZB_BDB_SIGNAL_DEVICE_FIRST_START:
case ESP_ZB_BDB_SIGNAL_DEVICE_REBOOT:
if (err_status == ESP_OK) {
ESP_LOGI(TAG, "Deferred driver initialization %s", deferred_driver_init() ? "failed" : "successful");
ESP_LOGI(TAG, "Device started up in %s factory-reset mode", esp_zb_bdb_is_factory_new() ? "" : "non");
if (esp_zb_bdb_is_factory_new()) {
ESP_LOGI(TAG, "Start network formation");
Expand Down Expand Up @@ -197,6 +204,5 @@ void app_main(void)
};
ESP_ERROR_CHECK(nvs_flash_init());
ESP_ERROR_CHECK(esp_zb_platform_config(&config));
light_driver_init(LIGHT_DEFAULT_OFF);
xTaskCreate(esp_zb_task, "Zigbee_main", 4096, NULL, 5, NULL);
}
19 changes: 19 additions & 0 deletions examples/esp_zigbee_gateway/main/esp_zigbee_gateway.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@

static const char *TAG = "ESP_ZB_GATEWAY";

/* Production configuration app data */
typedef struct app_production_config_s {
uint16_t version;
uint16_t manuf_code;
char manuf_name[16];
} app_production_config_t;

/* Note: Please select the correct console output port based on the development board in menuconfig */
#if CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG
esp_err_t esp_zb_gateway_console_init(void)
Expand Down Expand Up @@ -174,6 +181,18 @@ void esp_zb_app_signal_handler(esp_zb_app_signal_t *signal_struct)
}
}
break;
case ESP_ZB_ZDO_SIGNAL_PRODUCTION_CONFIG_READY:
ESP_LOGI(TAG, "Production configuration is ready");
if (err_status == ESP_OK) {
app_production_config_t *prod_cfg = (app_production_config_t *)esp_zb_app_signal_get_params(p_sg_p);
if (prod_cfg->version == APP_PROD_CFG_CURRENT_VERSION) {
ESP_LOGI(TAG, "Manufacturer_code: 0x%x, manufacturer_name:%s", prod_cfg->manuf_code, prod_cfg->manuf_name);
esp_zb_set_node_descriptor_manufacturer_code(prod_cfg->manuf_code);
}
} else {
ESP_LOGW(TAG, "Production configuration is not present");
}
break;
default:
ESP_LOGI(TAG, "ZDO signal: %s (0x%x), status: %s", esp_zb_zdo_signal_to_string(sig_type), sig_type,
esp_err_to_name(err_status));
Expand Down
2 changes: 1 addition & 1 deletion examples/esp_zigbee_gateway/main/esp_zigbee_gateway.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#define MAX_CHILDREN 10 /* the max amount of connected devices */
#define INSTALLCODE_POLICY_ENABLE false /* enable the install code policy for security */
#define ESP_ZB_PRIMARY_CHANNEL_MASK (1l << 13) /* Zigbee primary channel mask use in the example */

#define APP_PROD_CFG_CURRENT_VERSION 0x0001 /* Production configuration version */
#define RCP_VERSION_MAX_SIZE 80
#define HOST_RESET_PIN_TO_RCP_RESET CONFIG_PIN_TO_RCP_RESET
#define HOST_BOOT_PIN_TO_RCP_BOOT CONFIG_PIN_TO_RCP_BOOT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ static void zb_zgp_mode_change_handler(esp_zb_zgp_mode_t new_mode, esp_zb_zgp_mo

static switch_func_pair_t button_func_pair[] = {{GPIO_INPUT_IO_TOGGLE_SWITCH, SWITCH_ONOFF_TOGGLE_CONTROL}};

static void esp_zb_buttons_handler(switch_func_pair_t *button_func_pair)
static void zb_buttons_handler(switch_func_pair_t *button_func_pair)
{
switch (button_func_pair->func) {
case SWITCH_ONOFF_TOGGLE_CONTROL: {
Expand All @@ -73,6 +73,14 @@ static void esp_zb_buttons_handler(switch_func_pair_t *button_func_pair)
}
}

static esp_err_t deferred_driver_init(void)
{
light_driver_init(LIGHT_DEFAULT_OFF);
ESP_RETURN_ON_FALSE(switch_driver_init(button_func_pair, PAIR_SIZE(button_func_pair), zb_buttons_handler), ESP_FAIL, TAG,
"Failed to initialize switch driver");
return ESP_OK;
}

static void bdb_start_top_level_commissioning_cb(uint8_t mode_mask)
{
ESP_RETURN_ON_FALSE(esp_zb_bdb_start_top_level_commissioning(mode_mask) == ESP_OK, , TAG, "Failed to start Zigbee bdb commissioning");
Expand All @@ -92,6 +100,7 @@ void esp_zb_app_signal_handler(esp_zb_app_signal_t *signal_struct)
case ESP_ZB_BDB_SIGNAL_DEVICE_FIRST_START:
case ESP_ZB_BDB_SIGNAL_DEVICE_REBOOT:
if (err_status == ESP_OK) {
ESP_LOGI(TAG, "Deferred driver initialization %s", deferred_driver_init() ? "failed" : "successful");
ESP_LOGI(TAG, "Device started up in %s factory-reset mode", esp_zb_bdb_is_factory_new() ? "" : "non");
if (esp_zb_bdb_is_factory_new()) {
ESP_LOGI(TAG, "Start network formation");
Expand Down Expand Up @@ -243,8 +252,6 @@ void app_main()
};
ESP_ERROR_CHECK(nvs_flash_init());
ESP_ERROR_CHECK(esp_zb_platform_config(&config));
light_driver_init(LIGHT_DEFAULT_OFF);
switch_driver_init(button_func_pair, PAIR_SIZE(button_func_pair), esp_zb_buttons_handler);
xTaskCreate(esp_zb_task, "Zigbee_main", 4096, NULL, 5, NULL);
}

Expand Down
Loading

0 comments on commit ba8582d

Please sign in to comment.