Skip to content

Commit

Permalink
Bluetooth: define BT_COMPANY_ID_NORDIC
Browse files Browse the repository at this point in the history
Also set BT_COMPANY_ID to BT_COMPANY_ID_NORDIC.

Making a kconfig option makes it also usable outside sdk-nrf.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
  • Loading branch information
jori-nordic authored and nordicjm committed Nov 23, 2023
1 parent 528b8f5 commit f56190f
Show file tree
Hide file tree
Showing 15 changed files with 12 additions and 15 deletions.
2 changes: 1 addition & 1 deletion include/bluetooth/mesh/vnd/dm_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
extern "C" {
#endif

#define BT_MESH_VENDOR_COMPANY_ID 0x0059
#define BT_MESH_VENDOR_COMPANY_ID CONFIG_BT_COMPANY_ID_NORDIC
#define BT_MESH_MODEL_ID_DM_SRV 0x000B
#define BT_MESH_MODEL_ID_DM_CLI 0x000C

Expand Down
1 change: 0 additions & 1 deletion samples/bluetooth/mesh/ble_peripheral_lbs_coex/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ CONFIG_SOC_FLASH_NRF_PARTIAL_ERASE=y

# Bluetooth configuration
CONFIG_BT=y
CONFIG_BT_COMPANY_ID=0x0059
CONFIG_BT_DEVICE_NAME="Mesh and Peripheral Coex"
CONFIG_BT_L2CAP_TX_BUF_COUNT=8
CONFIG_BT_OBSERVER=y
Expand Down
2 changes: 1 addition & 1 deletion samples/bluetooth/mesh/chat/include/chat_cli.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ extern "C" {

/* .. include_startingpoint_chat_cli_rst_1 */
/** Company ID of the Bluetooth Mesh Chat Client model. */
#define BT_MESH_CHAT_CLI_VENDOR_COMPANY_ID 0x0059
#define BT_MESH_CHAT_CLI_VENDOR_COMPANY_ID CONFIG_BT_COMPANY_ID_NORDIC

/** Model ID of the Bluetooth Mesh Chat Client model. */
#define BT_MESH_CHAT_CLI_VENDOR_MODEL_ID 0x000A
Expand Down
1 change: 0 additions & 1 deletion samples/bluetooth/mesh/chat/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ CONFIG_SOC_FLASH_NRF_PARTIAL_ERASE=y

# Bluetooth configuration
CONFIG_BT=y
CONFIG_BT_COMPANY_ID=0x0059
CONFIG_BT_DEVICE_NAME="Mesh Chat"
CONFIG_BT_L2CAP_TX_BUF_COUNT=8
CONFIG_BT_OBSERVER=y
Expand Down
1 change: 0 additions & 1 deletion samples/bluetooth/mesh/dfu/distributor/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ CONFIG_MCUBOOT_IMGTOOL_SIGN_VERSION="1.0.0+0"

# Bluetooth configuration
CONFIG_BT=y
CONFIG_BT_COMPANY_ID=0x0059
CONFIG_BT_DEVICE_NAME="Mesh DFU Distributor"
CONFIG_BT_L2CAP_TX_BUF_COUNT=8
CONFIG_BT_OBSERVER=y
Expand Down
1 change: 0 additions & 1 deletion samples/bluetooth/mesh/dfu/target/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ CONFIG_REBOOT=y

# Bluetooth configuration
CONFIG_BT=y
CONFIG_BT_COMPANY_ID=0x0059
CONFIG_BT_DEVICE_NAME="Mesh DFU Target"
CONFIG_BT_L2CAP_TX_BUF_COUNT=8
CONFIG_BT_OBSERVER=y
Expand Down
1 change: 0 additions & 1 deletion samples/bluetooth/mesh/light/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ CONFIG_SOC_FLASH_NRF_PARTIAL_ERASE=y

# Bluetooth configuration
CONFIG_BT=y
CONFIG_BT_COMPANY_ID=0x0059
CONFIG_BT_DEVICE_NAME="Mesh Light"
CONFIG_BT_L2CAP_TX_BUF_COUNT=8

Expand Down
1 change: 0 additions & 1 deletion samples/bluetooth/mesh/light_ctrl/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ CONFIG_SOC_FLASH_NRF_PARTIAL_ERASE=y

# Bluetooth configuration
CONFIG_BT=y
CONFIG_BT_COMPANY_ID=0x0059
CONFIG_BT_DEVICE_NAME="Mesh Light Fixture"
CONFIG_BT_L2CAP_TX_BUF_COUNT=8
CONFIG_BT_OBSERVER=y
Expand Down
1 change: 0 additions & 1 deletion samples/bluetooth/mesh/light_dimmer/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ CONFIG_SOC_FLASH_NRF_PARTIAL_ERASE=y

# Bluetooth configuration
CONFIG_BT=y
CONFIG_BT_COMPANY_ID=0x0059
CONFIG_BT_DEVICE_NAME="Mesh Light Dimmer"
CONFIG_BT_L2CAP_TX_BUF_COUNT=8
CONFIG_BT_OBSERVER=y
Expand Down
1 change: 0 additions & 1 deletion samples/bluetooth/mesh/light_switch/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ CONFIG_SOC_FLASH_NRF_PARTIAL_ERASE=y

# Bluetooth configuration
CONFIG_BT=y
CONFIG_BT_COMPANY_ID=0x0059
CONFIG_BT_DEVICE_NAME="Mesh Light Switch"
CONFIG_BT_L2CAP_TX_BUF_COUNT=8
CONFIG_BT_OBSERVER=y
Expand Down
1 change: 0 additions & 1 deletion samples/bluetooth/mesh/sensor_client/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ CONFIG_SOC_FLASH_NRF_PARTIAL_ERASE=y

# Bluetooth configuration
CONFIG_BT=y
CONFIG_BT_COMPANY_ID=0x0059
CONFIG_BT_DEVICE_NAME="Mesh Sensor Observer"
CONFIG_BT_L2CAP_TX_BUF_COUNT=8
CONFIG_BT_OBSERVER=y
Expand Down
1 change: 0 additions & 1 deletion samples/bluetooth/mesh/sensor_server/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ CONFIG_TEMP_NRF5=y

# Bluetooth configuration
CONFIG_BT=y
CONFIG_BT_COMPANY_ID=0x0059
CONFIG_BT_DEVICE_NAME="Mesh Sensor"
CONFIG_BT_L2CAP_TX_BUF_COUNT=8
CONFIG_BT_OBSERVER=y
Expand Down
3 changes: 1 addition & 2 deletions samples/bluetooth/nrf_dm/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#define CON_STATUS_LED DK_LED3
#define RUN_LED_BLINK_INTERVAL 1000

#define COMPANY_CODE 0x0059
#define SUPPORT_DM_CODE 0xFF55AA5A

struct adv_mfg_data {
Expand Down Expand Up @@ -316,7 +315,7 @@ static int bt_sync_init(void)

printk("DM Bluetooth LE Synchronization initialization\n");

mfg_data.company_code = sys_cpu_to_le16(COMPANY_CODE);
mfg_data.company_code = sys_cpu_to_le16(CONFIG_BT_COMPANY_ID_NORDIC);
mfg_data.support_dm_code = sys_cpu_to_le32(SUPPORT_DM_CODE);
mfg_data.rng_seed = sys_cpu_to_le32(peer_rng_seed_prepare());

Expand Down
1 change: 0 additions & 1 deletion samples/cellular/modem_shell/overlay-bt.conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ CONFIG_UART_2_NRF_HW_ASYNC=y
CONFIG_UART_2_NRF_HW_ASYNC_TIMER=2

CONFIG_BT=y
CONFIG_BT_COMPANY_ID=0x0059
CONFIG_BT_DEVICE_NAME="mosh"
CONFIG_BT_DEVICE_NAME_DYNAMIC=y

Expand Down
9 changes: 9 additions & 0 deletions subsys/bluetooth/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ menu "Bluetooth Low Energy"

if BT

config BT_COMPANY_ID_NORDIC
hex
# Will never change
default 0x0059

config BT_COMPANY_ID
hex
default BT_COMPANY_ID_NORDIC

# BT_MAX_CONN is declared in Zephyr, here we add the range and default for
# BT_LL_SOFTDEVICE which is tested with 20 connections.
# When both connection roles are enabled there has to be one for each role.
Expand Down

0 comments on commit f56190f

Please sign in to comment.