Bluetooth: Store device name

This uses bt_dev to store the name and allow changing it at runtime, in
addtion to that if CONFIG_BT_SETTINGS is defined make the name
persistent.

Fixes #8357

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
Luiz Augusto von Dentz 2018-07-09 15:12:04 +03:00 committed by Johan Hedberg
commit 2637c978fe
5 changed files with 126 additions and 33 deletions

View file

@ -334,6 +334,17 @@ config BT_SCAN_WITH_IDENTITY
disclosing local identity information. However, if the use case
requires disclosing it then enable this option.
config BT_DEVICE_NAME_MAX
int "Maximum size in bytes for device name"
default 28
default 0 if !BT_SETTINGS
range 0 248
help
Bluetooth device name storage size. Storage can be up to 248 bytes
long (excluding NULL termination). 0 means that no storage space is
allocated for device name in which case the device name cannot be
changed at runtime.
config BT_DEVICE_NAME
string "Bluetooth device name"
default "Zephyr"