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