1# Bluetooth mesh configuration options 2 3# Copyright (c) 2017 Intel Corporation 4# SPDX-License-Identifier: Apache-2.0 5 6menuconfig BT_MESH 7 bool "Bluetooth mesh support" 8 depends on BT_OBSERVER && BT_BROADCASTER 9 help 10 This option enables Bluetooth mesh support. The specific 11 features that are available may depend on other features 12 that have been enabled in the stack, such as GATT support. 13 14if BT_MESH 15 16################################################################################################### 17# Invisible options 18################################################################################################### 19 20# Virtual option enabled whenever Proxy Server or Client is needed 21config BT_MESH_PROXY 22 bool 23 24config BT_MESH_GATT 25 bool 26 27config BT_MESH_PROXY_MSG_LEN 28 int 29 default 66 if BT_MESH_PB_GATT_COMMON 30 default 33 if BT_MESH_GATT_PROXY 31 depends on BT_MESH_GATT 32 33config BT_MESH_GATT_CLIENT 34 bool 35 select BT_MESH_GATT 36 37config BT_MESH_GATT_SERVER 38 bool 39 select BT_MESH_GATT 40 select BT_GATT_DYNAMIC_DB 41 42config BT_MESH_PB_GATT_COMMON 43 bool 44 45# Virtual option enabled whenever Generic Provisioning layer is needed 46config BT_MESH_PROV 47 bool 48 49################################################################################################### 50# Visible options 51################################################################################################### 52 53menu "Advertiser" 54 55choice BT_MESH_ADV 56 prompt "Advertiser mode" 57 default BT_MESH_ADV_EXT if BT_EXT_ADV 58 default BT_MESH_ADV_LEGACY 59 60menuconfig BT_MESH_ADV_LEGACY 61 bool "Legacy advertising" 62 help 63 Use legacy advertising commands for mesh sending. Legacy 64 advertising is significantly slower than the extended advertising, but 65 is supported by all controllers. 66 67 WARNING: The legacy advertiser can occasionally do more message 68 retransmissions than requested because of limitations of HCI 69 interface API. 70 71if BT_MESH_ADV_LEGACY 72 73config BT_MESH_ADV_STACK_SIZE 74 int "Mesh advertiser thread stack size" 75 default 1024 if BT_HOST_CRYPTO 76 default 776 if BT_MESH_PRIV_BEACONS 77 default 768 78 help 79 Size of bt mesh adv thread stack. 80 81 NOTE: This is an advanced setting and should not be changed unless 82 absolutely necessary 83 84config BT_MESH_ADV_PRIO 85 int "Mesh advertiser thread priority" 86 default 7 87 help 88 Priority of bt mesh adv thread. 89 90 NOTE: This is an advanced setting and should not be changed unless 91 absolutely necessary 92 93endif # BT_MESH_ADV_LEGACY 94 95menuconfig BT_MESH_ADV_EXT 96 bool "Extended advertising" 97 depends on BT_CTLR_ADV_EXT || !BT_CTLR 98 depends on BT_EXT_ADV 99 help 100 Use extended advertising commands for operating the advertiser. 101 Extended advertising is faster and uses less memory than legacy 102 advertising, but isn't supported by all controllers. 103 104if BT_MESH_ADV_EXT 105 106config BT_MESH_RELAY_ADV_SETS 107 int "Maximum of simultaneous relay message support" 108 default 0 109 range 0 BT_EXT_ADV_MAX_ADV_SET 110 depends on BT_MESH_RELAY 111 help 112 Maximum of simultaneous relay message support. Requires controller support 113 multiple advertising sets. 114 115config BT_MESH_ADV_EXT_RELAY_USING_MAIN_ADV_SET 116 bool "Use the main advertising set to relay messages" 117 depends on BT_MESH_RELAY_ADV_SETS > 0 118 help 119 When this option is enabled, there is a message that needs to be 120 relayed, all relay advertising sets defined by 121 CONFIG_BT_MESH_RELAY_ADV_SETS are busy with relaying messages 122 and the main advertising set is not busy with sending local 123 messages, the stack will use the main advertising set to relay 124 the message. This maximizes the utilization efficiency of 125 advertising sets, which is helpful for the sending of dense 126 relays. With CONFIG_BT_MESH_RELAY_RETRANSMIT_COUNT value 127 greater than zero, this can noticeably delay transmission of 128 local messages. When Friend feature is enabled and the node is 129 in a friendship, this option can delay transmission of local 130 messages thus requiring bigger CONFIG_BT_MESH_FRIEND_RECV_WIN 131 value. This in turn will result in increase of the power 132 consumption of the Low Power node. 133 134config BT_MESH_ADV_EXT_GATT_SEPARATE 135 bool "Use a separate extended advertising set for GATT Server Advertising" 136 depends on BT_MESH_GATT_SERVER 137 help 138 Use a separate extended advertising set for GATT Server Advertising, 139 otherwise a shared advertising set will be used. 140 141config BT_MESH_ADV_EXT_FRIEND_SEPARATE 142 bool "Use a separate extended advertising set for Friend advertising" 143 depends on BT_MESH_FRIEND 144 help 145 Use a separate extended advertising set for Friend advertising, 146 otherwise a shared advertising set will be used. Using the separate 147 extended advertising set makes the Friend node send friendship 148 messages as close to the start of the ReceiveWindow as possible, 149 thus reducing the scanning time on the Low Power node. 150 151endif # BT_MESH_ADV_EXT 152 153endchoice 154 155config BT_MESH_ADV_BUF_COUNT 156 int "Number of advertising buffers for local messages" 157 default 6 158 range 1 256 159 help 160 Number of advertising buffers available for sending local messages. 161 This should be chosen based on the number of local messages that the node 162 can send simultaneously. 163 164config BT_MESH_DEBUG_USE_ID_ADDR 165 bool "Use identity address for all advertising" 166 help 167 This option forces the usage of the local identity address for 168 all advertising. This can be a help for debugging (analyzing 169 traces), however it should never be enabled for a production 170 build as it compromises the privacy of the device. 171 172endmenu # Advertiser 173 174menu "Provisioning" 175 176menuconfig BT_MESH_PB_ADV 177 bool "PB-ADV support" 178 select BT_MESH_PROV 179 default y 180 help 181 Enable this option to allow the device to be provisioned over 182 the advertising bearer. 183 184config BT_MESH_UNPROV_BEACON_INT 185 int 186 prompt "The interval (in seconds) to send the unprovisioned beacon" if BT_MESH_PB_ADV 187 default 5 188 range 1 10 189 help 190 This option specifies the interval (in seconds) at which the 191 device sends unprovisioned beacon. 192 193if BT_MESH_PB_ADV 194 195config BT_MESH_PB_ADV_RETRANS_TIMEOUT 196 int "Timeout value of retransmit provisioning PDUs" 197 default 500 198 range 100 800 199 help 200 Timeout value of retransmit provisioning PDUs. 201 202endif # BT_MESH_PB_ADV 203 204if BT_CONN 205 206config BT_MESH_PB_GATT 207 bool "PB-GATT Server support" 208 select BT_MESH_GATT_SERVER 209 select BT_MESH_PROV 210 select BT_MESH_PB_GATT_COMMON 211 select BT_MESH_PROV_DEVICE 212 help 213 Enable this option to allow the device to be provisioned over 214 GATT. 215 216config BT_MESH_PB_GATT_USE_DEVICE_NAME 217 bool "Include Bluetooth device name in scan response" 218 depends on BT_MESH_PB_GATT 219 default y 220 help 221 This option includes GAP device name in scan response when 222 the PB-GATT is enabled. 223 224config BT_MESH_PB_GATT_CLIENT 225 bool "PB-GATT Client support" 226 select BT_MESH_PROV 227 select BT_GATT_CLIENT 228 select BT_MESH_GATT_CLIENT 229 select BT_MESH_PB_GATT_COMMON 230 select BT_MESH_PROVISIONER 231 depends on BT_CENTRAL 232 help 233 Enable this option to allow the provisioner provisioning the 234 device over GATT. 235 236endif # BT_CONN 237 238config BT_MESH_PROV_DEVICE 239 bool "Provisioning device role support" 240 depends on BT_MESH_PB_ADV || BT_MESH_PB_GATT 241 default y 242 help 243 Enable this option to allow the device to be provisioned into a mesh network. 244 245config BT_MESH_PROV_OOB_PUBLIC_KEY 246 bool "OOB Public key support" 247 depends on BT_MESH_PROV_DEVICE 248 help 249 Enable this option if public key is to be exchanged via Out of Band (OOB) technology. 250 251config BT_MESH_PROVISIONER 252 bool "Provisioner support" 253 depends on BT_MESH_CDB 254 depends on BT_MESH_PROV 255 depends on BT_MESH_PB_ADV || BT_MESH_PB_GATT_CLIENT 256 help 257 Enable this option to have support for provisioning remote devices. 258 259menuconfig BT_MESH_CDB 260 bool "Mesh Configuration Database" 261 262if BT_MESH_CDB 263 264config BT_MESH_CDB_NODE_COUNT 265 int "Maximum number of nodes in the database" 266 default 8 267 range 1 4096 268 help 269 This option specifies how many nodes each network can at most 270 save in the configuration database. 271 272config BT_MESH_CDB_SUBNET_COUNT 273 int "Maximum number of subnets in the database" 274 default 1 275 range 1 4096 276 help 277 This option specifies how many subnets that can at most be 278 saved in the configuration database. 279 280config BT_MESH_CDB_APP_KEY_COUNT 281 int "Maximum number of application keys in the database" 282 default 1 283 range 1 4096 284 help 285 This option specifies how many application keys that can at most 286 be saved in the configuration database. 287 288endif # BT_MESH_CDB 289 290endmenu # Provisioning 291 292menu "Network layer" 293 294config BT_MESH_LOOPBACK_BUFS 295 int "Number of loopback buffers" 296 default 3 297 help 298 The number of buffers allocated for the network loopback mechanism. 299 Loopback is used when the device sends messages to itself. 300 301config BT_MESH_NETWORK_TRANSMIT_COUNT 302 int "Network Transmit Count" 303 default 2 304 range 0 7 305 help 306 Controls the initial number of retransmissions of original messages, 307 in addition to the first transmission. Can be changed through runtime 308 configuration. 309 310config BT_MESH_NETWORK_TRANSMIT_INTERVAL 311 int "Network Transmit Interval" 312 default 20 313 range 10 330 314 help 315 Controls the initial interval between retransmissions of original 316 messages, in milliseconds. Can be changed through runtime 317 configuration. 318 319config BT_MESH_MSG_CACHE_SIZE 320 int "Network message cache size" 321 default 32 322 range 2 65535 323 help 324 Number of messages that are cached by the node to avoid acting on the 325 recently seen duplicate messages. This option is similar to 326 the replay protection list, but has a different purpose. Network message 327 cache helps prevent unnecessary decryption operations. This also prevents 328 unnecessary relaying and helps in getting rid of relay loops. Setting 329 this value to a very low number can cause unnecessary network traffic. 330 Setting this value to a very large number can impact the processing time 331 for each received network PDU and increases RAM footprint proportionately. 332 333menuconfig BT_MESH_RELAY 334 bool "Relay support" 335 help 336 Support for acting as a Mesh Relay Node. 337 338if BT_MESH_RELAY 339 340config BT_MESH_RELAY_ENABLED 341 bool "Relay feature enabled by default" 342 default y 343 help 344 Controls whether the Relay feature is enabled by default when the 345 device boots up for the first time or unprovisioned. Can be changed 346 at runtime using bt_mesh_relay_set() function. 347 348config BT_MESH_RELAY_RETRANSMIT_COUNT 349 int "Relay Retransmit Count" 350 default 2 351 range 0 7 352 help 353 Controls the initial number of retransmissions of relayed messages, in 354 addition to the first transmission. Can be changed through runtime 355 configuration. 356 357config BT_MESH_RELAY_RETRANSMIT_INTERVAL 358 int "Relay Retransmit Interval" 359 default 20 360 range 10 330 361 help 362 Controls the initial interval between retransmissions of relayed 363 messages, in milliseconds. Can be changed through runtime 364 configuration. 365 366config BT_MESH_RELAY_BUF_COUNT 367 int "Number of advertising buffers for relayed messages" 368 default 32 369 range 1 256 370 help 371 Number of advertising buffers available for messages to be relayed. 372 High number of advertising buffers increases the reliability of the 373 mesh network. Low number of advertising buffers reduces the message 374 latency on the Relay Node, but at the same time increases the amount 375 of packet drops. When considering the message latency, also consider 376 the values of BT_MESH_RELAY_RETRANSMIT_COUNT and 377 BT_MESH_RELAY_RETRANSMIT_INTERVAL. A higher number of 378 BT_MESH_RELAY_ADV_SETS allows the increase in the number of buffers 379 while maintaining the latency. 380 381endif # BT_MESH_RELAY 382 383endmenu # Network layer 384 385menu "Transport layer" 386 387menu "Transport SAR configuration" 388 389config BT_MESH_TX_SEG_MSG_COUNT 390 int "Maximum number of simultaneous outgoing segmented messages" 391 default 1 392 range 0 255 393 help 394 Maximum number of simultaneous outgoing multi-segment and/or 395 reliable messages. 396 397 Note that: Since Mesh Segmentation/reassembling is a mandatory 398 feature of specification, set to zero will not allow send any 399 Mesh Segment message. 400 401config BT_MESH_RX_SEG_MSG_COUNT 402 int "Maximum number of simultaneous incoming segmented messages" 403 default 1 404 range 0 255 405 help 406 Maximum number of simultaneous incoming multi-segment and/or 407 reliable messages. 408 409 Note that: Since Mesh Segmentation/reassemblying is a mandatory 410 feature of specification, set to zero will not allow receive any 411 Mesh Segment message. 412 413config BT_MESH_SEG_BUFS 414 int "Number of segment buffers available" 415 default 64 416 range BT_MESH_RX_SEG_MAX 16384 if BT_MESH_RX_SEG_MAX > \ 417 BT_MESH_TX_SEG_MAX 418 range BT_MESH_TX_SEG_MAX 16384 419 help 420 The incoming and outgoing segmented messages allocate their 421 segments from the same pool. Each segment is a 12 byte block, 422 and may only be used by one message at the time. 423 424 Outgoing messages will allocate their segments at the start of the 425 transmission, and release them one by one as soon as they have been 426 acknowledged by the receiver. Incoming messages allocate all their 427 segments at the start of the transaction, and won't release them until 428 the message is fully received. 429 430config BT_MESH_RX_SEG_MAX 431 int "Maximum number of segments in incoming messages" 432 default 6 if BT_MESH_BLOB_SRV || BT_MESH_BLOB_CLI || \ 433 BT_MESH_RPR_SRV || BT_MESH_RPR_CLI 434 default 3 435 range 1 32 436 depends on BT_MESH_RX_SEG_MSG_COUNT > 0 437 help 438 Maximum number of segments supported for incoming messages. 439 This value should typically be fine-tuned based on what 440 models the local node supports, i.e. what's the largest 441 message payload that the node needs to be able to receive. 442 This value affects memory and call stack consumption, which 443 is why the default is lower than the maximum that the 444 specification would allow (32 segments). 445 446 The maximum incoming SDU size is 12 times this number (out of 447 which 4 or 8 bytes is used for the Transport Layer MIC). For 448 example, 5 segments means the maximum SDU size is 60 bytes, 449 which leaves 56 bytes for application layer data using a 450 4-byte MIC and 52 bytes using an 8-byte MIC. 451 452config BT_MESH_TX_SEG_MAX 453 int "Maximum number of segments in outgoing messages" 454 default 6 if BT_MESH_BLOB_SRV || BT_MESH_BLOB_CLI || \ 455 BT_MESH_RPR_SRV || BT_MESH_RPR_CLI 456 default 3 457 range 1 32 458 depends on BT_MESH_TX_SEG_MSG_COUNT > 0 459 help 460 Maximum number of segments supported for outgoing messages. 461 This value should typically be fine-tuned based on what 462 models the local node supports, i.e. what's the largest 463 message payload that the node needs to be able to send. 464 This value affects memory consumption, which is why the 465 default is lower than the maximum that the specification 466 would allow (32 segments). 467 468 The maximum outgoing SDU size is 12 times this number (out of 469 which 4 or 8 bytes is used for the Transport Layer MIC). For 470 example, 5 segments means the maximum SDU size is 60 bytes, 471 which leaves 56 bytes for application layer data using a 472 4-byte MIC and 52 bytes using an 8-byte MIC. 473 474if !BT_MESH_V1d1 475 476config BT_MESH_TX_SEG_RETRANS_COUNT 477 int "Transport message segment retransmit attempts" 478 default 4 479 range 1 8 480 help 481 Maximum number of transport message segment retransmit attempts 482 for outgoing segment message. 483 484config BT_MESH_TX_SEG_RETRANS_TIMEOUT_UNICAST 485 int "Transport message segment retransmit interval for unicast messages" 486 default 400 487 range 200 500 488 help 489 Maximum time of retransmit segment message to unicast address. 490 491config BT_MESH_TX_SEG_RETRANS_TIMEOUT_GROUP 492 int "Transport message segment retransmit interval for group messages" 493 default 50 494 range 20 200 495 help 496 Maximum time of retransmit segment message to group address. 497 498config BT_MESH_SEG_ACK_BASE_TIMEOUT 499 int "SegAck transmission base timeout" 500 default 150 501 range 150 400 502 help 503 Defines a base timeout for the acknowledgment timer used to delay 504 transmission of the Segmented Acknowledgment message. 505 506config BT_MESH_SEG_ACK_PER_HOP_TIMEOUT 507 int "SegAck transmission timeout per hop" 508 default 50 509 range 50 250 510 help 511 Defines an additional per-hop timeout for the acknowledgment timer 512 used to delay transmission of the Segmented Acknowledgment message. 513 514config BT_MESH_SEG_ACK_PER_SEGMENT_TIMEOUT 515 int "SegAck transmission timeout per segment not yet received" 516 default 0 517 range 0 100 518 help 519 Defines an additional timeout for the acknowledgment timer for every 520 segment not yet received. 521 522endif # !BT_MESH_V1d1 523 524endmenu # Transport SAR configuration 525 526config BT_MESH_DEFAULT_TTL 527 int "Default TTL value" 528 default 7 529 range 0 128 530 help 531 Controls the default TTL value for outgoing messages. Can be changed 532 through runtime configuration. 533 534menu "Replay Protection List" 535 536config BT_MESH_CRPL 537 int "Maximum capacity of the replay protection list" 538 default 10 539 range 2 65535 540 help 541 This options specifies the maximum capacity of the replay 542 protection list. This option is similar to the network message 543 cache size, but has a different purpose. 544 545choice BT_MESH_RPL_STORAGE_MODE 546 prompt "Replay protection list storage mode" 547 default BT_MESH_RPL_STORAGE_MODE_SETTINGS 548 549config BT_MESH_RPL_STORAGE_MODE_SETTINGS 550 bool "Persistent storage of RPL in Settings" 551 help 552 Persistent storage of RPL in Settings. If BT_SETTINGS is not 553 enabled this choise will provide a non-persistent implementation 554 variant of the RPL list. 555 556endchoice 557 558endmenu # Replay Protection List 559 560endmenu # Transport layer 561 562menu "Access layer" 563 564config BT_MESH_ACCESS_LAYER_MSG 565 bool "Direct Bluetooth message access layer messages" 566 help 567 This option allows the application to directly access 568 Bluetooth access layer messages without the need to 569 instantiate Bluetooth mesh models. 570 571config BT_MESH_MODEL_VND_MSG_CID_FORCE 572 bool "Force vendor model to use the corresponding CID field message" 573 default y 574 help 575 This option forces vendor model to use messages for the 576 corresponding CID field. 577 578config BT_MESH_MODEL_EXTENSIONS 579 bool "Support for Model extensions" 580 help 581 Enable support for the model extension concept, allowing the Access 582 layer to know about mesh model relationships. 583 584config BT_MESH_LABEL_NO_RECOVER 585 bool "[DEPRECATED] Don't recover Label UUIDs from groups address subscription list" 586 select DEPRECATED 587 depends on BT_MESH_LABEL_COUNT > 0 588 help 589 After adding support for virtual addresses with collision (where two Label UUIDs have the 590 same virtual address), the format of the data in the persistent storage with the Label 591 UUIDs which a model is subscribed to or publishes to has been changed. The recovery 592 code is added and the Label UUIDs will be recovered by picking first Label UUID matching 593 to the virtual address in the subscription list or model publication. This options can 594 disable the recovery code and save some flash if the recovery is not required (e.g. 595 virtual address support wasn't enabled before this option was added, or the devices were 596 unprovisioned before upgrading to the version with this option). The option is marked as 597 deprecated to remove the recovery code eventually. 598 599endmenu # Access layer 600 601menu "Models" 602 603config BT_MESH_CFG_CLI 604 bool "Support for Configuration Client Model" 605 help 606 Enable support for the configuration client model. 607 608if BT_MESH_CFG_CLI 609 610config BT_MESH_CFG_CLI_TIMEOUT 611 int "Config Client model timeout in milliseconds" 612 default 5000 613 help 614 This timeout controls how long config client waits for a response 615 message to arrive. This value can be changed at runtime using 616 @ref bt_mesh_cfg_cli_timeout_set. 617 618endif # BT_MESH_CFG_CLI 619 620config BT_MESH_HEALTH_CLI 621 bool "Support for Health Client Model" 622 help 623 Enable support for the health client model. 624 625if BT_MESH_HEALTH_CLI 626 627config BT_MESH_HEALTH_CLI_TIMEOUT 628 int "Health Client model timeout in milliseconds" 629 default 2000 630 help 631 This timeout controls how long health client waits for a response 632 message to arrive. This value can be changed at runtime using 633 @ref bt_mesh_health_cli_timeout_set. 634 635endif # BT_MESH_HEALTH_CLI 636 637endmenu # Models 638 639menu "Proxy" 640 visible if BT_CONN 641 642menuconfig BT_MESH_GATT_PROXY 643 bool "GATT Proxy Service support" 644 select BT_MESH_GATT_SERVER 645 select BT_MESH_PROXY 646 help 647 This option enables support for the Mesh GATT Proxy Service, 648 i.e. the ability to act as a proxy between a Mesh GATT Client 649 and a Mesh network. 650 651if BT_MESH_GATT_PROXY 652 653config BT_MESH_GATT_PROXY_ENABLED 654 bool "GATT Proxy enabled" 655 depends on BT_MESH_GATT_PROXY 656 default y 657 help 658 Controls whether the GATT Proxy feature is enabled by default. 659 Can be changed through runtime configuration. 660 661config BT_MESH_NODE_ID_TIMEOUT 662 int "Node Identity advertising timeout" 663 range 1 60 664 default 60 665 help 666 This option determines for how long the local node advertises 667 using Node Identity. The given value is in seconds. The 668 specification limits this to 60 seconds, and implies that to 669 be the appropriate value as well, so just leaving this as the 670 default is the safest option. 671 672config BT_MESH_PROXY_USE_DEVICE_NAME 673 bool "Include Bluetooth device name in scan response" 674 help 675 This option includes GAP device name in scan response when 676 the GATT Proxy feature is enabled. 677 678config BT_MESH_PROXY_FILTER_SIZE 679 int "Maximum number of filter entries per Proxy Client" 680 default 16 681 range 1 32767 682 help 683 This option specifies how many Proxy Filter entries the local 684 node supports. This helps in reducing unwanted traffic getting sent to 685 the proxy client. This value is application specific and should be large 686 enough so that proxy client can communicate with several devices through 687 this proxy server node using the default accept list filter type. 688 689endif # BT_MESH_GATT_PROXY 690 691config BT_MESH_PROXY_CLIENT 692 bool "Proxy client support" 693 select BT_GATT_CLIENT 694 select BT_MESH_GATT_CLIENT 695 depends on BT_CENTRAL 696 help 697 This option enables support for the Mesh GATT Proxy Client, 698 i.e. the ability to act as a proxy between a Mesh GATT Service 699 and a Mesh network. 700 701endmenu # Proxy 702 703choice BT_MESH_CRYPTO_LIB 704 prompt "Crypto library:" 705 default BT_MESH_USES_TFM_PSA if BUILD_WITH_TFM 706 default BT_MESH_USES_TINYCRYPT 707 help 708 Crypto library selection for mesh security. 709 710config BT_MESH_USES_TINYCRYPT 711 bool "TinyCrypt" 712 select TINYCRYPT 713 select TINYCRYPT_AES 714 select TINYCRYPT_AES_CMAC 715 select TINYCRYPT_ECC_DH 716 select TINYCRYPT_SHA256 717 select TINYCRYPT_SHA256_HMAC 718 select BT_HOST_CCM 719 help 720 Use TinyCrypt library to perform crypto operations. 721 722config BT_MESH_USES_MBEDTLS_PSA 723 bool "mbed TLS PSA [EXPERIMENTAL]" 724 select EXPERIMENTAL 725 select MBEDTLS 726 select MBEDTLS_ZEPHYR_ENTROPY 727 select MBEDTLS_PSA_CRYPTO_C 728 select MBEDTLS_MAC_CMAC_ENABLED 729 select MBEDTLS_CIPHER_AES_ENABLED 730 select MBEDTLS_AES_ROM_TABLES 731 select MBEDTLS_CIPHER_CCM_ENABLED 732 select MBEDTLS_ECP_C 733 select MBEDTLS_ECDH_C 734 select MBEDTLS_ECDSA_C 735 select MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED 736 select MBEDTLS_ECP_DP_SECP256R1_ENABLED 737 select MBEDTLS_PK_WRITE_C 738 help 739 Use mbed TLS library to perform crypto operations. Support of 740 mbed TLS and PSA is experimental and only BabbleSim tests were run. 741 Mbed TLS still does not support ITS (internal trust storage) based 742 on Zephyr's settings subsystem. 743 Not possible to use for embedded devices yet. 744 745config BT_MESH_USES_TFM_PSA 746 bool "Use TF-M PSA [EXPERIMENTAL]" 747 select EXPERIMENTAL 748 depends on BUILD_WITH_TFM 749 help 750 Use TF-M that implements PSA security framework. Support of TF-M is 751 experimental. It is only possible to use with platforms that TF-M supports. 752 For more platform details see TF-M documentation. 753 754endchoice 755 756if BT_MESH_USES_MBEDTLS_PSA || BT_MESH_USES_TFM_PSA 757 758config BT_MESH_PSA_KEY_ID_USER_MIN_OFFSET 759 int "Offset of BLE Mesh key id range regarding PSA_KEY_ID_USER_MIN" 760 default 0 761 help 762 The PSA specification mandates to set key identifiers for keys 763 with persistent lifetime. The users of the PSA API is responsible 764 (BLE Mesh is user of PSA API) to provide correct and unique identifiers. 765 The BLE Mesh identifier range should be between PSA_KEY_ID_USER_MIN and 766 PSA_KEY_ID_USER_MAX. BLE Mesh requires two ids for each subnetwork, two ids 767 for each application key, and two ids for the device key and device key candidate. 768 It should consider the Mesh Configuration Database instances if database enabled. 769 770endif # BT_MESH_USES_MBEDTLS_PSA || BT_MESH_USES_TFM_PSA 771 772config BT_MESH_BEACON_ENABLED 773 bool "Secure network beacon enabled" 774 default y 775 help 776 Controls whether the Secure network beacon feature is enabled by 777 default. Can be changed through runtime configuration. 778 779menu "IV Index & Sequence number" 780 781config BT_MESH_IV_UPDATE_TEST 782 bool "Test the IV Update Procedure" 783 help 784 This option removes the 96 hour limit of the IV Update 785 Procedure and lets the state be changed at any time. 786 787config BT_MESH_IV_UPDATE_SEQ_LIMIT 788 hex "Sequence number limit to start iv update" 789 default 0x800000 790 range 0x000001 0xFFFFFE 791 help 792 This option specifies the sequence number value to start iv update. 793 794config BT_MESH_IVU_DIVIDER 795 int "Divider for IV Update state refresh timer" 796 default 4 797 range 2 96 798 help 799 When the IV Update state enters Normal operation or IV Update 800 in Progress, we need to keep track of how many hours has passed 801 in the state, since the specification requires us to remain in 802 the state at least for 96 hours (Update in Progress has an 803 additional upper limit of 144 hours). 804 805 In order to fulfill the above requirement, even if the node might 806 be powered off once in a while, we need to store persistently 807 how many hours the node has been in the state. This doesn't 808 necessarily need to happen every hour (thanks to the flexible 809 duration range). The exact cadence will depend a lot on the 810 ways that the node will be used and what kind of power source it 811 has. 812 813 Since there is no single optimal answer, this configuration 814 option allows specifying a divider, i.e. how many intervals 815 the 96 hour minimum gets split into. After each interval the 816 duration that the node has been in the current state gets 817 stored to flash. E.g. the default value of 4 means that the 818 state is saved every 24 hours (96 / 4). 819 820endmenu # IV Index & Sequence number 821 822menuconfig BT_MESH_LOW_POWER 823 bool "Support for Low Power features" 824 help 825 Enable this option to be able to act as a Low Power Node. 826 827if BT_MESH_LOW_POWER 828 829config BT_MESH_LPN_ESTABLISHMENT 830 bool "Perform Friendship establishment using low power" 831 default y 832 help 833 Perform the Friendship establishment using low power, with 834 the help of a reduced scan duty cycle. The downside of this 835 is that the node may miss out on messages intended for it 836 until it has successfully set up Friendship with a Friend 837 node. 838 839config BT_MESH_LPN_AUTO 840 bool "Automatically start looking for Friend nodes once provisioned" 841 default y 842 help 843 Automatically enable LPN functionality once provisioned and start 844 looking for Friend nodes. If this option is disabled LPN mode 845 needs to be manually enabled by calling bt_mesh_lpn_set(true). 846 847config BT_MESH_LPN_AUTO_TIMEOUT 848 int "Time from last received message before going to LPN mode" 849 default 15 850 range 0 3600 851 depends on BT_MESH_LPN_AUTO 852 help 853 Time in seconds from the last received message, that the node 854 will wait before starting to look for Friend nodes. 855 856config BT_MESH_LPN_RETRY_TIMEOUT 857 int "Retry timeout for Friend requests" 858 default 8 859 range 1 3600 860 help 861 Time in seconds between Friend Requests, if a previous Friend 862 Request did not receive any acceptable Friend Offers. 863 864config BT_MESH_LPN_RSSI_FACTOR 865 int "RSSIFactor, used in the Friend Offer Delay calculation" 866 range 0 3 867 default 0 868 help 869 The contribution of the RSSI measured by the Friend node used 870 in Friend Offer Delay calculations. 0 = 1, 1 = 1.5, 2 = 2, 3 = 2.5. 871 872config BT_MESH_LPN_RECV_WIN_FACTOR 873 int "ReceiveWindowFactor, used in the Friend Offer Delay calculation" 874 range 0 3 875 default 0 876 help 877 The contribution of the supported Receive Window used in 878 Friend Offer Delay calculations. 0 = 1, 1 = 1.5, 2 = 2, 3 = 2.5. 879 880config BT_MESH_LPN_MIN_QUEUE_SIZE 881 int "Minimum size of acceptable friend queue (MinQueueSizeLog)" 882 range 1 7 883 default 1 884 help 885 The MinQueueSizeLog field is defined as log_2(N), where N is 886 the minimum number of maximum size Lower Transport PDUs that 887 the Friend node can store in its Friend Queue. As an example, 888 MinQueueSizeLog value 1 gives N = 2, and value 7 gives N = 128. 889 890config BT_MESH_LPN_RECV_DELAY 891 int "Receive delay requested by the local node" 892 range 50 255 if BT_MESH_ADV_LEGACY 893 range 10 255 894 default 100 895 help 896 The ReceiveDelay is the time between the Low Power node 897 sending a request and listening for a response. This delay 898 allows the Friend node time to prepare the response. The value 899 is in units of milliseconds. When BT_MESH_ADV_LEGACY is used, 900 the minimal value for the delay can not be less than 50ms due 901 to a limitation in the legacy advertiser implementation. 902 903config BT_MESH_LPN_POLL_TIMEOUT 904 int "The value of the PollTimeout timer" 905 range 10 244735 906 default 300 907 help 908 PollTimeout timer is used to measure time between two 909 consecutive requests sent by the Low Power node. If no 910 requests are received by the Friend node before the 911 PollTimeout timer expires, then the friendship is considered 912 terminated. The value is in units of 100 milliseconds, so e.g. 913 a value of 300 means 30 seconds. 914 915config BT_MESH_LPN_INIT_POLL_TIMEOUT 916 int "The starting value of the PollTimeout timer" 917 range 10 BT_MESH_LPN_POLL_TIMEOUT 918 default BT_MESH_LPN_POLL_TIMEOUT 919 help 920 The initial value of the PollTimeout timer when Friendship 921 gets established for the first time. After this the timeout 922 will gradually grow toward the actual PollTimeout, doubling 923 in value for each iteration. The value is in units of 100 924 milliseconds, so e.g. a value of 300 means 30 seconds. 925 926config BT_MESH_LPN_SCAN_LATENCY 927 int "Latency for enabling scanning" 928 range 0 50 929 default 15 930 help 931 Latency in milliseconds that it takes to enable scanning. This 932 is in practice how much time in advance before the Receive Window 933 that scanning is requested to be enabled. 934 935config BT_MESH_LPN_GROUPS 936 int "Number of groups the LPN can subscribe to" 937 range 0 16384 938 default 8 939 help 940 Maximum number of groups that the LPN can subscribe to. 941 942config BT_MESH_LPN_SUB_ALL_NODES_ADDR 943 bool "Automatically subscribe all nodes address" 944 help 945 Automatically subscribe all nodes address when friendship 946 established. 947 948endif # BT_MESH_LOW_POWER 949 950menuconfig BT_MESH_FRIEND 951 bool "Support for acting as a Friend Node" 952 help 953 Enable this option to be able to act as a Friend Node. 954 955if BT_MESH_FRIEND 956 957config BT_MESH_FRIEND_ENABLED 958 bool "Friend feature enabled by default" 959 default y 960 help 961 Controls whether the Friend feature is enabled by default when the 962 device boots up for the first time or unprovisioned. Can be changed 963 at runtime using bt_mesh_friend_set() function. 964 965config BT_MESH_FRIEND_RECV_WIN 966 int "Friend Receive Window" 967 range 1 255 968 default 255 969 help 970 Receive Window in milliseconds supported by the Friend node. 971 972config BT_MESH_FRIEND_QUEUE_SIZE 973 int "Minimum number of buffers supported per Friend Queue" 974 range 2 65536 975 default 16 976 help 977 Minimum number of buffers available to be stored for each 978 local Friend Queue. 979 980config BT_MESH_FRIEND_SUB_LIST_SIZE 981 int "Friend Subscription List Size" 982 range 0 1023 983 default 3 984 help 985 Size of the Subscription List that can be supported by a 986 Friend node for a Low Power node. 987 988config BT_MESH_FRIEND_LPN_COUNT 989 int "Number of supported LPN nodes" 990 range 1 1000 991 default 2 992 help 993 Number of Low Power Nodes the Friend can have a Friendship 994 with simultaneously. 995 996config BT_MESH_FRIEND_SEG_RX 997 int "Number of incomplete segment lists per LPN" 998 range 1 1000 999 default 1 1000 help 1001 Number of incomplete segment lists that we track for each LPN 1002 that we are Friends for. In other words, this determines how 1003 many elements we can simultaneously be receiving segmented 1004 messages from when the messages are going into the Friend queue. 1005 1006config BT_MESH_FRIEND_ADV_LATENCY 1007 int "Latency for enabling advertising" 1008 range 0 4 1009 default 0 1010 help 1011 Latency in milliseconds between request for and start of Friend 1012 advertising. Used to tune the ReceiveDelay, making Friend 1013 start sending a message earlier thus compensating for the time between 1014 pushing the message to the Bluetooth host and the actual advertising 1015 start. 1016 1017endif # BT_MESH_FRIEND 1018 1019menuconfig BT_MESH_V1d1 1020 bool "Bluetooth mesh v1.1 support [EXPERIMENTAL]" 1021 select EXPERIMENTAL 1022 help 1023 This option enables Bluetooth mesh v1.1 support. Bluetooth mesh v1.1 1024 is backward compatible with v1.0.1. The stack cannot be qualified 1025 with this option enabled because the Bluetooth mesh v1.1 specification 1026 is in a draft state. 1027 1028config BT_MESH_ECDH_P256_CMAC_AES128_AES_CCM 1029 bool "Support CMAC AES128 for OOB authentication" if BT_MESH_V1d1 1030 depends on BT_MESH_PROV 1031 default y 1032 help 1033 Enable this option to support CMAC AES128 for OOB authentication. 1034 1035if BT_MESH_V1d1 1036 1037config BT_MESH_ECDH_P256_HMAC_SHA256_AES_CCM 1038 bool "Support HMAC SHA256 for OOB authentication" 1039 depends on BT_MESH_PROV 1040 default y 1041 help 1042 Enable this option to support HMAC SHA256 for OOB authentication. 1043 1044config BT_MESH_OOB_AUTH_REQUIRED 1045 bool "OOB authentication mandates to use HMAC SHA256" 1046 depends on BT_MESH_ECDH_P256_HMAC_SHA256_AES_CCM 1047 1048menuconfig BT_MESH_BLOB_SRV 1049 bool "Support for BLOB Transfer Server model" 1050 help 1051 Enable the Binary Large Object (BLOB) Transfer Server model. 1052 1053if BT_MESH_BLOB_SRV 1054 1055config BT_MESH_BLOB_SRV_PULL_REQ_COUNT 1056 int "Number of chunks to request for each pull" 1057 default 4 1058 range 1 16 1059 help 1060 In Pull mode (Pull BLOB Transfer Mode), the BLOB Transfer Server 1061 requests a fixed number of chunks from the Client. Use this option to 1062 control the chunk count in the request. If the BLOB Transfer Server 1063 is instantiated on a Low Power node, the pull request count will be 1064 trimmed to not overflow the Friend queue. 1065 1066config BT_MESH_BLOB_SIZE_MAX 1067 int "Largest BLOB size in bytes" 1068 default 524288 1069 range 1 3257617792 1070 help 1071 The maximum object size a BLOB Transfer Server can receive. 1072 1073config BT_MESH_BLOB_BLOCK_SIZE_MIN 1074 int "Minimum block size" 1075 default 4096 1076 range 64 1048576 # 2^6 - 2^20 1077 help 1078 Minimum acceptable block size in a BLOB transfer. The transfer block 1079 size will be some number that is a power of two, and is between block 1080 size min and block size max. If no such number exists, a compile 1081 time warning will be issued. 1082 1083config BT_MESH_BLOB_BLOCK_SIZE_MAX 1084 int "Maximum block size" 1085 default 4096 1086 range BT_MESH_BLOB_BLOCK_SIZE_MIN 1048576 1087 help 1088 Maximum acceptable block size in a BLOB transfer. The transfer block 1089 size will be some number that is a power of two, and is between block 1090 size min and block size max. If no such number exists, a compile 1091 time warning will be issued. 1092 1093config BT_MESH_BLOB_REPORT_TIMEOUT 1094 int "Partial Block Report interval in Pull mode" 1095 default 10 1096 range 1 31 1097 help 1098 The timer value that Pull BLOB Transfer Server uses to report missed chunks. 1099 1100endif # BT_MESH_BLOB_SRV 1101 1102menuconfig BT_MESH_BLOB_CLI 1103 bool "Support for BLOB Transfer Client model" 1104 help 1105 Enable the Binary Large Object (BLOB) Transfer Client model. 1106 1107if BT_MESH_BLOB_CLI 1108 1109config BT_MESH_BLOB_CLI_BLOCK_RETRIES 1110 int "Number of retries per block" 1111 default 5 1112 help 1113 Controls the number of times the client will attempt to resend missing 1114 chunks to the BLOB receivers for every block. 1115 1116endif 1117 1118menu "BLOB models common configuration" 1119 visible if BT_MESH_BLOB_SRV || BT_MESH_BLOB_CLI 1120 1121config BT_MESH_BLOB_CHUNK_COUNT_MAX 1122 int "Maximum chunk count per block" 1123 default 256 1124 range 1 2992 1125 help 1126 A BLOB transfer contains several blocks. Each block is made up of 1127 several chunks. This option controls the maximum chunk count per 1128 block. 1129 1130endmenu 1131 1132config BT_MESH_BLOB_IO_FLASH 1133 bool "BLOB flash stream" 1134 default y 1135 depends on BT_MESH_BLOB_SRV || BT_MESH_BLOB_CLI 1136 depends on FLASH_MAP 1137 help 1138 Enable the BLOB flash stream for reading and writing BLOBs directly to 1139 and from flash. 1140 1141config BT_MESH_DFU_SRV 1142 bool "Support for Firmware Update Server model" 1143 depends on BT_MESH_BLOB_SRV 1144 help 1145 Enable the Firmware Update Server model. 1146 1147config BT_MESH_DFU_CLI 1148 bool "Support for Firmware Update Client model" 1149 depends on BT_MESH_BLOB_CLI 1150 help 1151 Enable the Firmware Update Client model. 1152 1153menu "Firmware Update model configuration" 1154 visible if BT_MESH_DFU_SRV || BT_MESH_DFU_CLI 1155 1156config BT_MESH_DFU_FWID_MAXLEN 1157 int "DFU FWID max length" 1158 default 16 1159 range 0 106 1160 help 1161 This value defines the maximum length of an image's firmware ID. 1162 1163config BT_MESH_DFU_METADATA_MAXLEN 1164 int "DFU metadata max length" 1165 default 32 1166 range 18 255 if BT_MESH_DFU_METADATA 1167 range 0 255 1168 help 1169 This value defines the maximum length of an image's metadata. 1170 1171config BT_MESH_DFU_METADATA 1172 bool "Support for the default metadata format" 1173 help 1174 This option adds a set of functions that can be used to encode and decode a firmware 1175 metadata using the format defined in the Bluetooth mesh DFU subsystem. 1176 1177config BT_MESH_DFU_URI_MAXLEN 1178 int "DFU URI max length" 1179 default 32 1180 range 0 255 1181 help 1182 This value defines the maximum length of an image's URI, not including 1183 a string terminator. 1184 1185endmenu 1186 1187menuconfig BT_MESH_DFU_SLOTS 1188 bool "Firmware image slot manager" 1189 default y if BT_MESH_DFU_CLI 1190 help 1191 Enable the DFU image slot manager, for managing firmware distribution slots 1192 for the Firmware Update Client model. 1193 1194if BT_MESH_DFU_SLOTS 1195 1196config BT_MESH_DFU_SLOT_CNT 1197 int "Number of firmware image slots" 1198 default 1 1199 range 1 32767 1200 help 1201 This value defines the number of firmware slots the DFU image slot manager 1202 can keep simultaneously. 1203 1204endif 1205 1206menuconfig BT_MESH_DFD_SRV 1207 bool "Support for Firmware Distribution Server model" 1208 depends on BT_MESH_BLOB_SRV 1209 depends on BT_MESH_DFU_CLI 1210 help 1211 Enable the Firmware Distribution Server model. 1212 1213if BT_MESH_DFD_SRV 1214 1215config BT_MESH_DFD_SRV_SLOT_MAX_SIZE 1216 int "Largest DFU image that can be stored" 1217 default BT_MESH_BLOB_SIZE_MAX 1218 range 0 BT_MESH_BLOB_SIZE_MAX 1219 help 1220 This value defines the largest DFU image a single slot can store. 1221 1222config BT_MESH_DFD_SRV_SLOT_SPACE 1223 int "Total DFU image storage space" 1224 default BT_MESH_DFD_SRV_SLOT_MAX_SIZE 1225 range 0 4294967295 1226 help 1227 This value defines the total storage space dedicated to storing DFU 1228 images on the Firmware Distribution Server. 1229 1230config BT_MESH_DFD_SRV_TARGETS_MAX 1231 int "Maximum Target node count" 1232 default 8 1233 range 1 65535 1234 help 1235 This value defines the maximum number of Target nodes the Firmware 1236 Distribution Server can target simultaneously. 1237 1238config BT_MESH_DFD_SRV_OOB_UPLOAD 1239 bool "Support for DFU image OOB upload" 1240 help 1241 This enables support for OOB upload of firmware images for 1242 distribution. This makes several callbacks and use of the init 1243 macro BT_MESH_DFD_SRV_INIT_OOB mandatory. See the API documentation 1244 for bt_mesh_dfd_srv_cb for details about the mandatory callbacks. 1245 1246endif 1247 1248config BT_MESH_RPR_SRV 1249 bool "Support for Remote Provisioning Server model" 1250 help 1251 The Remote Provisioning Server is the proxy for a provisioning 1252 process, allowing provisioners to tunnel their provisioning 1253 messages through the mesh to the Remote Provisioning Server, which 1254 communicates directly with the unprovisioned node. 1255 1256config BT_MESH_RPR_CLI 1257 bool "Support for Remote Provisioning Client model" 1258 depends on BT_MESH_PROVISIONER 1259 help 1260 The Remote Provisioning Client is instantiated on the provisioner 1261 node, and allows provisioning of new devices through the mesh network 1262 by tunnelling provisioning messages to a Remote Provisioning Server. 1263 1264menu "Remote Provisioning configuration" 1265 visible if BT_MESH_RPR_SRV || BT_MESH_RPR_CLI 1266 1267config BT_MESH_RPR_AD_TYPES_MAX 1268 int "Max AD types in extended scanning" 1269 default 1 1270 range 1 16 1271 help 1272 During extended scanning, the Remote Provisioning Server can include 1273 a set of AD types in the scan reports, collected from the 1274 unprovisioned device's advertisement data. This option controls 1275 the highest number of AD types a single server can scan for, and a 1276 Client can request. 1277 1278config BT_MESH_RPR_SRV_SCANNED_ITEMS_MAX 1279 int "Max scannable unprovisioned devices for Remote Provisioning Server" 1280 default 4 1281 range 4 255 1282 help 1283 Max number of unique unprovisioned devices a single Remote 1284 Provisioning Server can hold. 1285 1286config BT_MESH_RPR_SRV_AD_DATA_MAX 1287 int "Max additional advertisement data to report" 1288 default 31 1289 range 3 255 1290 help 1291 Buffer size for the additional advertisement data reported during 1292 extended scanning. 1293endmenu 1294 1295config BT_MESH_SAR_CFG 1296 bool 1297 1298config BT_MESH_SAR_CFG_SRV 1299 bool "Support for SAR Configuration Server model" 1300 select BT_MESH_SAR_CFG 1301 help 1302 Enable support for the SAR configuration server model. 1303 1304config BT_MESH_SAR_CFG_CLI 1305 bool "Support for SAR Configuration Client Model" 1306 select BT_MESH_SAR_CFG 1307 help 1308 Enable support for the SAR configuration client model. 1309 1310config BT_MESH_OP_AGG 1311 bool 1312 1313config BT_MESH_OP_AGG_SRV 1314 bool "Support for Opcode Aggregator Server Model" 1315 select BT_MESH_OP_AGG 1316 help 1317 Enable support for the Opcode Aggregator Server model. 1318 1319config BT_MESH_OP_AGG_CLI 1320 bool "Support for Opcode Aggregator Client Model" 1321 select BT_MESH_OP_AGG 1322 help 1323 Enable support for the Opcode Aggregator Client model. 1324 1325if BT_MESH_OP_AGG_CLI 1326 1327config BT_MESH_OP_AGG_CLI_TIMEOUT 1328 int "Opcodes Aggregator Client model timeout in milliseconds" 1329 default 10000 1330 help 1331 This timeout controls how long Opcodes Aggregator Client waits 1332 for a response message to arrive. This value can be changed at 1333 runtime using @ref bt_mesh_op_agg_cli_timeout_set. 1334 1335endif # BT_MESH_OP_AGG_CLI 1336 1337config BT_MESH_LARGE_COMP_DATA_SRV 1338 bool "Support for Large Composition Data Server Model" 1339 help 1340 Enable support for the Large Composition Data Server model. 1341 1342if BT_MESH_LARGE_COMP_DATA_SRV 1343 1344config BT_MESH_MODELS_METADATA_PAGE_LEN 1345 int "Maximum length of the Models Metadata Page" 1346 default 150 1347 help 1348 This value is the combined total metadata length for 1349 all models on the device. 1350 1351endif # BT_MESH_LARGE_COMP_DATA_SRV 1352 1353config BT_MESH_LARGE_COMP_DATA_CLI 1354 bool "Support for Large Composition Data Client model" 1355 help 1356 Enable support for the Large Composition Data Client model. 1357 1358config BT_MESH_PRIV_BEACONS 1359 bool "Support for private beacons" 1360 default y 1361 help 1362 Enable support for private beacons. 1363 1364if BT_MESH_PRIV_BEACONS 1365 1366config BT_MESH_PRIV_BEACON_SRV 1367 bool "Support for Private Beacon Server Model" 1368 help 1369 Enable support for the Private Beacon Server model. 1370 1371config BT_MESH_PRIV_BEACON_CLI 1372 bool "Support for Private Beacon Client Model" 1373 help 1374 Enable support for the Private Beacon Client model. 1375 1376endif # BT_MESH_PRIV_BEACONS 1377 1378config BT_MESH_COMP_PST_BUF_SIZE 1379 int "Composition Data Page persistence buffer size" 1380 default 100 1381 help 1382 Stack allocated buffer used to temporarily hold Composition 1383 Data Pages during flash operations. Should reflect the size 1384 of the largest Composition Data Page present in the application. 1385 Note that this buffer should still be large enough to restore previously stored 1386 pages after a performed device firmware update. 1387 1388config BT_MESH_COMP_PAGE_1 1389 bool "Support for Composition Data Page 1" 1390 depends on BT_MESH_MODEL_EXTENSIONS 1391 help 1392 Enable support for Composition Data Page 1. 1393 1394config BT_MESH_COMP_PAGE_2 1395 bool "Support for Composition Data Page 2" 1396 help 1397 Enable support for Composition Data Page 2. 1398 1399config BT_MESH_MODEL_EXTENSION_LIST_SIZE 1400 int "Model extensions list size" 1401 depends on BT_MESH_COMP_PAGE_1 1402 range 1 255 1403 default 10 1404 help 1405 This option specifies how many models relations can be saved. 1406 Equals to the number of `bt_mesh_model_extend` and `bt_mesh_model_correspond` calls. 1407 This information is used to construct Composition Data Page 1. 1408 1409config BT_MESH_SOLICITATION 1410 bool 1411 1412config BT_MESH_PROXY_SOLICITATION 1413 bool "Proxy solicitation feature for Proxy Client support" 1414 depends on BT_MESH_PROXY_CLIENT 1415 select BT_MESH_SOLICITATION 1416 help 1417 This option enables support for sending Solicitation PDUs for Proxy Client. 1418 1419config BT_MESH_SOL_ADV_XMIT 1420 int "Solicitation PDU retransmission count" 1421 depends on BT_MESH_PROXY_SOLICITATION 1422 range 0 10 1423 default 2 1424 help 1425 How many times Solicitation PDU advertisements will be repeated. 0 means that there will be 1426 1 transmission without retransmissions. 1427 1428config BT_MESH_OD_PRIV_PROXY_CLI 1429 bool "Support for On-Demand Private Proxy Client model" 1430 help 1431 On-Demand Private Proxy Client allows to configure and check the state 1432 of On-Demand Private Proxy Servers. The state determines if the peers will 1433 advertise the Private Network Identity type after receiving a Solicitation PDU. 1434 1435 1436config BT_MESH_OD_PRIV_PROXY_CLI_TIMEOUT 1437 int "Solicitation PDU RPL Configuration Client model timeout in milliseconds" 1438 default 5000 1439 depends on BT_MESH_OD_PRIV_PROXY_CLI 1440 help 1441 This timeout controls how long the On-Demand Private Proxy Client waits 1442 for a response message to arrive. This value can be changed at runtime 1443 using @ref bt_mesh_od_priv_proxy_cli_timeout_set. 1444 1445config BT_MESH_OD_PRIV_PROXY_SRV 1446 bool "Support for On-Demand Private Proxy Server model" 1447 depends on BT_MESH_PRIV_BEACON_SRV 1448 select BT_MESH_SOLICITATION 1449 help 1450 The On-Demand Private Proxy Server is used to support configuration of 1451 advertising with Private Network Identity type of a node. 1452 When enabled, the Solicitation PDU RPL Configuration Server model is also enabled. 1453 1454config BT_MESH_PROXY_SRPL_SIZE 1455 int "Size of solicitation replay protection list (SRPL)" 1456 depends on BT_MESH_OD_PRIV_PROXY_SRV 1457 default 10 1458 range 1 255 1459 help 1460 Size of SRPL. The list is used to determine if a received Solicitation PDU 1461 is valid. It is valid when the SSRC field value of the received Solicitation PDU 1462 is stored in the SRPL and the SSEQ field value is bigger than the corresponding 1463 stored SSEQ value, or if the SSRC was not stored in the RPL and the SRPL still has 1464 space for new entries. 1465 1466config BT_MESH_SOL_PDU_RPL_CLI 1467 bool "Support for Solicitation PDU RPL Configuration Client model" 1468 help 1469 The Solicitation PDU RPL Configuration Client is used to support the 1470 functionality of removing addresses from the solicitation replay 1471 protection list (SRPL) of a node that supports the Solicitation 1472 PDU RPL Configuration Server model. 1473 1474config BT_MESH_SOL_PDU_RPL_CLI_TIMEOUT 1475 int "Solicitation PDU RPL Configuration Client model timeout in milliseconds" 1476 default 5000 1477 depends on BT_MESH_SOL_PDU_RPL_CLI 1478 help 1479 This timeout controls how long Solicitation PDU RPL Configuration Client waits 1480 for a response message to arrive. This value can be changed at runtime 1481 using @ref bt_mesh_sol_pdu_rpl_cli_timeout_set. 1482 1483menu "Transport SAR configuration" 1484 1485config BT_MESH_SAR_TX_SEG_INT_STEP 1486 hex "Interval between sending two consecutive segments" 1487 range 0x00 0x0F 1488 default 0x05 1489 help 1490 This value controls the interval between sending two consecutive 1491 segments in a segmented message. The interval is measured in 1492 milliseconds and calculated using the following formula: 1493 (CONFIG_BT_MESH_SAR_TX_SEG_INT_STEP + 1) * 10 ms. 1494 1495config BT_MESH_SAR_TX_UNICAST_RETRANS_COUNT 1496 hex "Maximum number of retransmissions to unicast address" 1497 range 0x00 0x0F 1498 default 0x02 1499 help 1500 This value controls the maximum number of retransmissions of a 1501 segmented message to a unicast address before giving up the transfer. 1502 1503config BT_MESH_SAR_TX_UNICAST_RETRANS_WITHOUT_PROG_COUNT 1504 hex "Maximum number of retransmissions without progress to a unicast address" 1505 range 0x00 0x0F 1506 default 0x02 1507 help 1508 This value defines the maximum number of retransmissions of a 1509 segmented message to a unicast address that the stack will send if no 1510 acknowledgment was received during timeout, or if an 1511 acknowledgment with already confirmed segments was received. 1512 1513config BT_MESH_SAR_TX_UNICAST_RETRANS_INT_STEP 1514 hex "Retransmissions interval step of missing segments to unicast address" 1515 range 0x00 0x0F 1516 default 0x07 1517 help 1518 This value controls the interval step used for delaying the 1519 retransmissions of unacknowledged segments of a segmented message to 1520 a unicast address. The interval step is measured in milliseconds and 1521 calculated using the following formula: 1522 (CONFIG_BT_MESH_SAR_TX_UNICAST_RETRANS_INT_STEP + 1) * 25 ms. 1523 1524config BT_MESH_SAR_TX_UNICAST_RETRANS_INT_INC 1525 hex "Retransmissions interval increment of missing segments to unicast address" 1526 range 0x00 0x0F 1527 default 0x01 1528 help 1529 This value controls the interval increment used for delaying the 1530 retransmissions of unacknowledged segments of a segmented message to 1531 a unicast address. The increment is measured in milliseconds and 1532 calculated using the following formula: 1533 (CONFIG_BT_MESH_SAR_TX_UNICAST_RETRANS_INT_INC + 1) * 25 ms. 1534 1535config BT_MESH_SAR_TX_MULTICAST_RETRANS_COUNT 1536 hex "Total number of retransmissions to multicast address" 1537 range 0x00 0x0F 1538 default 0x02 1539 help 1540 This value controls the total number of retransmissions of a segmented 1541 message to a multicast address. 1542 1543config BT_MESH_SAR_TX_MULTICAST_RETRANS_INT 1544 hex "Interval between retransmissions to multicast address" 1545 range 0x00 0x0F 1546 default 0x09 1547 help 1548 This value controls the interval between retransmissions of all 1549 segments in a segmented message to a multicast address. The 1550 interval is measured in milliseconds and calculated using the 1551 following formula: 1552 (CONFIG_BT_MESH_SAR_TX_MULTICAST_RETRANS_INT + 1) * 25 ms. 1553 1554config BT_MESH_SAR_RX_SEG_THRESHOLD 1555 hex "Acknowledgments retransmission threshold" 1556 range 0x00 0x1F 1557 default 0x03 1558 help 1559 This value defines a threshold in number of segments of a segmented 1560 message for acknowledgment retransmissions. When the number of 1561 segments of a segmented message is above this threshold, the stack 1562 will additionally retransmit every acknowledgment message the 1563 number of times given by value of CONFIG_BT_MESH_SAR_RX_ACK_RETRANS_COUNT. 1564 1565config BT_MESH_SAR_RX_ACK_DELAY_INC 1566 hex "Acknowledgment delay increment" 1567 range 0x00 0x07 1568 default 0x01 1569 help 1570 This value controls the delay increment of an interval used for 1571 delaying the transmission of an acknowledgment message after 1572 receiving a new segment. The increment is measured in segments 1573 and calculated using the following formula: 1574 CONFIG_BT_MESH_SAR_RX_ACK_DELAY_INC + 1.5. 1575 1576config BT_MESH_SAR_RX_SEG_INT_STEP 1577 hex "Segments reception interval step" 1578 range 0x00 0x0F 1579 default 0x05 1580 help 1581 This value defines the segments reception interval step used for 1582 delaying the transmission of an acknowledgment message after 1583 receiving a new segmnet. The interval is measured in milliseconds 1584 and calculated using the following formula: 1585 (CONFIG_BT_MESH_SAR_RX_SEG_INT_STEP + 1) * 10 ms 1586 1587config BT_MESH_SAR_RX_DISCARD_TIMEOUT 1588 hex "Discard timeout for reception of a segmented message" 1589 range 0x00 0x0F 1590 default 0x01 1591 help 1592 This value defines the time since the last successfully received 1593 segment before giving up the reception of a segmented message. 1594 1595config BT_MESH_SAR_RX_ACK_RETRANS_COUNT 1596 hex "Total number of acknowledgment message retransmission" 1597 range 0x00 0x03 1598 default 0x00 1599 help 1600 This value defines the total number of retranmissions of an 1601 acknowledgment message that the stack will additionally send when the 1602 size of segments in a segmented message is above the 1603 CONFIG_BT_MESH_SAR_RX_SEG_THRESHOLD value. 1604 1605endmenu 1606 1607endif # BT_MESH_V1d1 1608 1609menu "Capabilities" 1610 1611config BT_MESH_SUBNET_COUNT 1612 int "Maximum number of mesh subnets per network" 1613 default 1 1614 range 1 4096 1615 help 1616 This option specifies how many subnets a Mesh network can 1617 participate in at the same time. 1618 1619config BT_MESH_APP_KEY_COUNT 1620 int "Maximum number of application keys per network" 1621 default 1 1622 range 1 4096 1623 help 1624 This option specifies how many application keys the device can 1625 store per network. 1626 1627config BT_MESH_MODEL_KEY_COUNT 1628 int "Maximum number of application keys per model" 1629 default 1 1630 range 1 4096 1631 help 1632 This option specifies how many application keys each model can 1633 at most be bound to. 1634 1635config BT_MESH_MODEL_GROUP_COUNT 1636 int "Maximum number of group address subscriptions per model" 1637 default 1 1638 range 1 4096 1639 help 1640 This option specifies how many group addresses each model can 1641 at most be subscribed to. 1642 1643config BT_MESH_LABEL_COUNT 1644 int "Maximum number of Label UUIDs used for Virtual Addresses" 1645 default 1 1646 range 0 4096 1647 help 1648 This option specifies how many Label UUIDs can be stored. 1649 1650endmenu # Capabilities 1651 1652menu "Persistent storage" 1653 visible if BT_SETTINGS 1654 1655config BT_MESH_STORE_TIMEOUT 1656 int "Delay (in seconds) before storing anything persistently" 1657 range 0 1000000 1658 default 2 1659 help 1660 This value defines in seconds how soon any pending changes 1661 are actually written into persistent storage (flash) after 1662 a change occurs. 1663 1664config BT_MESH_SEQ_STORE_RATE 1665 int "How often the sequence number gets updated in storage" 1666 range 0 1000000 1667 default 128 1668 default 1 if !BT_SETTINGS # To keep compiling the code 1669 help 1670 This value defines how often the local sequence number gets 1671 updated in persistent storage (i.e. flash). E.g. a value of 100 1672 means that the sequence number will be stored to flash on every 1673 100th increment. If the node sends messages very frequently a 1674 higher value makes more sense, whereas if the node sends 1675 infrequently a value as low as 0 (update storage for every 1676 increment) can make sense. When the stack gets initialized it 1677 will add this number to the last stored one, so that it starts 1678 off with a value that's guaranteed to be larger than the last 1679 one used before power off. 1680 1681if BT_MESH_RPL_STORAGE_MODE_SETTINGS && BT_SETTINGS 1682 1683config BT_MESH_RPL_STORE_TIMEOUT 1684 int "Minimum interval after which unsaved RPL and SRPL entries are updated in the settings subsystem" 1685 range -1 1000000 1686 default 5 1687 help 1688 This value defines time in seconds until unsaved RPL and SRPL entries 1689 are written to the persistent storage. Setting this value 1690 to a large number may lead to security vulnerabilities if a node 1691 gets powered off before the timer is fired. When flash is used 1692 as the persistent storage setting this value to a low number 1693 may wear out flash sooner or later. However, if the RPL gets 1694 updated infrequently a value as low as 0 (write immediately) 1695 may make sense. Setting this value to -1 will disable this timer. 1696 In this case, a user is responsible to store pending RPL entries 1697 using @ref bt_mesh_rpl_pending_store. In the mean time, when 1698 IV Index is updated, the outdated RPL entries will still be 1699 stored by @ref BT_MESH_STORE_TIMEOUT. Finding the right balance 1700 between this timeout and calling @ref bt_mesh_rpl_pending_store 1701 may reduce a risk of security vulnerability and flash wear out. 1702 Failure to store the RPL and becoming vulnerable after reboot 1703 will cause the device to not perform the replay protection 1704 required by the spec. 1705 1706endif # BT_MESH_RPL_STORAGE_MODE_SETTINGS && BT_SETTINGS 1707 1708config BT_MESH_SETTINGS_WORKQ 1709 bool "Store the Bluetooth mesh settings in a separate work queue" 1710 default y 1711 help 1712 This option enables a separate cooperative thread which is used to 1713 store Bluetooth mesh configuration. When this option is disabled, 1714 the stack's configuration is stored in the system workqueue. This 1715 means that the system workqueue will be blocked for the time needed 1716 to store the pending data. This time may significantly increase if 1717 the flash driver does the erase operation. Enabling this option 1718 allows Bluetooth mesh not to block the system workqueue, and thus 1719 process the incoming and outgoing messages while the flash driver 1720 waits for the controller to allocate the time needed to write the 1721 data and/or erase the required flash pages. 1722 1723if BT_MESH_SETTINGS_WORKQ 1724 1725config BT_MESH_SETTINGS_WORKQ_PRIO 1726 int 1727 default 1 1728 1729config BT_MESH_SETTINGS_WORKQ_STACK_SIZE 1730 int "Stack size of the settings workq" 1731 default 1200 if BT_MESH_RPR_SRV 1732 default 880 1733 help 1734 Size of the settings workqueue stack. 1735 1736endif # BT_MESH_SETTINGS_WORKQ 1737 1738endmenu # Persistent storage 1739 1740rsource "shell/Kconfig" 1741 1742if BT_CONN 1743 1744config BT_MESH_MAX_CONN 1745 int "Maximum number of simultaneous Bluetooth connections" 1746 default BT_MAX_CONN 1747 range 1 BT_MAX_CONN 1748 help 1749 Maximum number of simultaneous Bluetooth connections that the Bluetooth 1750 mesh stack can use. 1751 1752endif # BT_CONN 1753 1754config BT_MESH_SELF_TEST 1755 bool "Perform self-tests" 1756 help 1757 This option adds extra self-tests which are run every time 1758 mesh networking is initialized. 1759 1760config BT_MESH_STATISTIC 1761 bool "The frame handling statistics [EXPERIMENTAL]" 1762 select EXPERIMENTAL 1763 help 1764 The module gathers statistics of received, relayed, and transmitted 1765 frames. This helps to estimate the quality of the communication and 1766 the sufficiency of configured advertiser instances. 1767 1768endif # BT_MESH 1769