bluetooth: ots: Add object name write capability

Add the ability to perform a write on the object name GATT
Characteristic with a notification callback to the application
that the name has been written.

In order for this operation to work the memory backing the
object name must be modifiable. To prevent forcing the user
to always allocate 120 bytes for the name, the maximum name
length is changed from a define to a configuration parameter.

Signed-off-by: Abe Kohandel <abe.kohandel@gmail.com>
This commit is contained in:
Abe Kohandel 2021-06-06 10:15:56 -07:00 committed by Anas Nashif
commit d6314fa456
6 changed files with 134 additions and 22 deletions

View file

@ -59,6 +59,14 @@ config BT_OTS_L2CAP_CHAN_RX_MTU
default BT_BUF_ACL_RX_SIZE
range 21 BT_BUF_ACL_RX_SIZE
config BT_OTS_OBJ_MAX_NAME_LEN
int "Maximum object name length"
default 120
range 1 120
config BT_OTS_OBJ_NAME_WRITE_SUPPORT
bool "Support object name write"
module = BT_OTS
module-str = BT_OTS
source "${ZEPHYR_BASE}/subsys/logging/Kconfig.template.log_config"