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