summaryrefslogtreecommitdiff
path: root/client/advertising.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2018-05-07 18:52:26 +0300
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2018-05-24 11:09:30 +0300
commite8f51b980c197ca1c695f2d6cc0759dd3fab97a8 (patch)
tree801fc11b6f5620b0d8113ad2280b45f2132dfe5d /client/advertising.c
parent4f68e5f1fe89702e0fddb69b65ead76499f70d8a (diff)
downloadbluez-e8f51b980c197ca1c695f2d6cc0759dd3fab97a8.tar.gz
client: Print AD Data and Discoverable once registered
This prints both Data and Discoverable if advertise command succeeds: [bluetooth]# advertise.data 0x26 0x01 0x00 [bluetooth]# advertise.discoverable on [bluetooth]# advertise on Advertising object registered Data Type: 0x26 01 00 .. Tx Power: off Name: off Apperance: off Discoverable: on
Diffstat (limited to 'client/advertising.c')
-rw-r--r--client/advertising.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/client/advertising.c b/client/advertising.c
index cb0ca4a57..8abf4785b 100644
--- a/client/advertising.c
+++ b/client/advertising.c
@@ -164,6 +164,11 @@ static void print_ad(void)
ad.manufacturer.data.len);
}
+ if (ad.data.data.len) {
+ bt_shell_printf("Data Type: 0x%02x\n", ad.data.type);
+ bt_shell_hexdump(ad.data.data.data, ad.data.data.len);
+ }
+
bt_shell_printf("Tx Power: %s\n", ad.tx_power ? "on" : "off");
if (ad.local_name)
@@ -179,6 +184,8 @@ static void print_ad(void)
bt_shell_printf("Apperance: %s\n",
ad.appearance ? "on" : "off");
+ bt_shell_printf("Discoverable: %s\n", ad.discoverable ? "on": "off");
+
if (ad.duration)
bt_shell_printf("Duration: %u sec\n", ad.duration);