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