diff --git a/nimble/host/mesh/include/mesh/glue.h b/nimble/host/mesh/include/mesh/glue.h index b1050d8c6..26ba98f2b 100644 --- a/nimble/host/mesh/include/mesh/glue.h +++ b/nimble/host/mesh/include/mesh/glue.h @@ -349,7 +349,7 @@ static inline unsigned int find_msb_set(u32_t op) /* Above flags are used with IS_ENABLED macro */ #define IS_ENABLED(config) MYNEWT_VAL(config) -#define CONFIG_BLUETOOTH_MESH_LPN_GROUPS MYNEWT_VAL(BLE_MESH_LPN_GROUPS) +#define CONFIG_BT_MESH_LPN_GROUPS MYNEWT_VAL(BLE_MESH_LPN_GROUPS) #define CONFIG_BT_MESH_ADV_BUF_COUNT MYNEWT_VAL(BLE_MESH_ADV_BUF_COUNT) #define CONFIG_BT_MESH_FRIEND_QUEUE_SIZE MYNEWT_VAL(BLE_MESH_FRIEND_QUEUE_SIZE) #define CONFIG_BT_MESH_FRIEND_RECV_WIN MYNEWT_VAL(BLE_MESH_FRIEND_RECV_WIN) diff --git a/nimble/host/mesh/src/glue.c b/nimble/host/mesh/src/glue.c index b93d9dbb9..15d8d9b2a 100644 --- a/nimble/host/mesh/src/glue.c +++ b/nimble/host/mesh/src/glue.c @@ -491,6 +491,22 @@ bt_le_adv_start(const struct ble_gap_adv_params *param, return err; } + if (sd) { + buf_len = 0; + + err = set_ad(sd, sd_len, buf, &buf_len); + if (err) { + BT_ERR("Advertising failed: err %d", err); + return err; + } + + err = ble_gap_adv_rsp_set_data(buf, buf_len); + if (err != 0) { + BT_ERR("Advertising failed: err %d", err); + return err; + } + } + err = ble_gap_adv_start(g_mesh_addr_type, NULL, BLE_HS_FOREVER, param, NULL, NULL); if (err) { diff --git a/nimble/host/mesh/src/lpn.c b/nimble/host/mesh/src/lpn.c index 165bc23b9..0cc462298 100644 --- a/nimble/host/mesh/src/lpn.c +++ b/nimble/host/mesh/src/lpn.c @@ -613,7 +613,7 @@ static void lpn_group_del(u16_t group) static inline int group_popcount(atomic_t *target) { -#if CONFIG_BLUETOOTH_MESH_LPN_GROUPS > 32 +#if CONFIG_BT_MESH_LPN_GROUPS > 32 int i, count = 0; for (i = 0; i < ARRAY_SIZE(bt_mesh.lpn.added); i++) { diff --git a/nimble/host/mesh/src/net.h b/nimble/host/mesh/src/net.h index 24940a648..5e11aa27b 100644 --- a/nimble/host/mesh/src/net.h +++ b/nimble/host/mesh/src/net.h @@ -121,7 +121,7 @@ struct bt_mesh_friend { }; #if (MYNEWT_VAL(BLE_MESH_LOW_POWER)) -#define LPN_GROUPS MYNEWT_VAL(BLE_MESH_LOW_POWER) +#define LPN_GROUPS CONFIG_BT_MESH_LPN_GROUPS #else #define LPN_GROUPS 0 #endif diff --git a/nimble/host/mesh/src/proxy.c b/nimble/host/mesh/src/proxy.c index 1fe531752..4ec2cbe35 100644 --- a/nimble/host/mesh/src/proxy.c +++ b/nimble/host/mesh/src/proxy.c @@ -81,13 +81,15 @@ ble_uuid16_t BT_UUID_MESH_PROXY_DATA_OUT = BLE_UUID16_INIT(0x2ade); #define CLIENT_BUF_SIZE 68 static const struct ble_gap_adv_params slow_adv_param = { - .conn_mode = (BLE_GAP_CONN_MODE_UND ), + .conn_mode = (BLE_GAP_CONN_MODE_UND), + .disc_mode = (BLE_GAP_DISC_MODE_GEN), .itvl_min = BT_GAP_ADV_SLOW_INT_MIN, .itvl_max = BT_GAP_ADV_SLOW_INT_MAX, }; static const struct ble_gap_adv_params fast_adv_param = { .conn_mode = (BLE_GAP_CONN_MODE_UND), + .disc_mode = (BLE_GAP_DISC_MODE_GEN), .itvl_min = BT_GAP_ADV_FAST_INT_MIN_2, .itvl_max = BT_GAP_ADV_FAST_INT_MAX_2, }; diff --git a/nimble/host/mesh/src/shell.c b/nimble/host/mesh/src/shell.c index 8a5cb38b6..03ea6dd70 100644 --- a/nimble/host/mesh/src/shell.c +++ b/nimble/host/mesh/src/shell.c @@ -65,7 +65,7 @@ static struct { static struct bt_mesh_cfg_srv cfg_srv = { .relay = BT_MESH_RELAY_DISABLED, - .beacon = BT_MESH_BEACON_DISABLED, + .beacon = BT_MESH_BEACON_ENABLED, #if MYNEWT_VAL(BLE_MESH_FRIEND) .frnd = BT_MESH_FRIEND_DISABLED, #else @@ -413,11 +413,11 @@ static struct bt_mesh_prov prov = { .reset = prov_reset, .static_val = NULL, .static_val_len = 0, - .output_size = 6, - .output_actions = (BT_MESH_DISPLAY_NUMBER | BT_MESH_DISPLAY_STRING), + .output_size = 4, + .output_actions = (BT_MESH_BLINK | BT_MESH_BEEP | BT_MESH_DISPLAY_NUMBER | BT_MESH_DISPLAY_STRING), .output_number = output_number, .output_string = output_string, - .input_size = 6, + .input_size = 4, .input_actions = (BT_MESH_ENTER_NUMBER | BT_MESH_ENTER_STRING), .input = input, };