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