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 106 1089 range 0 106 1090 help 1091 This value defines the maximum length of the vendor-specific version information 1092 that the mesh stack can manage, describing the image. Please note that 1093 only 106 octets size allows the device to be compliant with 1094 the Bluetooth Mesh DFU specification. If smaller than 106 octets are set, 1095 then the device will fail with managing firmware images that have 1096 a longer vendor-specific version information. 1097 1098config BT_MESH_DFU_METADATA_MAXLEN 1099 int "DFU metadata max length" 1100 default 32 1101 range 18 $(UINT8_MAX) if BT_MESH_DFU_METADATA 1102 range 0 $(UINT8_MAX) 1103 help 1104 This value defines the maximum length of an image's metadata. 1105 1106config BT_MESH_DFU_METADATA 1107 bool "Support for the default metadata format" 1108 help 1109 This option adds a set of functions that can be used to encode and decode a firmware 1110 metadata using the format defined in the Bluetooth Mesh DFU subsystem. 1111 1112config BT_MESH_DFU_URI_MAXLEN 1113 int "DFU URI max length" 1114 default 32 1115 range 0 $(UINT8_MAX) 1116 help 1117 This value defines the maximum length of an image's URI, not including 1118 a string terminator. 1119 1120endmenu # Firmware Update model configuration 1121 1122menuconfig BT_MESH_DFU_SLOTS 1123 bool "Firmware image slot manager" 1124 default y if BT_MESH_DFU_CLI 1125 help 1126 Enable the DFU image slot manager, for managing firmware distribution slots 1127 for the Firmware Update Client model. 1128 1129if BT_MESH_DFU_SLOTS 1130 1131config BT_MESH_DFU_SLOT_CNT 1132 int "Number of firmware image slots" 1133 default 1 1134 range 1 $(INT16_MAX) 1135 help 1136 This value defines the number of firmware slots the DFU image slot manager 1137 can keep simultaneously. 1138 1139endif 1140 1141menuconfig BT_MESH_DFD_SRV 1142 bool "Support for Firmware Distribution Server model" 1143 depends on BT_MESH_BLOB_SRV 1144 depends on BT_MESH_DFU_CLI 1145 help 1146 Enable the Firmware Distribution Server model. 1147 1148if BT_MESH_DFD_SRV 1149 1150config BT_MESH_DFD_SRV_SLOT_MAX_SIZE 1151 int "Largest DFU image that can be stored" 1152 default BT_MESH_BLOB_SIZE_MAX 1153 range 0 BT_MESH_BLOB_SIZE_MAX 1154 help 1155 This value defines the largest DFU image a single slot can store. 1156 1157config BT_MESH_DFD_SRV_SLOT_SPACE 1158 int "Total DFU image storage space" 1159 default BT_MESH_DFD_SRV_SLOT_MAX_SIZE 1160 range 0 $(UINT32_MAX) 1161 help 1162 This value defines the total storage space dedicated to storing DFU 1163 images on the Firmware Distribution Server. 1164 1165config BT_MESH_DFD_SRV_TARGETS_MAX 1166 int "Maximum Target node count" 1167 default 8 1168 range 1 $(UINT16_MAX) 1169 help 1170 This value defines the maximum number of Target nodes the Firmware 1171 Distribution Server can target simultaneously. 1172 1173config BT_MESH_DFD_SRV_OOB_UPLOAD 1174 bool "Support for DFU image OOB upload" 1175 help 1176 This enables support for OOB upload of firmware images for 1177 distribution. This makes several callbacks and use of the init 1178 macro BT_MESH_DFD_SRV_INIT_OOB mandatory. See the API documentation 1179 for bt_mesh_dfd_srv_cb for details about the mandatory callbacks. 1180 1181endif 1182 1183config BT_MESH_RPR_SRV 1184 bool "Support for Remote Provisioning Server model" 1185 help 1186 The Remote Provisioning Server is the proxy for a provisioning 1187 process, allowing provisioners to tunnel their provisioning 1188 messages through the mesh to the Remote Provisioning Server, which 1189 communicates directly with the unprovisioned node. 1190 1191config BT_MESH_RPR_CLI 1192 bool "Support for Remote Provisioning Client model" 1193 depends on BT_MESH_PROVISIONER 1194 help 1195 The Remote Provisioning Client is instantiated on the provisioner 1196 node, and allows provisioning of new devices through the mesh network 1197 by tunnelling provisioning messages to a Remote Provisioning Server. 1198 1199menu "Remote Provisioning configuration" 1200 visible if BT_MESH_RPR_SRV || BT_MESH_RPR_CLI 1201 1202config BT_MESH_RPR_AD_TYPES_MAX 1203 int "Max AD types in extended scanning" 1204 default 1 1205 range 1 16 1206 help 1207 During extended scanning, the Remote Provisioning Server can include 1208 a set of AD types in the scan reports, collected from the 1209 unprovisioned device's advertisement data. This option controls 1210 the highest number of AD types a single server can scan for, and a 1211 Client can request. 1212 1213config BT_MESH_RPR_SRV_SCANNED_ITEMS_MAX 1214 int "Max scannable unprovisioned devices for Remote Provisioning Server" 1215 default 4 1216 range 4 $(UINT8_MAX) 1217 help 1218 Max number of unique unprovisioned devices a single Remote 1219 Provisioning Server can hold. 1220 1221config BT_MESH_RPR_SRV_AD_DATA_MAX 1222 int "Max additional advertisement data to report" 1223 default 31 1224 range 3 $(UINT8_MAX) 1225 help 1226 Buffer size for the additional advertisement data reported during 1227 extended scanning. 1228 1229endmenu # Remote Provisioning configuration 1230 1231config BT_MESH_SAR_CFG 1232 bool 1233 1234config BT_MESH_SAR_CFG_SRV 1235 bool "Support for SAR Configuration Server model" 1236 select BT_MESH_SAR_CFG 1237 help 1238 Enable support for the SAR configuration server model. 1239 1240config BT_MESH_SAR_CFG_CLI 1241 bool "Support for SAR Configuration Client Model" 1242 select BT_MESH_SAR_CFG 1243 help 1244 Enable support for the SAR configuration client model. 1245 1246config BT_MESH_OP_AGG 1247 bool 1248 1249config BT_MESH_OP_AGG_SRV 1250 bool "Support for Opcode Aggregator Server Model" 1251 select BT_MESH_OP_AGG 1252 help 1253 Enable support for the Opcode Aggregator Server model. 1254 1255config BT_MESH_OP_AGG_CLI 1256 bool "Support for Opcode Aggregator Client Model" 1257 select BT_MESH_OP_AGG 1258 help 1259 Enable support for the Opcode Aggregator Client model. 1260 1261if BT_MESH_OP_AGG_CLI 1262 1263config BT_MESH_OP_AGG_CLI_TIMEOUT 1264 int "Opcodes Aggregator Client model timeout in milliseconds" 1265 default 10000 1266 help 1267 This timeout controls how long Opcodes Aggregator Client waits 1268 for a response message to arrive. This value can be changed at 1269 runtime using @ref bt_mesh_op_agg_cli_timeout_set. 1270 1271endif # BT_MESH_OP_AGG_CLI 1272 1273config BT_MESH_LARGE_COMP_DATA_SRV 1274 bool "Support for Large Composition Data Server Model" 1275 depends on BT_MESH_MODEL_EXTENSIONS 1276 help 1277 Enable support for the Large Composition Data Server model. 1278 1279if BT_MESH_LARGE_COMP_DATA_SRV 1280 1281config BT_MESH_MODELS_METADATA_PAGE_LEN 1282 int "Maximum length of the Models Metadata Page" 1283 default 150 1284 help 1285 This value is the combined total metadata length for 1286 all models on the device. 1287 1288endif # BT_MESH_LARGE_COMP_DATA_SRV 1289 1290config BT_MESH_LARGE_COMP_DATA_CLI 1291 bool "Support for Large Composition Data Client model" 1292 help 1293 Enable support for the Large Composition Data Client model. 1294 1295if BT_MESH_PRIV_BEACONS 1296 1297config BT_MESH_PRIV_BEACON_SRV 1298 bool "Support for Private Beacon Server Model" 1299 depends on BT_MESH_MODEL_EXTENSIONS 1300 help 1301 Enable support for the Private Beacon Server model. 1302 1303config BT_MESH_PRIV_BEACON_CLI 1304 bool "Support for Private Beacon Client Model" 1305 help 1306 Enable support for the Private Beacon Client model. 1307 1308endif # BT_MESH_PRIV_BEACONS 1309 1310config BT_MESH_OD_PRIV_PROXY_CLI 1311 bool "Support for On-Demand Private Proxy Client model" 1312 help 1313 On-Demand Private Proxy Client allows to configure and check the state 1314 of On-Demand Private Proxy Servers. The state determines if the peers will 1315 advertise the Private Network Identity type after receiving a Solicitation PDU. 1316 1317 1318config BT_MESH_OD_PRIV_PROXY_CLI_TIMEOUT 1319 int "Solicitation PDU RPL Configuration Client model timeout in milliseconds" 1320 default 5000 1321 depends on BT_MESH_OD_PRIV_PROXY_CLI 1322 help 1323 This timeout controls how long the On-Demand Private Proxy Client waits 1324 for a response message to arrive. This value can be changed at runtime 1325 using @ref bt_mesh_od_priv_proxy_cli_timeout_set. 1326 1327config BT_MESH_OD_PRIV_PROXY_SRV 1328 bool "Support for On-Demand Private Proxy Server model" 1329 depends on BT_MESH_PRIV_BEACON_SRV 1330 select BT_MESH_SOLICITATION 1331 help 1332 The On-Demand Private Proxy Server is used to support configuration of 1333 advertising with Private Network Identity type of a node. 1334 When enabled, the Solicitation PDU RPL Configuration Server model is also enabled. 1335 1336config BT_MESH_PROXY_SRPL_SIZE 1337 int "Size of solicitation replay protection list (SRPL)" 1338 depends on BT_MESH_OD_PRIV_PROXY_SRV 1339 default 10 1340 range 1 $(UINT8_MAX) 1341 help 1342 Size of SRPL. The list is used to determine if a received Solicitation PDU 1343 is valid. It is valid when the SSRC field value of the received Solicitation PDU 1344 is stored in the SRPL and the SSEQ field value is bigger than the corresponding 1345 stored SSEQ value, or if the SSRC was not stored in the RPL and the SRPL still has 1346 space for new entries. 1347 1348config BT_MESH_SOL_PDU_RPL_CLI 1349 bool "Support for Solicitation PDU RPL Configuration Client model" 1350 help 1351 The Solicitation PDU RPL Configuration Client is used to support the 1352 functionality of removing addresses from the solicitation replay 1353 protection list (SRPL) of a node that supports the Solicitation 1354 PDU RPL Configuration Server model. 1355 1356config BT_MESH_SOL_PDU_RPL_CLI_TIMEOUT 1357 int "Solicitation PDU RPL Configuration Client model timeout in milliseconds" 1358 default 5000 1359 depends on BT_MESH_SOL_PDU_RPL_CLI 1360 help 1361 This timeout controls how long Solicitation PDU RPL Configuration Client waits 1362 for a response message to arrive. This value can be changed at runtime 1363 using @ref bt_mesh_sol_pdu_rpl_cli_timeout_set. 1364 1365config BT_MESH_BRG_CFG_SRV 1366 bool "Support for Bridge Configuration Server model" 1367 depends on BT_MESH_MODEL_EXTENSIONS 1368 help 1369 The Bridge Configuration Server model is used to support the configuration 1370 of the subnet bridge functionality of a node. 1371 1372menu "Subnet Bridge configuration" 1373 visible if BT_MESH_BRG_CFG_SRV 1374 1375config BT_MESH_BRG_TABLE_ITEMS_MAX 1376 int "Maximum number of entries in the bridging table" 1377 default 16 1378 range 16 255 1379 help 1380 The maximum number of entries in the bridging table. 1381 1382endmenu 1383 1384config BT_MESH_BRG_CFG_CLI 1385 bool "Support for Bridge Configuration Client model" 1386 help 1387 The Bridge Configuration Client is used to support the functionality of a 1388 node that can configure the subnet bridge functionality of another node. 1389 1390if BT_MESH_BRG_CFG_CLI 1391 1392config BT_MESH_BRG_CFG_CLI_TIMEOUT 1393 int "Bridge Configuration Client model timeout in milliseconds" 1394 default 5000 1395 help 1396 This timeout controls how long the bridge configuration client waits for a 1397 response message to arrive. This value can be changed at runtime using 1398 @ref bt_mesh_brg_cfg_cli_timeout_set. 1399 1400endif # BT_MESH_BRG_CFG_CLI 1401 1402endmenu # Models 1403 1404menu "Proxy" 1405 visible if BT_CONN 1406 1407menuconfig BT_MESH_GATT_PROXY 1408 bool "GATT Proxy Service support" 1409 select BT_MESH_GATT_SERVER 1410 select BT_MESH_PROXY 1411 help 1412 This option enables support for the Mesh GATT Proxy Service, 1413 i.e. the ability to act as a proxy between a Mesh GATT Client 1414 and a Mesh network. 1415 1416if BT_MESH_GATT_PROXY 1417 1418config BT_MESH_GATT_PROXY_ENABLED 1419 bool "GATT Proxy enabled" 1420 depends on BT_MESH_GATT_PROXY 1421 default y 1422 help 1423 Controls whether the GATT Proxy feature is enabled by default. 1424 Can be changed through runtime configuration. 1425 1426config BT_MESH_NODE_ID_TIMEOUT 1427 int "Node Identity advertising timeout" 1428 range 1 60 1429 default 60 1430 help 1431 This option determines for how long the local node advertises 1432 using Node Identity. The given value is in seconds. The 1433 specification limits this to 60 seconds, and implies that to 1434 be the appropriate value as well, so just leaving this as the 1435 default is the safest option. 1436 1437config BT_MESH_PROXY_USE_DEVICE_NAME 1438 bool "Include Bluetooth device name in scan response" 1439 help 1440 This option includes GAP device name in scan response when 1441 the GATT Proxy feature is enabled. 1442 1443config BT_MESH_PROXY_FILTER_SIZE 1444 int "Maximum number of filter entries per Proxy Client" 1445 default 16 1446 range 1 $(INT16_MAX) 1447 help 1448 This option specifies how many Proxy Filter entries the local 1449 node supports. This helps in reducing unwanted traffic getting sent to 1450 the proxy client. This value is application specific and should be large 1451 enough so that proxy client can communicate with several devices through 1452 this proxy server node using the default accept list filter type. 1453 1454endif # BT_MESH_GATT_PROXY 1455 1456config BT_MESH_PROXY_CLIENT 1457 bool "Proxy client support" 1458 select BT_GATT_CLIENT 1459 select BT_MESH_GATT_CLIENT 1460 depends on BT_CENTRAL 1461 help 1462 This option enables support for the Mesh GATT Proxy Client, 1463 i.e. the ability to act as a proxy between a Mesh GATT Service 1464 and a Mesh network. 1465 1466config BT_MESH_SOLICITATION 1467 bool 1468 1469config BT_MESH_PROXY_SOLICITATION 1470 bool "Proxy solicitation feature" 1471 select BT_MESH_SOLICITATION 1472 help 1473 This option enables support for sending Solicitation PDUs. 1474 1475config BT_MESH_SOL_ADV_XMIT 1476 int "Solicitation PDU retransmission count" 1477 depends on BT_MESH_PROXY_SOLICITATION 1478 range 0 10 1479 default 2 1480 help 1481 How many times Solicitation PDU advertisements will be repeated. 0 means that there will be 1482 1 transmission without retransmissions. 1483 1484endmenu # Proxy 1485 1486config BT_MESH_SECURE_STORAGE 1487 bool 1488 depends on SECURE_STORAGE 1489 1490choice BT_MESH_CRYPTO_LIB 1491 prompt "Crypto library:" 1492 default BT_MESH_USES_TFM_PSA if BUILD_WITH_TFM 1493 default BT_MESH_USES_MBEDTLS_PSA 1494 help 1495 Crypto library selection for mesh security. 1496 1497config BT_MESH_USES_MBEDTLS_PSA 1498 bool "mbed TLS PSA" 1499 select MBEDTLS 1500 select MBEDTLS_PSA_CRYPTO_C 1501 select PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_IMPORT 1502 select PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_EXPORT 1503 select PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_GENERATE 1504 select PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_DERIVE 1505 select PSA_WANT_ALG_CMAC 1506 select PSA_WANT_ALG_ECB_NO_PADDING 1507 select PSA_WANT_KEY_TYPE_AES 1508 select PSA_WANT_ALG_CCM 1509 select PSA_WANT_KEY_TYPE_HMAC 1510 select PSA_WANT_ALG_HMAC 1511 select PSA_WANT_ALG_SHA_256 1512 select PSA_WANT_ALG_ECDH 1513 select PSA_WANT_ECC_SECP_R1_256 1514 select BT_MESH_SECURE_STORAGE if BT_SETTINGS 1515 imply MBEDTLS_AES_ROM_TABLES 1516 help 1517 Use Mbed TLS as PSA Crypto API provider. 1518 1519config BT_MESH_USES_TFM_PSA 1520 bool "TF-M PSA" 1521 depends on BUILD_WITH_TFM 1522 help 1523 Use TF-M as PSA Crypto API provider. This is only possible on platforms 1524 that support TF-M. 1525 1526endchoice 1527 1528menu "Beacons" 1529 1530config BT_MESH_BEACON_ENABLED 1531 bool "Secure network beacon enabled" 1532 default y 1533 help 1534 Controls whether the Secure network beacon feature is enabled by 1535 default. Can be changed through runtime configuration. 1536 1537config BT_MESH_PRIV_BEACONS 1538 bool "Support for private beacons" 1539 default y 1540 help 1541 Enable support for private beacons. 1542 1543endmenu # Beacons 1544 1545menu "IV Index & Sequence number" 1546 1547config BT_MESH_IV_UPDATE_TEST 1548 bool "Test the IV Update Procedure" 1549 help 1550 This option removes the 96 hour limit of the IV Update 1551 Procedure and lets the state be changed at any time. 1552 1553config BT_MESH_IV_UPDATE_SEQ_LIMIT 1554 hex "Sequence number limit to start iv update" 1555 default 0x800000 1556 range 0x000001 0xFFFFFE 1557 help 1558 This option specifies the sequence number value to start iv update. 1559 1560config BT_MESH_IVU_DIVIDER 1561 int "Divider for IV Update state refresh timer" 1562 default 4 1563 range 2 96 1564 help 1565 When the IV Update state enters Normal operation or IV Update 1566 in Progress, we need to keep track of how many hours has passed 1567 in the state, since the specification requires us to remain in 1568 the state at least for 96 hours (Update in Progress has an 1569 additional upper limit of 144 hours). 1570 1571 In order to fulfill the above requirement, even if the node might 1572 be powered off once in a while, we need to store persistently 1573 how many hours the node has been in the state. This doesn't 1574 necessarily need to happen every hour (thanks to the flexible 1575 duration range). The exact cadence will depend a lot on the 1576 ways that the node will be used and what kind of power source it 1577 has. 1578 1579 Since there is no single optimal answer, this configuration 1580 option allows specifying a divider, i.e. how many intervals 1581 the 96 hour minimum gets split into. After each interval the 1582 duration that the node has been in the current state gets 1583 stored to flash. E.g. the default value of 4 means that the 1584 state is saved every 24 hours (96 / 4). 1585 1586endmenu # IV Index & Sequence number 1587 1588menuconfig BT_MESH_LOW_POWER 1589 bool "Support for Low Power features" 1590 help 1591 Enable this option to be able to act as a Low Power Node. 1592 1593if BT_MESH_LOW_POWER 1594 1595config BT_MESH_LPN_ESTABLISHMENT 1596 bool "Perform Friendship establishment using low power" 1597 default y 1598 help 1599 Perform the Friendship establishment using low power, with 1600 the help of a reduced scan duty cycle. The downside of this 1601 is that the node may miss out on messages intended for it 1602 until it has successfully set up Friendship with a Friend 1603 node. 1604 1605config BT_MESH_LPN_AUTO 1606 bool "Automatically start looking for Friend nodes once provisioned" 1607 default y 1608 help 1609 Automatically enable LPN functionality once provisioned and start 1610 looking for Friend nodes. If this option is disabled LPN mode 1611 needs to be manually enabled by calling bt_mesh_lpn_set(true). 1612 1613config BT_MESH_LPN_AUTO_TIMEOUT 1614 int "Time from last received message before going to LPN mode" 1615 default 15 1616 range 0 3600 1617 depends on BT_MESH_LPN_AUTO 1618 help 1619 Time in seconds from the last received message, that the node 1620 will wait before starting to look for Friend nodes. 1621 1622config BT_MESH_LPN_RETRY_TIMEOUT 1623 int "Retry timeout for Friend requests" 1624 default 8 1625 range 1 3600 1626 help 1627 Time in seconds between Friend Requests, if a previous Friend 1628 Request did not receive any acceptable Friend Offers. 1629 1630config BT_MESH_LPN_RSSI_FACTOR 1631 int "RSSIFactor, used in the Friend Offer Delay calculation" 1632 range 0 3 1633 default 0 1634 help 1635 The contribution of the RSSI measured by the Friend node used 1636 in Friend Offer Delay calculations. 0 = 1, 1 = 1.5, 2 = 2, 3 = 2.5. 1637 1638config BT_MESH_LPN_RECV_WIN_FACTOR 1639 int "ReceiveWindowFactor, used in the Friend Offer Delay calculation" 1640 range 0 3 1641 default 0 1642 help 1643 The contribution of the supported Receive Window used in 1644 Friend Offer Delay calculations. 0 = 1, 1 = 1.5, 2 = 2, 3 = 2.5. 1645 1646config BT_MESH_LPN_MIN_QUEUE_SIZE 1647 int "Minimum size of acceptable friend queue (MinQueueSizeLog)" 1648 range 1 7 1649 default 1 1650 help 1651 The MinQueueSizeLog field is defined as log_2(N), where N is 1652 the minimum number of maximum size Lower Transport PDUs that 1653 the Friend node can store in its Friend Queue. As an example, 1654 MinQueueSizeLog value 1 gives N = 2, and value 7 gives N = 128. 1655 1656config BT_MESH_LPN_RECV_DELAY 1657 int "Receive delay requested by the local node" 1658 range 50 $(UINT8_MAX) if BT_MESH_ADV_LEGACY 1659 range 10 $(UINT8_MAX) 1660 default 100 1661 help 1662 The ReceiveDelay is the time between the Low Power node 1663 sending a request and listening for a response. This delay 1664 allows the Friend node time to prepare the response. The value 1665 is in units of milliseconds. When BT_MESH_ADV_LEGACY is used, 1666 the minimal value for the delay can not be less than 50ms due 1667 to a limitation in the legacy advertiser implementation. 1668 1669config BT_MESH_LPN_POLL_TIMEOUT 1670 int "The value of the PollTimeout timer" 1671 range 10 244735 1672 default 300 1673 help 1674 PollTimeout timer is used to measure time between two 1675 consecutive requests sent by the Low Power node. If no 1676 requests are received by the Friend node before the 1677 PollTimeout timer expires, then the friendship is considered 1678 terminated. The value is in units of 100 milliseconds, so e.g. 1679 a value of 300 means 30 seconds. 1680 1681config BT_MESH_LPN_INIT_POLL_TIMEOUT 1682 int "The starting value of the PollTimeout timer" 1683 range 10 BT_MESH_LPN_POLL_TIMEOUT 1684 default BT_MESH_LPN_POLL_TIMEOUT 1685 help 1686 The initial value of the PollTimeout timer when Friendship 1687 gets established for the first time. After this the timeout 1688 will gradually grow toward the actual PollTimeout, doubling 1689 in value for each iteration. The value is in units of 100 1690 milliseconds, so e.g. a value of 300 means 30 seconds. 1691 1692config BT_MESH_LPN_SCAN_LATENCY 1693 int "Latency for enabling scanning" 1694 range 0 50 1695 default 15 1696 help 1697 Latency in milliseconds that it takes to enable scanning. This 1698 is in practice how much time in advance before the Receive Window 1699 that scanning is requested to be enabled. 1700 1701config BT_MESH_LPN_GROUPS 1702 int "Number of groups the LPN can subscribe to" 1703 range 0 16384 1704 default 8 1705 help 1706 Maximum number of groups that the LPN can subscribe to. 1707 1708config BT_MESH_LPN_SUB_ALL_NODES_ADDR 1709 bool "Automatically subscribe all nodes address" 1710 help 1711 Automatically subscribe all nodes address when friendship 1712 established. 1713 1714endif # BT_MESH_LOW_POWER 1715 1716menuconfig BT_MESH_FRIEND 1717 bool "Support for acting as a Friend Node" 1718 help 1719 Enable this option to be able to act as a Friend Node. 1720 1721if BT_MESH_FRIEND 1722 1723config BT_MESH_FRIEND_ENABLED 1724 bool "Friend feature enabled by default" 1725 default y 1726 help 1727 Controls whether the Friend feature is enabled by default when the 1728 device boots up for the first time or unprovisioned. Can be changed 1729 at runtime using bt_mesh_friend_set() function. 1730 1731config BT_MESH_FRIEND_RECV_WIN 1732 int "Friend Receive Window" 1733 range 1 $(UINT8_MAX) 1734 default $(UINT8_MAX) 1735 help 1736 Receive Window in milliseconds supported by the Friend node. 1737 1738config BT_MESH_FRIEND_QUEUE_SIZE 1739 int "Minimum number of buffers supported per Friend Queue" 1740 range 2 65536 1741 default 16 1742 help 1743 Minimum number of buffers available to be stored for each 1744 local Friend Queue. 1745 1746config BT_MESH_FRIEND_SUB_LIST_SIZE 1747 int "Friend Subscription List Size" 1748 range 0 1023 1749 default 3 1750 help 1751 Size of the Subscription List that can be supported by a 1752 Friend node for a Low Power node. 1753 1754config BT_MESH_FRIEND_LPN_COUNT 1755 int "Number of supported LPN nodes" 1756 range 1 1000 1757 default 2 1758 help 1759 Number of Low Power Nodes the Friend can have a Friendship 1760 with simultaneously. 1761 1762config BT_MESH_FRIEND_SEG_RX 1763 int "Number of incomplete segment lists per LPN" 1764 range 1 1000 1765 default 1 1766 help 1767 Number of incomplete segment lists that we track for each LPN 1768 that we are Friends for. In other words, this determines how 1769 many elements we can simultaneously be receiving segmented 1770 messages from when the messages are going into the Friend queue. 1771 1772config BT_MESH_FRIEND_ADV_LATENCY 1773 int "Latency for enabling advertising" 1774 range 0 10 1775 default 0 1776 help 1777 Latency in milliseconds between request for and start of Friend 1778 advertising. Used to tune the ReceiveDelay, making Friend 1779 start sending a message earlier thus compensating for the time between 1780 pushing the message to the Bluetooth host and the actual advertising 1781 start. 1782 1783endif # BT_MESH_FRIEND 1784 1785menu "Capabilities" 1786 1787config BT_MESH_SUBNET_COUNT 1788 int "Maximum number of mesh subnets per network" 1789 default 1 1790 range 1 4096 1791 help 1792 This option specifies how many subnets a Mesh network can 1793 participate in at the same time. 1794 1795config BT_MESH_APP_KEY_COUNT 1796 int "Maximum number of application keys per network" 1797 default 1 1798 range 1 4096 1799 help 1800 This option specifies how many application keys the device can 1801 store per network. 1802 1803config BT_MESH_MODEL_KEY_COUNT 1804 int "Maximum number of application keys per model" 1805 default 1 1806 range 1 4096 1807 help 1808 This option specifies how many application keys each model can 1809 at most be bound to. 1810 1811config BT_MESH_MODEL_GROUP_COUNT 1812 int "Maximum number of group address subscriptions per model" 1813 default 1 1814 range 1 4096 1815 help 1816 This option specifies how many group addresses each model can 1817 at most be subscribed to. 1818 1819config BT_MESH_LABEL_COUNT 1820 int "Maximum number of Label UUIDs used for Virtual Addresses" 1821 default 1 1822 range 0 4096 1823 help 1824 This option specifies how many Label UUIDs can be stored. 1825 1826endmenu # Capabilities 1827 1828menu "Persistent storage" 1829 visible if BT_SETTINGS 1830 1831config BT_MESH_STORE_TIMEOUT 1832 int "Delay (in seconds) before storing anything persistently" 1833 range 0 1000000 1834 default 2 1835 help 1836 This value defines in seconds how soon any pending changes 1837 are actually written into persistent storage (flash) after 1838 a change occurs. 1839 1840config BT_MESH_SEQ_STORE_RATE 1841 int "How often the sequence number gets updated in storage" 1842 range 0 1000000 1843 default 128 1844 default 1 if !BT_SETTINGS # To keep compiling the code 1845 help 1846 This value defines how often the local sequence number gets 1847 updated in persistent storage (i.e. flash). E.g. a value of 100 1848 means that the sequence number will be stored to flash on every 1849 100th increment. If the node sends messages very frequently a 1850 higher value makes more sense, whereas if the node sends 1851 infrequently a value as low as 0 (update storage for every 1852 increment) can make sense. When the stack gets initialized it 1853 will add this number to the last stored one, so that it starts 1854 off with a value that's guaranteed to be larger than the last 1855 one used before power off. 1856 1857if BT_MESH_RPL_STORAGE_MODE_SETTINGS && BT_SETTINGS 1858 1859config BT_MESH_RPL_STORE_TIMEOUT 1860 int "Minimum interval after which unsaved RPL and SRPL entries are updated in the settings subsystem" 1861 range -1 1000000 1862 default 5 1863 help 1864 This value defines time in seconds until unsaved RPL and SRPL entries 1865 are written to the persistent storage. Setting this value 1866 to a large number may lead to security vulnerabilities if a node 1867 gets powered off before the timer is fired. When flash is used 1868 as the persistent storage setting this value to a low number 1869 may wear out flash sooner or later. However, if the RPL gets 1870 updated infrequently a value as low as 0 (write immediately) 1871 may make sense. Setting this value to -1 will disable this timer. 1872 In this case, a user is responsible to store pending RPL entries 1873 using @ref bt_mesh_rpl_pending_store. In the mean time, when 1874 IV Index is updated, the outdated RPL entries will still be 1875 stored by @ref BT_MESH_STORE_TIMEOUT. Finding the right balance 1876 between this timeout and calling @ref bt_mesh_rpl_pending_store 1877 may reduce a risk of security vulnerability and flash wear out. 1878 Failure to store the RPL and becoming vulnerable after reboot 1879 will cause the device to not perform the replay protection 1880 required by the spec. 1881 1882endif # BT_MESH_RPL_STORAGE_MODE_SETTINGS && BT_SETTINGS 1883 1884config BT_MESH_SETTINGS_WORKQ 1885 bool "Store the Bluetooth Mesh settings in a separate work queue" 1886 default y 1887 help 1888 This option enables a separate cooperative thread which is used to 1889 store Bluetooth Mesh configuration. When this option is disabled, 1890 the stack's configuration is stored in the system workqueue. This 1891 means that the system workqueue will be blocked for the time needed 1892 to store the pending data. This time may significantly increase if 1893 the flash driver does the erase operation. Enabling this option 1894 allows Bluetooth Mesh not to block the system workqueue, and thus 1895 process the incoming and outgoing messages while the flash driver 1896 waits for the controller to allocate the time needed to write the 1897 data and/or erase the required flash pages. 1898 1899if BT_MESH_SETTINGS_WORKQ 1900 1901config BT_MESH_SETTINGS_WORKQ_PRIO 1902 int 1903 default 1 1904 1905config BT_MESH_SETTINGS_WORKQ_STACK_SIZE 1906 int "Stack size of the settings workq" 1907 default 1200 if BT_MESH_RPR_SRV 1908 default 880 1909 help 1910 Size of the settings workqueue stack. 1911 1912endif # BT_MESH_SETTINGS_WORKQ 1913 1914endmenu # Persistent storage 1915 1916rsource "shell/Kconfig" 1917 1918if BT_CONN 1919 1920config BT_MESH_MAX_CONN 1921 int "Maximum number of simultaneous Bluetooth connections" 1922 default BT_MAX_CONN 1923 range 1 BT_MAX_CONN 1924 help 1925 Maximum number of simultaneous Bluetooth connections that the Bluetooth 1926 mesh stack can use. 1927 1928endif # BT_CONN 1929 1930config BT_MESH_SELF_TEST 1931 bool "Perform self-tests" 1932 help 1933 This option adds extra self-tests which are run every time 1934 mesh networking is initialized. 1935 1936config BT_MESH_STATISTIC 1937 bool "The frame handling statistics [EXPERIMENTAL]" 1938 select EXPERIMENTAL 1939 help 1940 The module gathers statistics of received, relayed, and transmitted 1941 frames. This helps to estimate the quality of the communication and 1942 the sufficiency of configured advertiser instances. 1943 1944endif # BT_MESH 1945