diff --git a/examples/tv-casting-app/android/args.gni b/examples/tv-casting-app/android/args.gni index 3cde6a704dbab7..fa55c9b3c46e1f 100644 --- a/examples/tv-casting-app/android/args.gni +++ b/examples/tv-casting-app/android/args.gni @@ -34,4 +34,6 @@ chip_config_network_layer_ble = false chip_max_discovered_ip_addresses = 20 +chip_max_device_name_len = 128 + enable_rtti = true diff --git a/examples/tv-casting-app/darwin/args.gni b/examples/tv-casting-app/darwin/args.gni index 1158e98e5f2d99..b36fbab2097475 100644 --- a/examples/tv-casting-app/darwin/args.gni +++ b/examples/tv-casting-app/darwin/args.gni @@ -38,3 +38,5 @@ chip_enable_rotating_device_id = true chip_config_network_layer_ble = false chip_max_discovered_ip_addresses = 20 + +chip_max_device_name_len = 128 diff --git a/examples/tv-casting-app/linux/args.gni b/examples/tv-casting-app/linux/args.gni index 03ba28645f8940..02751b24c2b16f 100644 --- a/examples/tv-casting-app/linux/args.gni +++ b/examples/tv-casting-app/linux/args.gni @@ -32,4 +32,6 @@ chip_enable_rotating_device_id = true chip_max_discovered_ip_addresses = 20 +chip_max_device_name_len = 128 + matter_enable_tracing_support = true diff --git a/src/lib/dnssd/Types.h b/src/lib/dnssd/Types.h index 15dbf90670ac34..4ff80db9712a6a 100644 --- a/src/lib/dnssd/Types.h +++ b/src/lib/dnssd/Types.h @@ -200,7 +200,7 @@ struct OperationalNodeData void Reset() { peerId = PeerId(); } }; -inline constexpr size_t kMaxDeviceNameLen = 32; +inline constexpr size_t kMaxDeviceNameLen = CHIP_DEVICE_CONFIG_MAX_DEVICE_NAME_LEN; inline constexpr size_t kMaxRotatingIdLen = 50; inline constexpr size_t kMaxPairingInstructionLen = 128; diff --git a/src/platform/BUILD.gn b/src/platform/BUILD.gn index 048b7e96af9025..9f899eb95342fd 100644 --- a/src/platform/BUILD.gn +++ b/src/platform/BUILD.gn @@ -81,6 +81,9 @@ if (chip_device_platform != "none" && chip_device_platform != "external") { # Define the default number of ip addresses to discover chip_max_discovered_ip_addresses = 5 + # Maximum length of the deviceName in the node discovery data + chip_max_device_name_len = 32 + # Allows enabling dynamic setting of the local MRP configuration, for # devices with multiple radios that have different sleep behavior for # different radios. @@ -380,7 +383,10 @@ if (chip_device_platform != "none" && chip_device_platform != "external") { defines += [ "CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID=${chip_device_config_device_product_id}" ] } - defines += [ "CHIP_DEVICE_CONFIG_MAX_DISCOVERED_IP_ADDRESSES=${chip_max_discovered_ip_addresses}" ] + defines += [ + "CHIP_DEVICE_CONFIG_MAX_DISCOVERED_IP_ADDRESSES=${chip_max_discovered_ip_addresses}", + "CHIP_DEVICE_CONFIG_MAX_DEVICE_NAME_LEN=${chip_max_device_name_len}", + ] visibility = [ ":platform_config_header",