linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Szymon Janc <szymon.janc@codecoup.pl>
To: linux-bluetooth@vger.kernel.org
Cc: Szymon Janc <szymon.janc@codecoup.pl>
Subject: [PATCH v2 5/5] monitor: Add support for Set Appearance mgmt command
Date: Sun, 18 Sep 2016 12:34:41 +0200	[thread overview]
Message-ID: <1474194881-10403-5-git-send-email-szymon.janc@codecoup.pl> (raw)
In-Reply-To: <1474194881-10403-1-git-send-email-szymon.janc@codecoup.pl>

@ MGMT Command: Set Appearance (0x0043) plen 2         {0x0002}
        Appearance: (0x1234)
@ MGMT Event: Command Complete (0x0001) plen 3         {0x0002}
      Set Appearance (0x0043) plen 0
        Status: Success (0x00)
---
 monitor/packet.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/monitor/packet.c b/monitor/packet.c
index f5d6f96..1b68d1b 100644
--- a/monitor/packet.c
+++ b/monitor/packet.c
@@ -10755,6 +10755,13 @@ static void mgmt_read_ext_controller_info_rsp(const void *data, uint16_t size)
 	print_eir(data + 19, size - 19, false);
 }
 
+static void mgmt_set_apperance_cmd(const void *data, uint16_t size)
+{
+	uint16_t appearance = get_le16(data);
+
+	print_field("Appearance: (0x%2.2x)", appearance);
+}
+
 struct mgmt_data {
 	uint16_t opcode;
 	const char *str;
@@ -10965,6 +10972,9 @@ static const struct mgmt_data mgmt_command_table[] = {
 	{ 0x0042, "Read Extended Controller Information",
 				mgmt_null_cmd, 0, true,
 				mgmt_read_ext_controller_info_rsp, 19, false },
+	{ 0x0043, "Set Appearance",
+				mgmt_set_apperance_cmd, 2, true,
+				mgmt_null_rsp, 0, true },
 	{ }
 };
 
-- 
2.7.4


      parent reply	other threads:[~2016-09-18 10:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-18 10:34 [PATCH v2 1/5] doc/mgmt-api: Add Set Appearance command specification Szymon Janc
2016-09-18 10:34 ` [PATCH v2 2/5] lib/mgmt: Add Set Appearance command definition Szymon Janc
2016-09-18 10:34 ` [PATCH v2 3/5] tools/btmgmt: Add support for scan rsp flags in add advertising Szymon Janc
2016-09-18 10:34 ` [PATCH v2 4/5] tools/btmgmt: Add support for Set Appearance command Szymon Janc
2016-09-18 10:34 ` Szymon Janc [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1474194881-10403-5-git-send-email-szymon.janc@codecoup.pl \
    --to=szymon.janc@codecoup.pl \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).