diff --git a/examples/lighting-app/bouffalolab/bl602/BUILD.gn b/examples/lighting-app/bouffalolab/bl602/BUILD.gn index 7389d3b0e17b07..a6ef75ec04a1a0 100644 --- a/examples/lighting-app/bouffalolab/bl602/BUILD.gn +++ b/examples/lighting-app/bouffalolab/bl602/BUILD.gn @@ -62,9 +62,9 @@ bl_iot_sdk("sdk") { defines = [ "INCLUDE_xSemaphoreGetMutexHolder=1", - "OTA_PERIODIC_TIMEOUT=${ota_periodic_query_timeout}", "CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE=${setupPinCode}", - "OTA_PERIODIC_QUERY_TIMEOUT=${ota_periodic_query_timeout}", + "CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR=${setupDiscriminator}", + "OTA_PERIODIC_TIMEOUT=${ota_periodic_query_timeout}", "CHIP_UART_BAUDRATE=${baudrate}", "SYS_AOS_LOOP_ENABLE", ] diff --git a/examples/lighting-app/bouffalolab/bl602/CHIPProjectConfig.h b/examples/lighting-app/bouffalolab/bl602/CHIPProjectConfig.h index 7e6cacb57ae061..16439282d46ad9 100644 --- a/examples/lighting-app/bouffalolab/bl602/CHIPProjectConfig.h +++ b/examples/lighting-app/bouffalolab/bl602/CHIPProjectConfig.h @@ -42,8 +42,10 @@ #ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 #endif -#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00 +#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR +#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00 +#endif // For convenience, Chip Security Test Mode can be enabled and the // requirement for authentication in various protocols can be disabled. // diff --git a/examples/lighting-app/bouffalolab/bl702/CHIPProjectConfig.h b/examples/lighting-app/bouffalolab/bl702/CHIPProjectConfig.h index 022ce8fa592e7a..1a357d1b10ccbc 100644 --- a/examples/lighting-app/bouffalolab/bl702/CHIPProjectConfig.h +++ b/examples/lighting-app/bouffalolab/bl702/CHIPProjectConfig.h @@ -132,6 +132,4 @@ #define CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY 1 -#define CHIP_CONFIG_MAX_DEVICE_ADMINS 4 // 3 fabrics + 1 for rotation slack - #define CHIP_BLE_DEVICE_NAME "MatterLight" diff --git a/src/lwip/bl702/lwipopts.h b/src/lwip/bl702/lwipopts.h index 2bc395455856c9..0ef3c210e77f05 100644 --- a/src/lwip/bl702/lwipopts.h +++ b/src/lwip/bl702/lwipopts.h @@ -68,7 +68,6 @@ #define LWIP_IPV4 0 #define LWIP_IPV6 1 -#define LWIP_IPV6_ROUTE_TABLE_SUPPORT 1 #define LWIP_ARP (0) #define LWIP_DNS (0) #define LWIP_ICMP (0) @@ -92,8 +91,8 @@ #define MEMP_SEPARATE_POOLS (1) #define LWIP_PBUF_FROM_CUSTOM_POOLS (0) #define MEMP_USE_CUSTOM_POOLS (0) -#define PBUF_POOL_SIZE (10) -#define PBUF_POOL_BUFSIZE (1280 + 150) +#define PBUF_POOL_SIZE (8) +#define PBUF_POOL_BUFSIZE (1280) #define PBUF_CUSTOM_POOL_IDX_START (MEMP_PBUF_POOL_SMALL) #define PBUF_CUSTOM_POOL_IDX_END (MEMP_PBUF_POOL_LARGE) @@ -106,7 +105,7 @@ #define PBUF_LINK_HLEN (0) #define TCPIP_THREAD_STACKSIZE (2048) -#define TCPIP_THREAD_PRIO (2) +#define TCPIP_THREAD_PRIO (29) #define NETIF_MAX_HWADDR_LEN 8U diff --git a/src/platform/bouffalolab/BL702/ConfigurationManagerImpl.cpp b/src/platform/bouffalolab/BL702/ConfigurationManagerImpl.cpp index d884d752ea5d34..00878976150d26 100644 --- a/src/platform/bouffalolab/BL702/ConfigurationManagerImpl.cpp +++ b/src/platform/bouffalolab/BL702/ConfigurationManagerImpl.cpp @@ -83,6 +83,11 @@ CHIP_ERROR ConfigurationManagerImpl::Init() WriteConfigValue(BL702Config::kCounterKey_RebootCount, rebootCount + 1); } + if (!BL702Config::ConfigValueExists(BL702Config::kCounterKey_TotalOperationalHours)) + { + ReturnErrorOnFailure(StoreTotalOperationalHours(0)); + } + // If the fail-safe was armed when the device last shutdown, initiate a factory reset. if (GetFailSafeArmed(failSafeArmed) == CHIP_NO_ERROR && failSafeArmed) { diff --git a/src/platform/bouffalolab/BL702/SystemPlatformConfig.h b/src/platform/bouffalolab/BL702/SystemPlatformConfig.h index f3f843c0d55c99..4912f404626de3 100644 --- a/src/platform/bouffalolab/BL702/SystemPlatformConfig.h +++ b/src/platform/bouffalolab/BL702/SystemPlatformConfig.h @@ -29,9 +29,3 @@ struct ChipDeviceEvent; #define CHIP_SYSTEM_CONFIG_PLATFORM_PROVIDES_EVENT_FUNCTIONS 1 #define CHIP_SYSTEM_CONFIG_PLATFORM_PROVIDES_TIME 1 #define CHIP_SYSTEM_CONFIG_EVENT_OBJECT_TYPE const struct ::chip::DeviceLayer::ChipDeviceEvent * - -// ========== Platform-specific Configuration Overrides ========= - -#ifndef CHIP_SYSTEM_CONFIG_NUM_TIMERS -#define CHIP_SYSTEM_CONFIG_NUM_TIMERS 16 -#endif // CHIP_SYSTEM_CONFIG_NUM_TIMERS diff --git a/third_party/bouffalolab/bl602/bl_iot_sdk.gni b/third_party/bouffalolab/bl602/bl_iot_sdk.gni index c52a5dbdcdbfb6..e6d933e501df93 100644 --- a/third_party/bouffalolab/bl602/bl_iot_sdk.gni +++ b/third_party/bouffalolab/bl602/bl_iot_sdk.gni @@ -836,8 +836,9 @@ template("bl_iot_sdk") { "LWIP_AUTOIP=1", "LWIP_IPV6_MLD=1", "LWIP_ND6_RDNSS_MAX_DNS_SERVERS=1", + "MEMP_NUM_MLD6_GROUP=10", "PBUF_POOL_SIZE=20", - "PBUF_POOL_BUFSIZE=(1280+150)", + "PBUF_POOL_BUFSIZE=(1600)", "CONFIG_ENABLE_IPV6_ADDR_CALLBACK", "CONFIG_LWIP_HOOK_IP6_ROUTE_DEFAULT", "CONFIG_LWIP_HOOK_ND6_GET_GW_DEFAULT",