From f062b128db46407ee9393c2cb05de125e29bb210 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Wed, 9 Nov 2011 12:57:00 +0200 Subject: [PATCH] mgmt: Add LE public/random info to address types --- doc/mgmt-api.txt | 28 ++++++++++++++++++++-------- lib/mgmt.h | 4 ++-- mgmt/main.c | 8 ++++---- 3 files changed, 26 insertions(+), 14 deletions(-) diff --git a/doc/mgmt-api.txt b/doc/mgmt-api.txt index e061fdac6..cf7ef831a 100644 --- a/doc/mgmt-api.txt +++ b/doc/mgmt-api.txt @@ -350,10 +350,18 @@ Start Discovery Command Command Parameters: Type (1 Octet) Return Parameters: - Possible values for the Type parameter: - 0 BR/EDR - 1 LE - 2 BR/EDR/LE (interleaved discovery) + Possible values for the Type parameter are a bit-wise or of the + following bits: + + 1 BR/EDR + 2 LE Public + 3 LE Random + + By combining these e.g. the following values are possible: + + 1 BR/EDR + 6 LE (public & random) + 7 BR/EDR/LE (interleaved discovery) Stop Discovery Command @@ -575,7 +583,8 @@ Event Parameters Address (6 Octets) Possible values for the Type parameter: 0 BR/EDR - 1 LE + 1 LE Public + 2 LE Random Device Disconnected Event @@ -588,7 +597,8 @@ Event Parameters Address (6 Octets) Possible values for the Type parameter: 0 BR/EDR - 1 LE + 1 LE Public + 2 LE Random Connect Failed Event @@ -602,7 +612,8 @@ Event Parameters Address (6 Octets) Possible values for the Type parameter: 0 BR/EDR - 1 LE + 1 LE Public + 2 LE Random PIN Code Request Event ====================== @@ -664,7 +675,8 @@ Event Parameters Address (6 Octets) Possible values for the Type parameter: 0 BR/EDR - 1 LE + 1 LE Public + 2 LE Random Remote Name Event diff --git a/lib/mgmt.h b/lib/mgmt.h index 3b3a71c3b..88118182f 100644 --- a/lib/mgmt.h +++ b/lib/mgmt.h @@ -139,8 +139,8 @@ struct mgmt_rp_disconnect { } __packed; #define MGMT_ADDR_BREDR 0x00 -#define MGMT_ADDR_LE 0x01 -#define MGMT_ADDR_BREDR_LE 0x02 +#define MGMT_ADDR_LE_PUBLIC 0x01 +#define MGMT_ADDR_LE_RANDOM 0x02 #define MGMT_ADDR_INVALID 0xff struct mgmt_addr_info { diff --git a/mgmt/main.c b/mgmt/main.c index f0eba5c20..500827c25 100644 --- a/mgmt/main.c +++ b/mgmt/main.c @@ -339,11 +339,11 @@ static void type2str(uint8_t type, char *str, size_t len) case MGMT_ADDR_BREDR: strncpy(str, "BR/EDR", len); break; - case MGMT_ADDR_LE: - strncpy(str, "LE", len); + case MGMT_ADDR_LE_PUBLIC + strncpy(str, "LE Public", len); break; - case MGMT_ADDR_BREDR_LE: - strncpy(str, "BR/EDR/LE", len); + case MGMT_ADDR_LE_RANDOM: + strncpy(str, "LE Random", len); break; default: strncpy(str, "(unknown)", len); -- 2.47.3