summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2017-01-27 15:20:32 +0200
committerJohan Hedberg <johan.hedberg@intel.com>2017-01-28 08:43:41 +0200
commit4153b6ca1f430cb87785a233385c9c4e9ae830ea (patch)
tree3e88cbdbf469205d3b3b026d16171a50095e3a80
parente2b759bc698ad7539b5322709f3ec0d1b0ffd235 (diff)
Bluetooth: Kconfig: Make device name variable generic
Change BREDR_NAME to DEVICE_NAME so it can also be used as the LE device name. Change-Id: I9ef55d9dff098372d47d9d5754ad7a7163a65bc0 Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
-rw-r--r--drivers/bluetooth/nble/Kconfig7
-rw-r--r--samples/bluetooth/handsfree/prj.conf2
-rw-r--r--subsys/bluetooth/host/Kconfig13
-rw-r--r--subsys/bluetooth/host/hci_core.c2
-rw-r--r--tests/bluetooth/shell/arduino_101.conf2
-rw-r--r--tests/bluetooth/shell/prj.conf2
-rw-r--r--tests/bluetooth/shell/prj_br.conf2
7 files changed, 19 insertions, 11 deletions
diff --git a/drivers/bluetooth/nble/Kconfig b/drivers/bluetooth/nble/Kconfig
index 44758734e..1d6439d57 100644
--- a/drivers/bluetooth/nble/Kconfig
+++ b/drivers/bluetooth/nble/Kconfig
@@ -71,6 +71,13 @@ config BLUETOOTH_RX_STACK_SIZE
require extra stack space, this value can be increased to
accomodate for that.
+config BLUETOOTH_DEVICE_NAME
+ string "Bluetooth device name"
+ default "Zephyr"
+ help
+ Bluetooth device name. Name can be up to 248 bytes long (excluding
+ NULL termination). Can be empty string.
+
if BLUETOOTH_DEBUG
config BLUETOOTH_DEBUG_HCI_DRIVER
diff --git a/samples/bluetooth/handsfree/prj.conf b/samples/bluetooth/handsfree/prj.conf
index 284ece708..cb6dc2e95 100644
--- a/samples/bluetooth/handsfree/prj.conf
+++ b/samples/bluetooth/handsfree/prj.conf
@@ -5,4 +5,4 @@ CONFIG_BLUETOOTH_HFP_HF=y
CONFIG_BLUETOOTH_MAX_HF_CONN=1
CONFIG_BLUETOOTH_PERIPHERAL=y
CONFIG_BLUETOOTH_RFCOMM_MTU=127
-CONFIG_BLUETOOTH_BREDR_NAME="test-Handsfree"
+CONFIG_BLUETOOTH_DEVICE_NAME="test-Handsfree"
diff --git a/subsys/bluetooth/host/Kconfig b/subsys/bluetooth/host/Kconfig
index f98f6014d..8194831c0 100644
--- a/subsys/bluetooth/host/Kconfig
+++ b/subsys/bluetooth/host/Kconfig
@@ -244,6 +244,13 @@ config BLUETOOTH_MAX_PAIRED
endif # BLUETOOTH_CONN
+config BLUETOOTH_DEVICE_NAME
+ string "Bluetooth device name"
+ default "Zephyr"
+ help
+ Bluetooth device name. Name can be up to 248 bytes long (excluding
+ NULL termination). Can be empty string.
+
endif # BLUETOOTH_HCI_HOST
config BLUETOOTH_TINYCRYPT_ECC
@@ -479,10 +486,4 @@ config BLUETOOTH_PAGE_TIMEOUT
This option sets the page timeout value. Value is selected as
(N * 0.625) ms.
-config BLUETOOTH_BREDR_NAME
- string "Bluetooth BR/EDR device name"
- default "Zephyr"
- help
- Bluetooth BR/EDR name. Name can be up to 248 bytes long (excluding
- NULL termination). Can be empty string.
endif # BLUETOOTH_BREDR
diff --git a/subsys/bluetooth/host/hci_core.c b/subsys/bluetooth/host/hci_core.c
index 7ce149951..f3e93b1b1 100644
--- a/subsys/bluetooth/host/hci_core.c
+++ b/subsys/bluetooth/host/hci_core.c
@@ -3114,7 +3114,7 @@ static int br_init(void)
}
name_cp = net_buf_add(buf, sizeof(*name_cp));
- strncpy((char *)name_cp->local_name, CONFIG_BLUETOOTH_BREDR_NAME,
+ strncpy((char *)name_cp->local_name, CONFIG_BLUETOOTH_DEVICE_NAME,
sizeof(name_cp->local_name));
err = bt_hci_cmd_send_sync(BT_HCI_OP_WRITE_LOCAL_NAME, buf, NULL);
diff --git a/tests/bluetooth/shell/arduino_101.conf b/tests/bluetooth/shell/arduino_101.conf
index 3480c43b1..fa5508237 100644
--- a/tests/bluetooth/shell/arduino_101.conf
+++ b/tests/bluetooth/shell/arduino_101.conf
@@ -11,7 +11,7 @@ CONFIG_BLUETOOTH_GATT_CLIENT=y
CONFIG_BLUETOOTH_L2CAP_DYNAMIC_CHANNEL=y
CONFIG_BLUETOOTH_TINYCRYPT_ECC=y
CONFIG_CONSOLE_SHELL=y
-CONFIG_BLUETOOTH_BREDR_NAME="test shell"
+CONFIG_BLUETOOTH_DEVICE_NAME="test shell"
CONFIG_BLUETOOTH_L2CAP_TX_BUF_COUNT=6
CONFIG_BLUETOOTH_INTERNAL_STORAGE=y
CONFIG_FLASH=y
diff --git a/tests/bluetooth/shell/prj.conf b/tests/bluetooth/shell/prj.conf
index 0cdd29ce5..f68b0123b 100644
--- a/tests/bluetooth/shell/prj.conf
+++ b/tests/bluetooth/shell/prj.conf
@@ -11,6 +11,6 @@ CONFIG_BLUETOOTH_GATT_CLIENT=y
CONFIG_BLUETOOTH_L2CAP_DYNAMIC_CHANNEL=y
CONFIG_BLUETOOTH_TINYCRYPT_ECC=y
CONFIG_CONSOLE_SHELL=y
-CONFIG_BLUETOOTH_BREDR_NAME="test shell"
+CONFIG_BLUETOOTH_DEVICE_NAME="test shell"
CONFIG_BLUETOOTH_L2CAP_TX_BUF_COUNT=6
diff --git a/tests/bluetooth/shell/prj_br.conf b/tests/bluetooth/shell/prj_br.conf
index 7865938e7..c935e61b4 100644
--- a/tests/bluetooth/shell/prj_br.conf
+++ b/tests/bluetooth/shell/prj_br.conf
@@ -13,4 +13,4 @@ CONFIG_BLUETOOTH_ATT_PREPARE_COUNT=2
CONFIG_BLUETOOTH_GATT_CLIENT=y
CONFIG_BLUETOOTH_L2CAP_DYNAMIC_CHANNEL=y
CONFIG_BLUETOOTH_TINYCRYPT_ECC=y
-CONFIG_BLUETOOTH_BREDR_NAME="test shell"
+CONFIG_BLUETOOTH_DEVICE_NAME="test shell"