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 $(UINT16_MAX) 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 $(UINT8_MAX) 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 $(UINT8_MAX) 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 segment. 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 $(UINT16_MAX) 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 choice 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 700 Please note that Bluetooth Mesh stack stores authentication sequence from 701 any message that passed over network cache if this option is enabled. 702 It happens despite the device does not have necessary application keys or 703 there are unknown model operation codes. It causes the situation when device 704 will update the replay protection cache for messages those cannot be handled 705 in the stack. For example, spamming broadcast messages those stack cannot handle 706 might wear out persistent memory. 707 708config BT_MESH_MODEL_VND_MSG_CID_FORCE 709 bool "Force vendor model to use the corresponding CID field message" 710 default y 711 help 712 This option forces vendor model to use messages for the 713 corresponding CID field. 714 715config BT_MESH_MODEL_EXTENSIONS 716 bool "Support for Model extensions" 717 help 718 Enable support for the model extension concept, allowing the Access 719 layer to know about mesh model relationships. 720 721config BT_MESH_COMP_PAGE_1 722 bool "Support for Composition Data Page 1" 723 default y 724 help 725 Enable support for Composition Data Page 1. 726 727config BT_MESH_MODEL_EXTENSION_LIST_SIZE 728 int "Model extensions list size" 729 depends on BT_MESH_COMP_PAGE_1 730 range 0 $(UINT8_MAX) 731 default 0 if !BT_MESH_MODEL_EXTENSIONS 732 default 10 733 help 734 This option specifies how many models relations can be saved. 735 Equals to the number of `bt_mesh_model_extend` and `bt_mesh_model_correspond` calls. 736 This information is used to construct Composition Data Page 1. 737 738config BT_MESH_COMP_PAGE_2 739 bool "Support for Composition Data Page 2" 740 help 741 Enable support for Composition Data Page 2. 742 743config BT_MESH_COMP_PST_BUF_SIZE 744 int "Composition Data Page persistence buffer size" 745 default 100 746 help 747 Stack allocated buffer used to temporarily hold Composition 748 Data Pages during flash operations. Should reflect the size 749 of the largest Composition Data Page present in the application. 750 Note that this buffer should still be large enough to restore previously stored 751 pages after a performed device firmware update. 752 753menuconfig BT_MESH_ACCESS_DELAYABLE_MSG 754 bool "Access layer tx delayable message" 755 default y 756 help 757 Enable following of the message transmitting recommendations, the Access layer 758 specification. The recommendations are optional. 759 However, they are strictly recommended if the device participates in the network with 760 intensive communication where the device receives a lot of requests that require responses. 761 762if BT_MESH_ACCESS_DELAYABLE_MSG 763 764config BT_MESH_ACCESS_DELAYABLE_MSG_CTX_ENABLED 765 bool "The delayable message in the notification message context" 766 default y 767 help 768 Controls whether the delayable message feature is enabled by default in 769 the message context of the opcode notifications. This allows the server part of any 770 model to not bother about additional context configuration to enable the delayable message. 771 Note that if this is disabled then all foundation models stop using the delayable message 772 functionality. 773 774config BT_MESH_ACCESS_DELAYABLE_MSG_COUNT 775 int "Number of simultaneously delayed messages" 776 default 4 777 help 778 The maximum number of messages the Access layer can manage to delay 779 at the same time. The number of messages can be handled only if the Access layer 780 has a sufficient amount of memory to store the model payload for them. 781 782config BT_MESH_ACCESS_DELAYABLE_MSG_CHUNK_SIZE 783 int "Maximum delayable message storage chunk" 784 default 10 785 help 786 Size of memory that Access layer uses to split model message to. It allocates 787 a sufficient number of these chunks from the pool to store the full model payload. 788 789config BT_MESH_ACCESS_DELAYABLE_MSG_CHUNK_COUNT 790 int "Maximum number of available chunks" 791 default 40 792 help 793 The maximum number of available chunks the Access layer allocates to store model payload. 794 It is recommended to keep chunk size equal to the reasonable small value to prevent 795 unnecessary memory wasting. 796 797endif # BT_MESH_ACCESS_DELAYABLE_MSG 798 799config BT_MESH_DELAYABLE_PUBLICATION 800 bool "Delayable publication" 801 default y 802 help 803 When enabled, the periodic publications are randomly delayed by 20 to 50ms. Publications 804 triggered at the start of the stack or by the bt_mesh_model_publish() call are delayed by 805 20 to 500ms. This option reduces the probability of collisions when multiple nodes publish 806 at the same time. 807 808endmenu # Access layer 809 810menu "Models" 811 812config BT_MESH_CFG_CLI 813 bool "Support for Configuration Client Model" 814 help 815 Enable support for the configuration client model. 816 817if BT_MESH_CFG_CLI 818 819config BT_MESH_CFG_CLI_TIMEOUT 820 int "Config Client model timeout in milliseconds" 821 default 5000 822 help 823 This timeout controls how long config client waits for a response 824 message to arrive. This value can be changed at runtime using 825 @ref bt_mesh_cfg_cli_timeout_set. 826 827endif # BT_MESH_CFG_CLI 828 829config BT_MESH_HEALTH_CLI 830 bool "Support for Health Client Model" 831 help 832 Enable support for the health client model. 833 834if BT_MESH_HEALTH_CLI 835 836config BT_MESH_HEALTH_CLI_TIMEOUT 837 int "Health Client model timeout in milliseconds" 838 default 2000 839 help 840 This timeout controls how long health client waits for a response 841 message to arrive. This value can be changed at runtime using 842 @ref bt_mesh_health_cli_timeout_set. 843 844endif # BT_MESH_HEALTH_CLI 845 846menuconfig BT_MESH_BLOB_SRV 847 bool "Support for BLOB Transfer Server model" 848 help 849 Enable the Binary Large Object (BLOB) Transfer Server model. 850 851if BT_MESH_BLOB_SRV 852 853config BT_MESH_BLOB_SRV_PULL_REQ_COUNT 854 int "Number of chunks to request for each pull" 855 default 4 856 range 1 16 857 help 858 In Pull mode (Pull BLOB Transfer Mode), the BLOB Transfer Server 859 requests a fixed number of chunks from the Client. Use this option to 860 control the chunk count in the request. If the BLOB Transfer Server 861 is instantiated on a Low Power node, the pull request count will be 862 trimmed to not overflow the Friend queue. 863 864config BT_MESH_BLOB_SIZE_MAX 865 int "Largest BLOB size in bytes" 866 default 524288 867 range 1 3257617792 868 help 869 The maximum object size a BLOB Transfer Server can receive. 870 871config BT_MESH_BLOB_BLOCK_SIZE_MIN 872 int "Minimum block size" 873 default 4096 874 range 64 1048576 # 2^6 - 2^20 875 help 876 Minimum acceptable block size in a BLOB transfer. The transfer block 877 size will be some number that is a power of two, and is between block 878 size min and block size max. If no such number exists, a compile 879 time warning will be issued. 880 881config BT_MESH_BLOB_BLOCK_SIZE_MAX 882 int "Maximum block size" 883 default 4096 884 range BT_MESH_BLOB_BLOCK_SIZE_MIN 1048576 885 help 886 Maximum acceptable block size in a BLOB transfer. The transfer block 887 size will be some number that is a power of two, and is between block 888 size min and block size max. If no such number exists, a compile 889 time warning will be issued. 890 891config BT_MESH_BLOB_REPORT_TIMEOUT 892 int "Partial Block Report interval in Pull mode" 893 default 10 894 range 1 31 895 help 896 The timer value that Pull BLOB Transfer Server uses to report missed chunks. 897 898endif # BT_MESH_BLOB_SRV 899 900menuconfig BT_MESH_BLOB_CLI 901 bool "Support for BLOB Transfer Client model" 902 help 903 Enable the Binary Large Object (BLOB) Transfer Client model. 904 905if BT_MESH_BLOB_CLI 906 907config BT_MESH_BLOB_CLI_BLOCK_RETRIES 908 int "Number of retries per block" 909 default 5 910 help 911 Controls the number of times the client will attempt to resend missing 912 chunks to the BLOB receivers for every block. 913 914endif 915 916menu "BLOB models common configuration" 917 visible if BT_MESH_BLOB_SRV || BT_MESH_BLOB_CLI 918 919config BT_MESH_BLOB_CHUNK_COUNT_MAX 920 int "Maximum chunk count per block" 921 default 256 922 range 1 2992 923 help 924 A BLOB transfer contains several blocks. Each block is made up of 925 several chunks. This option controls the maximum chunk count per 926 block. 927 928endmenu 929 930config BT_MESH_BLOB_IO_FLASH 931 bool "BLOB flash stream" 932 default y 933 depends on BT_MESH_BLOB_SRV || BT_MESH_BLOB_CLI 934 depends on FLASH_MAP 935 help 936 Enable the BLOB flash stream for reading and writing BLOBs directly to 937 and from flash. 938 939config BT_MESH_DFU_SRV 940 bool "Support for Firmware Update Server model" 941 depends on BT_MESH_MODEL_EXTENSIONS 942 depends on BT_MESH_BLOB_SRV 943 help 944 Enable the Firmware Update Server model. 945 946config BT_MESH_DFU_CLI 947 bool "Support for Firmware Update Client model" 948 depends on BT_MESH_MODEL_EXTENSIONS 949 depends on BT_MESH_BLOB_CLI 950 help 951 Enable the Firmware Update Client model. 952 953menu "Firmware Update model configuration" 954 visible if BT_MESH_DFU_SRV || BT_MESH_DFU_CLI 955 956config BT_MESH_DFU_FWID_MAXLEN 957 int "DFU FWID max length" 958 default 16 959 range 0 106 960 help 961 This value defines the maximum length of an image's firmware ID. 962 963config BT_MESH_DFU_METADATA_MAXLEN 964 int "DFU metadata max length" 965 default 32 966 range 18 $(UINT8_MAX) if BT_MESH_DFU_METADATA 967 range 0 $(UINT8_MAX) 968 help 969 This value defines the maximum length of an image's metadata. 970 971config BT_MESH_DFU_METADATA 972 bool "Support for the default metadata format" 973 help 974 This option adds a set of functions that can be used to encode and decode a firmware 975 metadata using the format defined in the Bluetooth Mesh DFU subsystem. 976 977config BT_MESH_DFU_URI_MAXLEN 978 int "DFU URI max length" 979 default 32 980 range 0 $(UINT8_MAX) 981 help 982 This value defines the maximum length of an image's URI, not including 983 a string terminator. 984 985endmenu # Firmware Update model configuration 986 987menuconfig BT_MESH_DFU_SLOTS 988 bool "Firmware image slot manager" 989 default y if BT_MESH_DFU_CLI 990 help 991 Enable the DFU image slot manager, for managing firmware distribution slots 992 for the Firmware Update Client model. 993 994if BT_MESH_DFU_SLOTS 995 996config BT_MESH_DFU_SLOT_CNT 997 int "Number of firmware image slots" 998 default 1 999 range 1 $(INT16_MAX) 1000 help 1001 This value defines the number of firmware slots the DFU image slot manager 1002 can keep simultaneously. 1003 1004endif 1005 1006menuconfig BT_MESH_DFD_SRV 1007 bool "Support for Firmware Distribution Server model" 1008 depends on BT_MESH_BLOB_SRV 1009 depends on BT_MESH_DFU_CLI 1010 help 1011 Enable the Firmware Distribution Server model. 1012 1013if BT_MESH_DFD_SRV 1014 1015config BT_MESH_DFD_SRV_SLOT_MAX_SIZE 1016 int "Largest DFU image that can be stored" 1017 default BT_MESH_BLOB_SIZE_MAX 1018 range 0 BT_MESH_BLOB_SIZE_MAX 1019 help 1020 This value defines the largest DFU image a single slot can store. 1021 1022config BT_MESH_DFD_SRV_SLOT_SPACE 1023 int "Total DFU image storage space" 1024 default BT_MESH_DFD_SRV_SLOT_MAX_SIZE 1025 range 0 $(UINT32_MAX) 1026 help 1027 This value defines the total storage space dedicated to storing DFU 1028 images on the Firmware Distribution Server. 1029 1030config BT_MESH_DFD_SRV_TARGETS_MAX 1031 int "Maximum Target node count" 1032 default 8 1033 range 1 $(UINT16_MAX) 1034 help 1035 This value defines the maximum number of Target nodes the Firmware 1036 Distribution Server can target simultaneously. 1037 1038config BT_MESH_DFD_SRV_OOB_UPLOAD 1039 bool "Support for DFU image OOB upload" 1040 help 1041 This enables support for OOB upload of firmware images for 1042 distribution. This makes several callbacks and use of the init 1043 macro BT_MESH_DFD_SRV_INIT_OOB mandatory. See the API documentation 1044 for bt_mesh_dfd_srv_cb for details about the mandatory callbacks. 1045 1046endif 1047 1048config BT_MESH_RPR_SRV 1049 bool "Support for Remote Provisioning Server model" 1050 help 1051 The Remote Provisioning Server is the proxy for a provisioning 1052 process, allowing provisioners to tunnel their provisioning 1053 messages through the mesh to the Remote Provisioning Server, which 1054 communicates directly with the unprovisioned node. 1055 1056config BT_MESH_RPR_CLI 1057 bool "Support for Remote Provisioning Client model" 1058 depends on BT_MESH_PROVISIONER 1059 help 1060 The Remote Provisioning Client is instantiated on the provisioner 1061 node, and allows provisioning of new devices through the mesh network 1062 by tunnelling provisioning messages to a Remote Provisioning Server. 1063 1064menu "Remote Provisioning configuration" 1065 visible if BT_MESH_RPR_SRV || BT_MESH_RPR_CLI 1066 1067config BT_MESH_RPR_AD_TYPES_MAX 1068 int "Max AD types in extended scanning" 1069 default 1 1070 range 1 16 1071 help 1072 During extended scanning, the Remote Provisioning Server can include 1073 a set of AD types in the scan reports, collected from the 1074 unprovisioned device's advertisement data. This option controls 1075 the highest number of AD types a single server can scan for, and a 1076 Client can request. 1077 1078config BT_MESH_RPR_SRV_SCANNED_ITEMS_MAX 1079 int "Max scannable unprovisioned devices for Remote Provisioning Server" 1080 default 4 1081 range 4 $(UINT8_MAX) 1082 help 1083 Max number of unique unprovisioned devices a single Remote 1084 Provisioning Server can hold. 1085 1086config BT_MESH_RPR_SRV_AD_DATA_MAX 1087 int "Max additional advertisement data to report" 1088 default 31 1089 range 3 $(UINT8_MAX) 1090 help 1091 Buffer size for the additional advertisement data reported during 1092 extended scanning. 1093 1094endmenu # Remote Provisioning configuration 1095 1096config BT_MESH_SAR_CFG 1097 bool 1098 1099config BT_MESH_SAR_CFG_SRV 1100 bool "Support for SAR Configuration Server model" 1101 select BT_MESH_SAR_CFG 1102 help 1103 Enable support for the SAR configuration server model. 1104 1105config BT_MESH_SAR_CFG_CLI 1106 bool "Support for SAR Configuration Client Model" 1107 select BT_MESH_SAR_CFG 1108 help 1109 Enable support for the SAR configuration client model. 1110 1111config BT_MESH_OP_AGG 1112 bool 1113 1114config BT_MESH_OP_AGG_SRV 1115 bool "Support for Opcode Aggregator Server Model" 1116 select BT_MESH_OP_AGG 1117 help 1118 Enable support for the Opcode Aggregator Server model. 1119 1120config BT_MESH_OP_AGG_CLI 1121 bool "Support for Opcode Aggregator Client Model" 1122 select BT_MESH_OP_AGG 1123 help 1124 Enable support for the Opcode Aggregator Client model. 1125 1126if BT_MESH_OP_AGG_CLI 1127 1128config BT_MESH_OP_AGG_CLI_TIMEOUT 1129 int "Opcodes Aggregator Client model timeout in milliseconds" 1130 default 10000 1131 help 1132 This timeout controls how long Opcodes Aggregator Client waits 1133 for a response message to arrive. This value can be changed at 1134 runtime using @ref bt_mesh_op_agg_cli_timeout_set. 1135 1136endif # BT_MESH_OP_AGG_CLI 1137 1138config BT_MESH_LARGE_COMP_DATA_SRV 1139 bool "Support for Large Composition Data Server Model" 1140 depends on BT_MESH_MODEL_EXTENSIONS 1141 help 1142 Enable support for the Large Composition Data Server model. 1143 1144if BT_MESH_LARGE_COMP_DATA_SRV 1145 1146config BT_MESH_MODELS_METADATA_PAGE_LEN 1147 int "Maximum length of the Models Metadata Page" 1148 default 150 1149 help 1150 This value is the combined total metadata length for 1151 all models on the device. 1152 1153endif # BT_MESH_LARGE_COMP_DATA_SRV 1154 1155config BT_MESH_LARGE_COMP_DATA_CLI 1156 bool "Support for Large Composition Data Client model" 1157 help 1158 Enable support for the Large Composition Data Client model. 1159 1160if BT_MESH_PRIV_BEACONS 1161 1162config BT_MESH_PRIV_BEACON_SRV 1163 bool "Support for Private Beacon Server Model" 1164 depends on BT_MESH_MODEL_EXTENSIONS 1165 help 1166 Enable support for the Private Beacon Server model. 1167 1168config BT_MESH_PRIV_BEACON_CLI 1169 bool "Support for Private Beacon Client Model" 1170 help 1171 Enable support for the Private Beacon Client model. 1172 1173endif # BT_MESH_PRIV_BEACONS 1174 1175config BT_MESH_OD_PRIV_PROXY_CLI 1176 bool "Support for On-Demand Private Proxy Client model" 1177 help 1178 On-Demand Private Proxy Client allows to configure and check the state 1179 of On-Demand Private Proxy Servers. The state determines if the peers will 1180 advertise the Private Network Identity type after receiving a Solicitation PDU. 1181 1182 1183config BT_MESH_OD_PRIV_PROXY_CLI_TIMEOUT 1184 int "Solicitation PDU RPL Configuration Client model timeout in milliseconds" 1185 default 5000 1186 depends on BT_MESH_OD_PRIV_PROXY_CLI 1187 help 1188 This timeout controls how long the On-Demand Private Proxy Client waits 1189 for a response message to arrive. This value can be changed at runtime 1190 using @ref bt_mesh_od_priv_proxy_cli_timeout_set. 1191 1192config BT_MESH_OD_PRIV_PROXY_SRV 1193 bool "Support for On-Demand Private Proxy Server model" 1194 depends on BT_MESH_PRIV_BEACON_SRV 1195 select BT_MESH_SOLICITATION 1196 help 1197 The On-Demand Private Proxy Server is used to support configuration of 1198 advertising with Private Network Identity type of a node. 1199 When enabled, the Solicitation PDU RPL Configuration Server model is also enabled. 1200 1201config BT_MESH_PROXY_SRPL_SIZE 1202 int "Size of solicitation replay protection list (SRPL)" 1203 depends on BT_MESH_OD_PRIV_PROXY_SRV 1204 default 10 1205 range 1 $(UINT8_MAX) 1206 help 1207 Size of SRPL. The list is used to determine if a received Solicitation PDU 1208 is valid. It is valid when the SSRC field value of the received Solicitation PDU 1209 is stored in the SRPL and the SSEQ field value is bigger than the corresponding 1210 stored SSEQ value, or if the SSRC was not stored in the RPL and the SRPL still has 1211 space for new entries. 1212 1213config BT_MESH_SOL_PDU_RPL_CLI 1214 bool "Support for Solicitation PDU RPL Configuration Client model" 1215 help 1216 The Solicitation PDU RPL Configuration Client is used to support the 1217 functionality of removing addresses from the solicitation replay 1218 protection list (SRPL) of a node that supports the Solicitation 1219 PDU RPL Configuration Server model. 1220 1221config BT_MESH_SOL_PDU_RPL_CLI_TIMEOUT 1222 int "Solicitation PDU RPL Configuration Client model timeout in milliseconds" 1223 default 5000 1224 depends on BT_MESH_SOL_PDU_RPL_CLI 1225 help 1226 This timeout controls how long Solicitation PDU RPL Configuration Client waits 1227 for a response message to arrive. This value can be changed at runtime 1228 using @ref bt_mesh_sol_pdu_rpl_cli_timeout_set. 1229 1230endmenu # Models 1231 1232menu "Proxy" 1233 visible if BT_CONN 1234 1235menuconfig BT_MESH_GATT_PROXY 1236 bool "GATT Proxy Service support" 1237 select BT_MESH_GATT_SERVER 1238 select BT_MESH_PROXY 1239 help 1240 This option enables support for the Mesh GATT Proxy Service, 1241 i.e. the ability to act as a proxy between a Mesh GATT Client 1242 and a Mesh network. 1243 1244if BT_MESH_GATT_PROXY 1245 1246config BT_MESH_GATT_PROXY_ENABLED 1247 bool "GATT Proxy enabled" 1248 depends on BT_MESH_GATT_PROXY 1249 default y 1250 help 1251 Controls whether the GATT Proxy feature is enabled by default. 1252 Can be changed through runtime configuration. 1253 1254config BT_MESH_NODE_ID_TIMEOUT 1255 int "Node Identity advertising timeout" 1256 range 1 60 1257 default 60 1258 help 1259 This option determines for how long the local node advertises 1260 using Node Identity. The given value is in seconds. The 1261 specification limits this to 60 seconds, and implies that to 1262 be the appropriate value as well, so just leaving this as the 1263 default is the safest option. 1264 1265config BT_MESH_PROXY_USE_DEVICE_NAME 1266 bool "Include Bluetooth device name in scan response" 1267 help 1268 This option includes GAP device name in scan response when 1269 the GATT Proxy feature is enabled. 1270 1271config BT_MESH_PROXY_FILTER_SIZE 1272 int "Maximum number of filter entries per Proxy Client" 1273 default 16 1274 range 1 $(INT16_MAX) 1275 help 1276 This option specifies how many Proxy Filter entries the local 1277 node supports. This helps in reducing unwanted traffic getting sent to 1278 the proxy client. This value is application specific and should be large 1279 enough so that proxy client can communicate with several devices through 1280 this proxy server node using the default accept list filter type. 1281 1282endif # BT_MESH_GATT_PROXY 1283 1284config BT_MESH_PROXY_CLIENT 1285 bool "Proxy client support" 1286 select BT_GATT_CLIENT 1287 select BT_MESH_GATT_CLIENT 1288 depends on BT_CENTRAL 1289 help 1290 This option enables support for the Mesh GATT Proxy Client, 1291 i.e. the ability to act as a proxy between a Mesh GATT Service 1292 and a Mesh network. 1293 1294config BT_MESH_SOLICITATION 1295 bool 1296 1297config BT_MESH_PROXY_SOLICITATION 1298 bool "Proxy solicitation feature" 1299 select BT_MESH_SOLICITATION 1300 help 1301 This option enables support for sending Solicitation PDUs. 1302 1303config BT_MESH_SOL_ADV_XMIT 1304 int "Solicitation PDU retransmission count" 1305 depends on BT_MESH_PROXY_SOLICITATION 1306 range 0 10 1307 default 2 1308 help 1309 How many times Solicitation PDU advertisements will be repeated. 0 means that there will be 1310 1 transmission without retransmissions. 1311 1312endmenu # Proxy 1313 1314choice BT_MESH_CRYPTO_LIB 1315 prompt "Crypto library:" 1316 default BT_MESH_USES_TFM_PSA if BUILD_WITH_TFM 1317 default BT_MESH_USES_TINYCRYPT 1318 help 1319 Crypto library selection for mesh security. 1320 1321config BT_MESH_USES_TINYCRYPT 1322 bool "TinyCrypt" 1323 select TINYCRYPT 1324 select TINYCRYPT_AES 1325 select TINYCRYPT_AES_CMAC 1326 select TINYCRYPT_ECC_DH 1327 select TINYCRYPT_SHA256 1328 select TINYCRYPT_SHA256_HMAC 1329 select BT_HOST_CCM 1330 help 1331 Use TinyCrypt library to perform crypto operations. 1332 1333config BT_MESH_USES_MBEDTLS_PSA 1334 bool "mbed TLS PSA [EXPERIMENTAL]" 1335 select EXPERIMENTAL 1336 select MBEDTLS 1337 select MBEDTLS_ZEPHYR_ENTROPY 1338 select MBEDTLS_PSA_CRYPTO_C 1339 select MBEDTLS_USE_PSA_CRYPTO 1340 select PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_BASIC 1341 select PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_GENERATE 1342 select PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_DERIVE 1343 select PSA_WANT_ALG_CMAC 1344 select PSA_WANT_ALG_ECB_NO_PADDING 1345 select PSA_WANT_KEY_TYPE_AES 1346 select MBEDTLS_CIPHER_AES_ENABLED 1347 select MBEDTLS_AES_ROM_TABLES 1348 select PSA_WANT_ALG_CCM 1349 select PSA_WANT_KEY_TYPE_HMAC 1350 select PSA_WANT_ALG_HMAC 1351 select PSA_WANT_ALG_SHA_256 1352 select PSA_WANT_ALG_ECDH 1353 select PSA_WANT_ALG_ECDSA 1354 select MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED 1355 select PSA_WANT_ECC_SECP_R1_256 1356 select MBEDTLS_PK_WRITE_C 1357 help 1358 Use mbed TLS library to perform crypto operations. Support of 1359 mbed TLS and PSA is experimental and only BabbleSim tests were run. 1360 Mbed TLS still does not support ITS (internal trust storage) based 1361 on Zephyr's settings subsystem. 1362 Not possible to use for embedded devices yet. 1363 1364config BT_MESH_USES_TFM_PSA 1365 bool "Use TF-M PSA [EXPERIMENTAL]" 1366 select EXPERIMENTAL 1367 depends on BUILD_WITH_TFM 1368 help 1369 Use TF-M that implements PSA security framework. Support of TF-M is 1370 experimental. It is only possible to use with platforms that TF-M supports. 1371 For more platform details see TF-M documentation. 1372 1373endchoice 1374 1375if BT_MESH_USES_MBEDTLS_PSA || BT_MESH_USES_TFM_PSA 1376 1377config BT_MESH_PSA_KEY_ID_USER_MIN_OFFSET 1378 int "Offset of BLE Mesh key id range regarding PSA_KEY_ID_USER_MIN" 1379 default 0 1380 help 1381 The PSA specification mandates to set key identifiers for keys 1382 with persistent lifetime. The users of the PSA API is responsible 1383 (BLE Mesh is user of PSA API) to provide correct and unique identifiers. 1384 The BLE Mesh identifier range should be between PSA_KEY_ID_USER_MIN and 1385 PSA_KEY_ID_USER_MAX. BLE Mesh requires two ids for each subnetwork, two ids 1386 for each application key, and two ids for the device key and device key candidate. 1387 It should consider the Mesh Configuration Database instances if database enabled. 1388 1389endif # BT_MESH_USES_MBEDTLS_PSA || BT_MESH_USES_TFM_PSA 1390 1391menu "Beacons" 1392 1393config BT_MESH_BEACON_ENABLED 1394 bool "Secure network beacon enabled" 1395 default y 1396 help 1397 Controls whether the Secure network beacon feature is enabled by 1398 default. Can be changed through runtime configuration. 1399 1400config BT_MESH_PRIV_BEACONS 1401 bool "Support for private beacons" 1402 default y 1403 help 1404 Enable support for private beacons. 1405 1406endmenu # Beacons 1407 1408menu "IV Index & Sequence number" 1409 1410config BT_MESH_IV_UPDATE_TEST 1411 bool "Test the IV Update Procedure" 1412 help 1413 This option removes the 96 hour limit of the IV Update 1414 Procedure and lets the state be changed at any time. 1415 1416config BT_MESH_IV_UPDATE_SEQ_LIMIT 1417 hex "Sequence number limit to start iv update" 1418 default 0x800000 1419 range 0x000001 0xFFFFFE 1420 help 1421 This option specifies the sequence number value to start iv update. 1422 1423config BT_MESH_IVU_DIVIDER 1424 int "Divider for IV Update state refresh timer" 1425 default 4 1426 range 2 96 1427 help 1428 When the IV Update state enters Normal operation or IV Update 1429 in Progress, we need to keep track of how many hours has passed 1430 in the state, since the specification requires us to remain in 1431 the state at least for 96 hours (Update in Progress has an 1432 additional upper limit of 144 hours). 1433 1434 In order to fulfill the above requirement, even if the node might 1435 be powered off once in a while, we need to store persistently 1436 how many hours the node has been in the state. This doesn't 1437 necessarily need to happen every hour (thanks to the flexible 1438 duration range). The exact cadence will depend a lot on the 1439 ways that the node will be used and what kind of power source it 1440 has. 1441 1442 Since there is no single optimal answer, this configuration 1443 option allows specifying a divider, i.e. how many intervals 1444 the 96 hour minimum gets split into. After each interval the 1445 duration that the node has been in the current state gets 1446 stored to flash. E.g. the default value of 4 means that the 1447 state is saved every 24 hours (96 / 4). 1448 1449endmenu # IV Index & Sequence number 1450 1451menuconfig BT_MESH_LOW_POWER 1452 bool "Support for Low Power features" 1453 help 1454 Enable this option to be able to act as a Low Power Node. 1455 1456if BT_MESH_LOW_POWER 1457 1458config BT_MESH_LPN_ESTABLISHMENT 1459 bool "Perform Friendship establishment using low power" 1460 default y 1461 help 1462 Perform the Friendship establishment using low power, with 1463 the help of a reduced scan duty cycle. The downside of this 1464 is that the node may miss out on messages intended for it 1465 until it has successfully set up Friendship with a Friend 1466 node. 1467 1468config BT_MESH_LPN_AUTO 1469 bool "Automatically start looking for Friend nodes once provisioned" 1470 default y 1471 help 1472 Automatically enable LPN functionality once provisioned and start 1473 looking for Friend nodes. If this option is disabled LPN mode 1474 needs to be manually enabled by calling bt_mesh_lpn_set(true). 1475 1476config BT_MESH_LPN_AUTO_TIMEOUT 1477 int "Time from last received message before going to LPN mode" 1478 default 15 1479 range 0 3600 1480 depends on BT_MESH_LPN_AUTO 1481 help 1482 Time in seconds from the last received message, that the node 1483 will wait before starting to look for Friend nodes. 1484 1485config BT_MESH_LPN_RETRY_TIMEOUT 1486 int "Retry timeout for Friend requests" 1487 default 8 1488 range 1 3600 1489 help 1490 Time in seconds between Friend Requests, if a previous Friend 1491 Request did not receive any acceptable Friend Offers. 1492 1493config BT_MESH_LPN_RSSI_FACTOR 1494 int "RSSIFactor, used in the Friend Offer Delay calculation" 1495 range 0 3 1496 default 0 1497 help 1498 The contribution of the RSSI measured by the Friend node used 1499 in Friend Offer Delay calculations. 0 = 1, 1 = 1.5, 2 = 2, 3 = 2.5. 1500 1501config BT_MESH_LPN_RECV_WIN_FACTOR 1502 int "ReceiveWindowFactor, used in the Friend Offer Delay calculation" 1503 range 0 3 1504 default 0 1505 help 1506 The contribution of the supported Receive Window used in 1507 Friend Offer Delay calculations. 0 = 1, 1 = 1.5, 2 = 2, 3 = 2.5. 1508 1509config BT_MESH_LPN_MIN_QUEUE_SIZE 1510 int "Minimum size of acceptable friend queue (MinQueueSizeLog)" 1511 range 1 7 1512 default 1 1513 help 1514 The MinQueueSizeLog field is defined as log_2(N), where N is 1515 the minimum number of maximum size Lower Transport PDUs that 1516 the Friend node can store in its Friend Queue. As an example, 1517 MinQueueSizeLog value 1 gives N = 2, and value 7 gives N = 128. 1518 1519config BT_MESH_LPN_RECV_DELAY 1520 int "Receive delay requested by the local node" 1521 range 50 $(UINT8_MAX) if BT_MESH_ADV_LEGACY 1522 range 10 $(UINT8_MAX) 1523 default 100 1524 help 1525 The ReceiveDelay is the time between the Low Power node 1526 sending a request and listening for a response. This delay 1527 allows the Friend node time to prepare the response. The value 1528 is in units of milliseconds. When BT_MESH_ADV_LEGACY is used, 1529 the minimal value for the delay can not be less than 50ms due 1530 to a limitation in the legacy advertiser implementation. 1531 1532config BT_MESH_LPN_POLL_TIMEOUT 1533 int "The value of the PollTimeout timer" 1534 range 10 244735 1535 default 300 1536 help 1537 PollTimeout timer is used to measure time between two 1538 consecutive requests sent by the Low Power node. If no 1539 requests are received by the Friend node before the 1540 PollTimeout timer expires, then the friendship is considered 1541 terminated. The value is in units of 100 milliseconds, so e.g. 1542 a value of 300 means 30 seconds. 1543 1544config BT_MESH_LPN_INIT_POLL_TIMEOUT 1545 int "The starting value of the PollTimeout timer" 1546 range 10 BT_MESH_LPN_POLL_TIMEOUT 1547 default BT_MESH_LPN_POLL_TIMEOUT 1548 help 1549 The initial value of the PollTimeout timer when Friendship 1550 gets established for the first time. After this the timeout 1551 will gradually grow toward the actual PollTimeout, doubling 1552 in value for each iteration. The value is in units of 100 1553 milliseconds, so e.g. a value of 300 means 30 seconds. 1554 1555config BT_MESH_LPN_SCAN_LATENCY 1556 int "Latency for enabling scanning" 1557 range 0 50 1558 default 15 1559 help 1560 Latency in milliseconds that it takes to enable scanning. This 1561 is in practice how much time in advance before the Receive Window 1562 that scanning is requested to be enabled. 1563 1564config BT_MESH_LPN_GROUPS 1565 int "Number of groups the LPN can subscribe to" 1566 range 0 16384 1567 default 8 1568 help 1569 Maximum number of groups that the LPN can subscribe to. 1570 1571config BT_MESH_LPN_SUB_ALL_NODES_ADDR 1572 bool "Automatically subscribe all nodes address" 1573 help 1574 Automatically subscribe all nodes address when friendship 1575 established. 1576 1577endif # BT_MESH_LOW_POWER 1578 1579menuconfig BT_MESH_FRIEND 1580 bool "Support for acting as a Friend Node" 1581 help 1582 Enable this option to be able to act as a Friend Node. 1583 1584if BT_MESH_FRIEND 1585 1586config BT_MESH_FRIEND_ENABLED 1587 bool "Friend feature enabled by default" 1588 default y 1589 help 1590 Controls whether the Friend feature is enabled by default when the 1591 device boots up for the first time or unprovisioned. Can be changed 1592 at runtime using bt_mesh_friend_set() function. 1593 1594config BT_MESH_FRIEND_RECV_WIN 1595 int "Friend Receive Window" 1596 range 1 $(UINT8_MAX) 1597 default $(UINT8_MAX) 1598 help 1599 Receive Window in milliseconds supported by the Friend node. 1600 1601config BT_MESH_FRIEND_QUEUE_SIZE 1602 int "Minimum number of buffers supported per Friend Queue" 1603 range 2 65536 1604 default 16 1605 help 1606 Minimum number of buffers available to be stored for each 1607 local Friend Queue. 1608 1609config BT_MESH_FRIEND_SUB_LIST_SIZE 1610 int "Friend Subscription List Size" 1611 range 0 1023 1612 default 3 1613 help 1614 Size of the Subscription List that can be supported by a 1615 Friend node for a Low Power node. 1616 1617config BT_MESH_FRIEND_LPN_COUNT 1618 int "Number of supported LPN nodes" 1619 range 1 1000 1620 default 2 1621 help 1622 Number of Low Power Nodes the Friend can have a Friendship 1623 with simultaneously. 1624 1625config BT_MESH_FRIEND_SEG_RX 1626 int "Number of incomplete segment lists per LPN" 1627 range 1 1000 1628 default 1 1629 help 1630 Number of incomplete segment lists that we track for each LPN 1631 that we are Friends for. In other words, this determines how 1632 many elements we can simultaneously be receiving segmented 1633 messages from when the messages are going into the Friend queue. 1634 1635config BT_MESH_FRIEND_ADV_LATENCY 1636 int "Latency for enabling advertising" 1637 range 0 10 1638 default 0 1639 help 1640 Latency in milliseconds between request for and start of Friend 1641 advertising. Used to tune the ReceiveDelay, making Friend 1642 start sending a message earlier thus compensating for the time between 1643 pushing the message to the Bluetooth host and the actual advertising 1644 start. 1645 1646endif # BT_MESH_FRIEND 1647 1648menu "Capabilities" 1649 1650config BT_MESH_SUBNET_COUNT 1651 int "Maximum number of mesh subnets per network" 1652 default 1 1653 range 1 4096 1654 help 1655 This option specifies how many subnets a Mesh network can 1656 participate in at the same time. 1657 1658config BT_MESH_APP_KEY_COUNT 1659 int "Maximum number of application keys per network" 1660 default 1 1661 range 1 4096 1662 help 1663 This option specifies how many application keys the device can 1664 store per network. 1665 1666config BT_MESH_MODEL_KEY_COUNT 1667 int "Maximum number of application keys per model" 1668 default 1 1669 range 1 4096 1670 help 1671 This option specifies how many application keys each model can 1672 at most be bound to. 1673 1674config BT_MESH_MODEL_GROUP_COUNT 1675 int "Maximum number of group address subscriptions per model" 1676 default 1 1677 range 1 4096 1678 help 1679 This option specifies how many group addresses each model can 1680 at most be subscribed to. 1681 1682config BT_MESH_LABEL_COUNT 1683 int "Maximum number of Label UUIDs used for Virtual Addresses" 1684 default 1 1685 range 0 4096 1686 help 1687 This option specifies how many Label UUIDs can be stored. 1688 1689endmenu # Capabilities 1690 1691menu "Persistent storage" 1692 visible if BT_SETTINGS 1693 1694config BT_MESH_STORE_TIMEOUT 1695 int "Delay (in seconds) before storing anything persistently" 1696 range 0 1000000 1697 default 2 1698 help 1699 This value defines in seconds how soon any pending changes 1700 are actually written into persistent storage (flash) after 1701 a change occurs. 1702 1703config BT_MESH_SEQ_STORE_RATE 1704 int "How often the sequence number gets updated in storage" 1705 range 0 1000000 1706 default 128 1707 default 1 if !BT_SETTINGS # To keep compiling the code 1708 help 1709 This value defines how often the local sequence number gets 1710 updated in persistent storage (i.e. flash). E.g. a value of 100 1711 means that the sequence number will be stored to flash on every 1712 100th increment. If the node sends messages very frequently a 1713 higher value makes more sense, whereas if the node sends 1714 infrequently a value as low as 0 (update storage for every 1715 increment) can make sense. When the stack gets initialized it 1716 will add this number to the last stored one, so that it starts 1717 off with a value that's guaranteed to be larger than the last 1718 one used before power off. 1719 1720if BT_MESH_RPL_STORAGE_MODE_SETTINGS && BT_SETTINGS 1721 1722config BT_MESH_RPL_STORE_TIMEOUT 1723 int "Minimum interval after which unsaved RPL and SRPL entries are updated in the settings subsystem" 1724 range -1 1000000 1725 default 5 1726 help 1727 This value defines time in seconds until unsaved RPL and SRPL entries 1728 are written to the persistent storage. Setting this value 1729 to a large number may lead to security vulnerabilities if a node 1730 gets powered off before the timer is fired. When flash is used 1731 as the persistent storage setting this value to a low number 1732 may wear out flash sooner or later. However, if the RPL gets 1733 updated infrequently a value as low as 0 (write immediately) 1734 may make sense. Setting this value to -1 will disable this timer. 1735 In this case, a user is responsible to store pending RPL entries 1736 using @ref bt_mesh_rpl_pending_store. In the mean time, when 1737 IV Index is updated, the outdated RPL entries will still be 1738 stored by @ref BT_MESH_STORE_TIMEOUT. Finding the right balance 1739 between this timeout and calling @ref bt_mesh_rpl_pending_store 1740 may reduce a risk of security vulnerability and flash wear out. 1741 Failure to store the RPL and becoming vulnerable after reboot 1742 will cause the device to not perform the replay protection 1743 required by the spec. 1744 1745endif # BT_MESH_RPL_STORAGE_MODE_SETTINGS && BT_SETTINGS 1746 1747config BT_MESH_SETTINGS_WORKQ 1748 bool "Store the Bluetooth Mesh settings in a separate work queue" 1749 default y 1750 help 1751 This option enables a separate cooperative thread which is used to 1752 store Bluetooth Mesh configuration. When this option is disabled, 1753 the stack's configuration is stored in the system workqueue. This 1754 means that the system workqueue will be blocked for the time needed 1755 to store the pending data. This time may significantly increase if 1756 the flash driver does the erase operation. Enabling this option 1757 allows Bluetooth Mesh not to block the system workqueue, and thus 1758 process the incoming and outgoing messages while the flash driver 1759 waits for the controller to allocate the time needed to write the 1760 data and/or erase the required flash pages. 1761 1762if BT_MESH_SETTINGS_WORKQ 1763 1764config BT_MESH_SETTINGS_WORKQ_PRIO 1765 int 1766 default 1 1767 1768config BT_MESH_SETTINGS_WORKQ_STACK_SIZE 1769 int "Stack size of the settings workq" 1770 default 1200 if BT_MESH_RPR_SRV 1771 default 880 1772 help 1773 Size of the settings workqueue stack. 1774 1775endif # BT_MESH_SETTINGS_WORKQ 1776 1777endmenu # Persistent storage 1778 1779rsource "shell/Kconfig" 1780 1781if BT_CONN 1782 1783config BT_MESH_MAX_CONN 1784 int "Maximum number of simultaneous Bluetooth connections" 1785 default BT_MAX_CONN 1786 range 1 BT_MAX_CONN 1787 help 1788 Maximum number of simultaneous Bluetooth connections that the Bluetooth 1789 mesh stack can use. 1790 1791endif # BT_CONN 1792 1793config BT_MESH_SELF_TEST 1794 bool "Perform self-tests" 1795 help 1796 This option adds extra self-tests which are run every time 1797 mesh networking is initialized. 1798 1799config BT_MESH_STATISTIC 1800 bool "The frame handling statistics [EXPERIMENTAL]" 1801 select EXPERIMENTAL 1802 help 1803 The module gathers statistics of received, relayed, and transmitted 1804 frames. This helps to estimate the quality of the communication and 1805 the sufficiency of configured advertiser instances. 1806 1807endif # BT_MESH 1808