diff --git a/drivers/nble/gap.c b/drivers/nble/gap.c index 710d3c89acd..a3579ef7b57 100644 --- a/drivers/nble/gap.c +++ b/drivers/nble/gap.c @@ -146,7 +146,7 @@ static bool valid_adv_param(const struct bt_le_adv_param *param) } switch (param->addr_type) { - case BT_LE_ADV_ADDR_PUBLIC: + case BT_LE_ADV_ADDR_IDENTITY: case BT_LE_ADV_ADDR_NRPA: break; default: diff --git a/include/bluetooth/bluetooth.h b/include/bluetooth/bluetooth.h index 6345682c60e..b9f9b9550d5 100644 --- a/include/bluetooth/bluetooth.h +++ b/include/bluetooth/bluetooth.h @@ -90,8 +90,11 @@ struct bt_data { /** Local advertising address type */ enum { - /** Use local public address for advertising */ - BT_LE_ADV_ADDR_PUBLIC, + /** Use local identity address for advertising. Unless a static + * random address has been configured this will be the public + * address. + */ + BT_LE_ADV_ADDR_IDENTITY, /** Use local Non-resolvable Private Address (NRPA) for advertising */ BT_LE_ADV_ADDR_NRPA, @@ -127,7 +130,7 @@ struct bt_le_adv_param { .interval_max = (_int_max), \ }) -#define BT_LE_ADV(t) BT_LE_ADV_PARAM(t, BT_LE_ADV_ADDR_PUBLIC, \ +#define BT_LE_ADV(t) BT_LE_ADV_PARAM(t, BT_LE_ADV_ADDR_IDENTITY, \ BT_GAP_ADV_FAST_INT_MIN_2, \ BT_GAP_ADV_FAST_INT_MAX_2) diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 93dc0138911..f1ee29f53b1 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -2302,7 +2302,7 @@ static bool valid_adv_param(const struct bt_le_adv_param *param) } switch (param->addr_type) { - case BT_LE_ADV_ADDR_PUBLIC: + case BT_LE_ADV_ADDR_IDENTITY: case BT_LE_ADV_ADDR_NRPA: break; default: diff --git a/samples/bluetooth/shell/src/main.c b/samples/bluetooth/shell/src/main.c index f6cb8b5dc78..c6cbbb72a87 100644 --- a/samples/bluetooth/shell/src/main.c +++ b/samples/bluetooth/shell/src/main.c @@ -575,12 +575,12 @@ static void cmd_advertise(int argc, char *argv[]) if (!strcmp(argv[1], "on")) { param.type = BT_LE_ADV_IND; - param.addr_type = BT_LE_ADV_ADDR_PUBLIC; + param.addr_type = BT_LE_ADV_ADDR_IDENTITY; scan_rsp = sd; scan_rsp_len = ARRAY_SIZE(sd); } else if (!strcmp(argv[1], "scan")) { param.type = BT_LE_ADV_SCAN_IND; - param.addr_type = BT_LE_ADV_ADDR_PUBLIC; + param.addr_type = BT_LE_ADV_ADDR_IDENTITY; scan_rsp = sd; scan_rsp_len = ARRAY_SIZE(sd); } else if (!strcmp(argv[1], "nconn")) {