diff --git a/etc/cmake/options.cmake b/etc/cmake/options.cmake index bad9193d7..cb106bb63 100644 --- a/etc/cmake/options.cmake +++ b/etc/cmake/options.cmake @@ -278,7 +278,7 @@ if(ot_index EQUAL -1) endif() # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -set(OT_THREAD_VERSION_VALUES "1.1" "1.2" "1.3" "1.3.1") +set(OT_THREAD_VERSION_VALUES "1.1" "1.2" "1.3" "1.3.1" "1.4") set(OT_THREAD_VERSION "1.3" CACHE STRING "set Thread version") set_property(CACHE OT_THREAD_VERSION PROPERTY STRINGS "${OT_THREAD_VERSION_VALUES}") list(FIND OT_THREAD_VERSION_VALUES "${OT_THREAD_VERSION}" ot_index) @@ -286,7 +286,7 @@ if(ot_index EQUAL -1) message(STATUS "OT_THREAD_VERSION=\"${OT_THREAD_VERSION}\"") message(FATAL_ERROR "Invalid value for OT_THREAD_VERSION - valid values are: " "${OT_THREAD_VERSION_VALUES}") endif() -set(OT_VERSION_SUFFIX_LIST "1_1" "1_2" "1_3" "1_3_1") +set(OT_VERSION_SUFFIX_LIST "1_1" "1_2" "1_3" "1_3_1" "1_4") list(GET OT_VERSION_SUFFIX_LIST ${ot_index} OT_VERSION_SUFFIX) target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_THREAD_VERSION=OT_THREAD_VERSION_${OT_VERSION_SUFFIX}") message(STATUS "OT_THREAD_VERSION=\"${OT_THREAD_VERSION}\" -> OPENTHREAD_CONFIG_THREAD_VERSION=OT_THREAD_VERSION_${OT_VERSION_SUFFIX}") diff --git a/src/core/BUILD.gn b/src/core/BUILD.gn index a866cd0d4..715741d58 100644 --- a/src/core/BUILD.gn +++ b/src/core/BUILD.gn @@ -41,6 +41,8 @@ if (openthread_enable_core_config_args) { defines += [ "OPENTHREAD_CONFIG_THREAD_VERSION=OT_THREAD_VERSION_1_3" ] } else if (openthread_config_thread_version == "1.3.1") { defines += [ "OPENTHREAD_CONFIG_THREAD_VERSION=OT_THREAD_VERSION_1_3_1" ] + } else if (openthread_config_thread_version == "1.4") { + defines += [ "OPENTHREAD_CONFIG_THREAD_VERSION=OT_THREAD_VERSION_1_4" ] } else if (openthread_config_thread_version != "") { assert(false, "Unrecognized Thread version: ${openthread_config_thread_version}") diff --git a/src/core/config/border_agent.h b/src/core/config/border_agent.h index 599129261..ab3925eda 100644 --- a/src/core/config/border_agent.h +++ b/src/core/config/border_agent.h @@ -82,8 +82,7 @@ * */ #ifndef OPENTHREAD_CONFIG_BORDER_AGENT_EPHEMERAL_KEY_ENABLE -#define OPENTHREAD_CONFIG_BORDER_AGENT_EPHEMERAL_KEY_ENABLE \ - (OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_3_1) +#define OPENTHREAD_CONFIG_BORDER_AGENT_EPHEMERAL_KEY_ENABLE (OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_4) #endif /** diff --git a/src/core/config/mle.h b/src/core/config/mle.h index 0810c010e..d09a3cc80 100644 --- a/src/core/config/mle.h +++ b/src/core/config/mle.h @@ -104,12 +104,12 @@ * Define as 1 to enable feature to set device properties which are used for calculating the local leader weight on a * device. * - * It is enabled by default on Thread Version 1.3.1 or later. + * It is enabled by default on Thread Version 1.4 or later. * */ #ifndef OPENTHREAD_CONFIG_MLE_DEVICE_PROPERTY_LEADER_WEIGHT_ENABLE #define OPENTHREAD_CONFIG_MLE_DEVICE_PROPERTY_LEADER_WEIGHT_ENABLE \ - (OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_3_1) + (OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_4) #endif /** diff --git a/src/core/openthread-core-config.h b/src/core/openthread-core-config.h index 498eb627c..009b671f9 100644 --- a/src/core/openthread-core-config.h +++ b/src/core/openthread-core-config.h @@ -41,7 +41,9 @@ #define OT_THREAD_VERSION_1_1 2 #define OT_THREAD_VERSION_1_2 3 #define OT_THREAD_VERSION_1_3 4 +// Support projects on legacy "1.3.1" version, which is now "1.4" #define OT_THREAD_VERSION_1_3_1 5 +#define OT_THREAD_VERSION_1_4 5 #define OPENTHREAD_CORE_CONFIG_H_IN diff --git a/src/core/thread/csl_tx_scheduler.hpp b/src/core/thread/csl_tx_scheduler.hpp index 77eebcdaf..7b3d12940 100644 --- a/src/core/thread/csl_tx_scheduler.hpp +++ b/src/core/thread/csl_tx_scheduler.hpp @@ -113,7 +113,7 @@ public: * containing the CSL IE was transmitted until the next channel sample, * see IEEE 802.15.4-2015, section 6.12.2. * - * The Thread standard further defines the CSL phase (see Thread 1.3.1, + * The Thread standard further defines the CSL phase (see Thread 1.4, * section 3.2.6.3.4, also conforming to IEEE 802.15.4-2020, section * 6.12.2.1): * * The "first symbol" from the definition SHALL be interpreted as the diff --git a/src/core/thread/version.hpp b/src/core/thread/version.hpp index c3584aad3..0277ede49 100644 --- a/src/core/thread/version.hpp +++ b/src/core/thread/version.hpp @@ -42,10 +42,12 @@ namespace ot { constexpr uint16_t kThreadVersion = OPENTHREAD_CONFIG_THREAD_VERSION; ///< Thread Version of this device. -constexpr uint16_t kThreadVersion1p1 = OT_THREAD_VERSION_1_1; ///< Thread Version 1.1 -constexpr uint16_t kThreadVersion1p2 = OT_THREAD_VERSION_1_2; ///< Thread Version 1.2 -constexpr uint16_t kThreadVersion1p3 = OT_THREAD_VERSION_1_3; ///< Thread Version 1.3 +constexpr uint16_t kThreadVersion1p1 = OT_THREAD_VERSION_1_1; ///< Thread Version 1.1 +constexpr uint16_t kThreadVersion1p2 = OT_THREAD_VERSION_1_2; ///< Thread Version 1.2 +constexpr uint16_t kThreadVersion1p3 = OT_THREAD_VERSION_1_3; ///< Thread Version 1.3 +// Support projects on legacy "1.3.1" version, which is now "1.4" constexpr uint16_t kThreadVersion1p3p1 = OT_THREAD_VERSION_1_3_1; ///< Thread Version 1.3.1 +constexpr uint16_t kThreadVersion1p4 = OT_THREAD_VERSION_1_4; ///< Thread Version 1.4 } // namespace ot diff --git a/tests/toranj/build.sh b/tests/toranj/build.sh index 281495586..4b91cd431 100755 --- a/tests/toranj/build.sh +++ b/tests/toranj/build.sh @@ -113,7 +113,7 @@ case ${build_config} in echo "===================================================================================================" cd "${top_builddir}" || die "cd failed" cmake -GNinja -DOT_PLATFORM=simulation -DOT_COMPILE_WARNING_AS_ERROR=ON -DOT_COVERAGE=${ot_coverage} \ - -DOT_THREAD_VERSION=1.3.1 -DOT_APP_CLI=OFF -DOT_APP_NCP=ON -DOT_APP_RCP=OFF \ + -DOT_THREAD_VERSION=1.4 -DOT_APP_CLI=OFF -DOT_APP_NCP=ON -DOT_APP_RCP=OFF \ -DOT_OPERATIONAL_DATASET_AUTO_INIT=ON -DOT_PLATFORM_KEY_REF=${ot_plat_key_ref} \ -DOT_BORDER_ROUTING=OFF \ -DOT_PROJECT_CONFIG=../tests/toranj/openthread-core-toranj-config-simulation.h \ @@ -127,7 +127,7 @@ case ${build_config} in echo "===================================================================================================" cd "${top_builddir}" || die "cd failed" cmake -GNinja -DOT_PLATFORM=simulation -DOT_COMPILE_WARNING_AS_ERROR=ON -DOT_COVERAGE=${ot_coverage} \ - -DOT_THREAD_VERSION=1.3.1 -DOT_APP_CLI=OFF -DOT_APP_NCP=ON -DOT_APP_RCP=OFF \ + -DOT_THREAD_VERSION=1.4 -DOT_APP_CLI=OFF -DOT_APP_NCP=ON -DOT_APP_RCP=OFF \ -DOT_15_4=ON -DOT_TREL=OFF -DOT_OPERATIONAL_DATASET_AUTO_INIT=ON \ -DOT_BORDER_ROUTING=OFF \ -DOT_PLATFORM_KEY_REF=${ot_plat_key_ref} \ @@ -143,7 +143,7 @@ case ${build_config} in echo "===================================================================================================" cd "${top_builddir}" || die "cd failed" cmake -GNinja -DOT_PLATFORM=simulation -DOT_COMPILE_WARNING_AS_ERROR=ON -DOT_COVERAGE=${ot_coverage} \ - -DOT_THREAD_VERSION=1.3.1 -DOT_APP_CLI=OFF -DOT_APP_NCP=ON -DOT_APP_RCP=OFF \ + -DOT_THREAD_VERSION=1.4 -DOT_APP_CLI=OFF -DOT_APP_NCP=ON -DOT_APP_RCP=OFF \ -DOT_15_4=OFF -DOT_TREL=ON -DOT_OPERATIONAL_DATASET_AUTO_INIT=ON \ -DOT_BORDER_ROUTING=OFF \ -DOT_PLATFORM_KEY_REF=${ot_plat_key_ref} \ @@ -159,7 +159,7 @@ case ${build_config} in echo "===================================================================================================" cd "${top_builddir}" || die "cd failed" cmake -GNinja -DOT_PLATFORM=simulation -DOT_COMPILE_WARNING_AS_ERROR=ON -DOT_COVERAGE=${ot_coverage} \ - -DOT_THREAD_VERSION=1.3.1 -DOT_APP_CLI=OFF -DOT_APP_NCP=ON -DOT_APP_RCP=OFF \ + -DOT_THREAD_VERSION=1.4 -DOT_APP_CLI=OFF -DOT_APP_NCP=ON -DOT_APP_RCP=OFF \ -DOT_15_4=ON -DOT_TREL=ON -DOT_OPERATIONAL_DATASET_AUTO_INIT=ON \ -DOT_BORDER_ROUTING=OFF \ -DOT_PLATFORM_KEY_REF=${ot_plat_key_ref} \ @@ -175,7 +175,7 @@ case ${build_config} in echo "===================================================================================================" cd "${top_builddir}" || die "cd failed" cmake -GNinja -DOT_PLATFORM=simulation -DOT_COMPILE_WARNING_AS_ERROR=ON -DOT_COVERAGE=${ot_coverage} \ - -DOT_THREAD_VERSION=1.3.1 -DOT_APP_CLI=ON -DOT_APP_NCP=OFF -DOT_APP_RCP=OFF \ + -DOT_THREAD_VERSION=1.4 -DOT_APP_CLI=ON -DOT_APP_NCP=OFF -DOT_APP_RCP=OFF \ -DOT_PLATFORM_KEY_REF=${ot_plat_key_ref} \ -DOT_PROJECT_CONFIG=../tests/toranj/openthread-core-toranj-config-simulation.h \ "${top_srcdir}" || die @@ -188,7 +188,7 @@ case ${build_config} in echo "===================================================================================================" cd "${top_builddir}" || die "cd failed" cmake -GNinja -DOT_PLATFORM=simulation -DOT_COMPILE_WARNING_AS_ERROR=ON -DOT_COVERAGE=${ot_coverage} \ - -DOT_THREAD_VERSION=1.3.1 -DOT_APP_CLI=ON -DOT_APP_NCP=OFF -DOT_APP_RCP=OFF \ + -DOT_THREAD_VERSION=1.4 -DOT_APP_CLI=ON -DOT_APP_NCP=OFF -DOT_APP_RCP=OFF \ -DOT_15_4=ON -DOT_TREL=OFF \ -DOT_PLATFORM_KEY_REF=${ot_plat_key_ref} \ -DOT_PROJECT_CONFIG=../tests/toranj/openthread-core-toranj-config-simulation.h \ @@ -203,7 +203,7 @@ case ${build_config} in echo "===================================================================================================" cd "${top_builddir}" || die "cd failed" cmake -GNinja -DOT_PLATFORM=simulation -DOT_COMPILE_WARNING_AS_ERROR=ON -DOT_COVERAGE=${ot_coverage} \ - -DOT_THREAD_VERSION=1.3.1 -DOT_APP_CLI=ON -DOT_APP_NCP=OFF -DOT_APP_RCP=OFF \ + -DOT_THREAD_VERSION=1.4 -DOT_APP_CLI=ON -DOT_APP_NCP=OFF -DOT_APP_RCP=OFF \ -DOT_15_4=OFF -DOT_TREL=ON \ -DOT_PLATFORM_KEY_REF=${ot_plat_key_ref} \ -DOT_PROJECT_CONFIG=../tests/toranj/openthread-core-toranj-config-simulation.h \ @@ -218,7 +218,7 @@ case ${build_config} in echo "===================================================================================================" cd "${top_builddir}" || die "cd failed" cmake -GNinja -DOT_PLATFORM=simulation -DOT_COMPILE_WARNING_AS_ERROR=ON -DOT_COVERAGE=${ot_coverage} \ - -DOT_THREAD_VERSION=1.3.1 -DOT_APP_CLI=ON -DOT_APP_NCP=OFF -DOT_APP_RCP=OFF \ + -DOT_THREAD_VERSION=1.4 -DOT_APP_CLI=ON -DOT_APP_NCP=OFF -DOT_APP_RCP=OFF \ -DOT_15_4=ON -DOT_TREL=ON \ -DOT_PLATFORM_KEY_REF=${ot_plat_key_ref} \ -DOT_PROJECT_CONFIG=../tests/toranj/openthread-core-toranj-config-simulation.h \ @@ -233,7 +233,7 @@ case ${build_config} in echo "====================================================================================================" cd "${top_builddir}" || die "cd failed" cmake -GNinja -DOT_PLATFORM=simulation -DOT_COMPILE_WARNING_AS_ERROR=ON -DOT_COVERAGE=${ot_coverage} \ - -DOT_THREAD_VERSION=1.3.1 -DOT_APP_CLI=OFF -DOT_APP_NCP=OFF -DOT_APP_RCP=ON \ + -DOT_THREAD_VERSION=1.4 -DOT_APP_CLI=OFF -DOT_APP_NCP=OFF -DOT_APP_RCP=ON \ -DOT_PLATFORM_KEY_REF=${ot_plat_key_ref} \ -DOT_PROJECT_CONFIG=../tests/toranj/openthread-core-toranj-config-simulation.h \ "${top_srcdir}" || die @@ -246,7 +246,7 @@ case ${build_config} in echo "====================================================================================================" cd "${top_builddir}" || die "cd failed" cmake -GNinja -DOT_PLATFORM=posix -DOT_COMPILE_WARNING_AS_ERROR=ON -DOT_COVERAGE=${ot_coverage} \ - -DOT_THREAD_VERSION=1.3.1 -DOT_APP_CLI=ON -DOT_APP_NCP=ON -DOT_APP_RCP=OFF \ + -DOT_THREAD_VERSION=1.4 -DOT_APP_CLI=ON -DOT_APP_NCP=ON -DOT_APP_RCP=OFF \ -DOT_PLATFORM_KEY_REF=${ot_plat_key_ref} \ -DOT_PROJECT_CONFIG=../tests/toranj/openthread-core-toranj-config-posix.h \ "${top_srcdir}" || die @@ -259,7 +259,7 @@ case ${build_config} in echo "====================================================================================================" cd "${top_builddir}" || die "cd failed" cmake -GNinja -DOT_PLATFORM=posix -DOT_COMPILE_WARNING_AS_ERROR=ON -DOT_COVERAGE=${ot_coverage} \ - -DOT_THREAD_VERSION=1.3.1 -DOT_APP_CLI=ON -DOT_APP_NCP=ON -DOT_APP_RCP=OFF \ + -DOT_THREAD_VERSION=1.4 -DOT_APP_CLI=ON -DOT_APP_NCP=ON -DOT_APP_RCP=OFF \ -DOT_15_4=ON -DOT_TREL=OFF \ -DOT_PLATFORM_KEY_REF=${ot_plat_key_ref} \ -DOT_PROJECT_CONFIG=../tests/toranj/openthread-core-toranj-config-posix.h \ @@ -273,7 +273,7 @@ case ${build_config} in echo "====================================================================================================" cd "${top_builddir}" || die "cd failed" cmake -GNinja -DOT_PLATFORM=posix -DOT_COMPILE_WARNING_AS_ERROR=ON -DOT_COVERAGE=${ot_coverage} \ - -DOT_THREAD_VERSION=1.3.1 -DOT_APP_CLI=ON -DOT_APP_NCP=ON -DOT_APP_RCP=OFF \ + -DOT_THREAD_VERSION=1.4 -DOT_APP_CLI=ON -DOT_APP_NCP=ON -DOT_APP_RCP=OFF \ -DOT_15_4=OFF -DOT_TREL=ON \ -DOT_PLATFORM_KEY_REF=${ot_plat_key_ref} \ -DOT_PROJECT_CONFIG=../tests/toranj/openthread-core-toranj-config-posix.h \ @@ -287,7 +287,7 @@ case ${build_config} in echo "====================================================================================================" cd "${top_builddir}" || die "cd failed" cmake -GNinja -DOT_PLATFORM=posix -DOT_COMPILE_WARNING_AS_ERROR=ON -DOT_COVERAGE=${ot_coverage} \ - -DOT_THREAD_VERSION=1.3.1 -DOT_APP_CLI=ON -DOT_APP_NCP=ON -DOT_APP_RCP=OFF \ + -DOT_THREAD_VERSION=1.4 -DOT_APP_CLI=ON -DOT_APP_NCP=ON -DOT_APP_RCP=OFF \ -DOT_15_4=ON -DOT_TREL=ON \ -DOT_PLATFORM_KEY_REF=${ot_plat_key_ref} \ -DOT_PROJECT_CONFIG=../tests/toranj/openthread-core-toranj-config-posix.h \ @@ -301,7 +301,7 @@ case ${build_config} in echo "====================================================================================================" cd "${top_builddir}" || die "cd failed" cmake -GNinja -DOT_PLATFORM=simulation -DOT_COMPILE_WARNING_AS_ERROR=ON -DOT_COVERAGE=${ot_coverage} \ - -DOT_THREAD_VERSION=1.3.1 -DOT_APP_CLI=ON -DOT_APP_NCP=ON -DOT_APP_RCP=ON \ + -DOT_THREAD_VERSION=1.4 -DOT_APP_CLI=ON -DOT_APP_NCP=ON -DOT_APP_RCP=ON \ -DOT_PLATFORM_KEY_REF=${ot_plat_key_ref} \ -DOT_PROJECT_CONFIG=../tests/toranj/openthread-core-toranj-config-simulation.h \ "${top_srcdir}" || die diff --git a/tests/toranj/cli/test-020-net-diag-vendor-info.py b/tests/toranj/cli/test-020-net-diag-vendor-info.py index a8bb7daaa..463854a9c 100755 --- a/tests/toranj/cli/test-020-net-diag-vendor-info.py +++ b/tests/toranj/cli/test-020-net-diag-vendor-info.py @@ -76,12 +76,12 @@ VENDOR_APP_URL = 35 r1.set_vendor_name('nest') r1.set_vendor_model('marble') -r1.set_vendor_sw_version('ot-1.3.1') +r1.set_vendor_sw_version('ot-1.4') r1.set_vendor_app_url('https://example.com/vendor-app') verify(r1.get_vendor_name() == 'nest') verify(r1.get_vendor_model() == 'marble') -verify(r1.get_vendor_sw_version() == 'ot-1.3.1') +verify(r1.get_vendor_sw_version() == 'ot-1.4') verify(r1.get_vendor_app_url() == 'https://example.com/vendor-app') #- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -