1# Bluetooth Object Transfer service 2 3# Copyright (c) 2020-2022 Nordic Semiconductor ASA 4# SPDX-License-Identifier: Apache-2.0 5 6config BT_OTS 7 bool "Object Transfer Service (OTS) [EXPERIMENTAL]" 8 select BT_L2CAP_DYNAMIC_CHANNEL 9 select BT_GATT_DYNAMIC_DB 10 select BT_SMP 11 select EXPERIMENTAL 12 help 13 Enable Object Transfer Service. 14 15if BT_OTS 16 17config BT_OTS_DIR_LIST_OBJ 18 bool "The Directory Listing Object" 19 help 20 Enables the Directory Listing Object, which is an object that contains all the metadata 21 from all other objects, for easy exposure to a client. Enabling this will use one of the 22 objects given by BT_OTS_MAX_OBJ_CNT. 23 24config BT_OTS_DIR_LIST_OBJ_NAME 25 string "The object name of the Directory Listing Object" 26 default "Directory" 27 depends on BT_OTS_DIR_LIST_OBJ 28 help 29 The name of the Directory Listing Object when it is read by a client. 30 31config BT_OTS_MAX_INST_CNT 32 int "Maximum number of available OTS instances" 33 default 1 34 range 1 1 if !BT_OTS_SECONDARY_SVC 35 36config BT_OTS_SECONDARY_SVC 37 bool "Register OTS as Secondary Service" 38 39config BT_OTS_OACP_CREATE_SUPPORT 40 bool "Support OACP Create Operation" 41 depends on BT_OTS_OACP_WRITE_SUPPORT 42 depends on BT_OTS_OBJ_NAME_WRITE_SUPPORT 43 44config BT_OTS_OACP_CHECKSUM_SUPPORT 45 imply CRC 46 bool "Support OACP Calculate Checksum operation" 47 48config BT_OTS_OACP_DELETE_SUPPORT 49 bool "Support OACP Delete Operation" 50 51config BT_OTS_OACP_READ_SUPPORT 52 bool "Support OACP Read Operation" 53 default y 54 55config BT_OTS_OACP_WRITE_SUPPORT 56 bool "Support OACP Write Operation" 57 58config BT_OTS_OACP_PATCH_SUPPORT 59 bool "Support patching of objects" 60 depends on BT_OTS_OACP_WRITE_SUPPORT 61 62config BT_OTS_OLCP_GO_TO_SUPPORT 63 bool "Support OLCP Go To Operation" 64 default y 65 66config BT_OTS_OBJ_NAME_WRITE_SUPPORT 67 bool "Support object name write" 68 69endif # BT_OTS 70 71#### Object Transfer Service Client ################################ 72 73config BT_OTS_CLIENT 74 bool "Object Transfer Service Client [Experimental]" 75 select BT_L2CAP_DYNAMIC_CHANNEL 76 select BT_GATT_CLIENT 77 select BT_GATT_AUTO_DISCOVER_CCC 78 select EXPERIMENTAL 79 help 80 This option enables support for the Object Transfer Service Client. 81 82if BT_OTS || BT_OTS_CLIENT 83 84config BT_OTS_MAX_OBJ_CNT 85 hex "Maximum number of objects that each service instance can store" 86 default 0x05 87 # Given the maximum size of a directory listing record (172) and the maximum size of an 88 # object using the net_buf implementation is 2^16-1, the maximum number of objects is given 89 # by 2^16-1 / 172 = 381 == 0x17D) 90 range 0x02 0x17D if BT_OTS_DIR_LIST_OBJ 91 # Max obj count is otherwise the non-RFU IDs available 92 range 0x01 0xFFFFFFFFFFFFFEFF 93 94config BT_OTS_L2CAP_CHAN_TX_MTU 95 int "Size of TX MTU for Object Transfer Channel" 96 default 256 97 range 21 65533 98 99config BT_OTS_L2CAP_CHAN_RX_MTU 100 int "Size of RX MTU for Object Transfer Channel" 101 # RX MTU will be truncated to account for the L2CAP PDU and SDU header. 102 default BT_BUF_ACL_RX_SIZE 103 range 21 BT_BUF_ACL_RX_SIZE 104 105config BT_OTS_OBJ_MAX_NAME_LEN 106 int "Maximum object name length" 107 # Max name length allowed by OTS spec is 120 octets 108 # TODO: Set separate max name length for client, as other 109 # servers may use the full 120 octets. 110 default 120 111 range 1 120 112 113endif # BT_OTS || BT_OTS_CLIENT 114