All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] monitor: Use black font for white background
@ 2015-05-28 22:13 Szymon Janc
  2015-05-28 22:13 ` [PATCH 2/2] monitor: Decode ATT Signed Write Command Szymon Janc
  2015-06-01 10:56 ` [PATCH 1/2] monitor: Use black font for white background Luiz Augusto von Dentz
  0 siblings, 2 replies; 3+ messages in thread
From: Szymon Janc @ 2015-05-28 22:13 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Szymon Janc

Make sure that font is always visible on white background.
---
 monitor/display.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/monitor/display.h b/monitor/display.h
index e627401..df08362 100644
--- a/monitor/display.h
+++ b/monitor/display.h
@@ -35,7 +35,7 @@ bool use_color(void);
 #define COLOR_MAGENTA	"\x1B[0;35m"
 #define COLOR_CYAN	"\x1B[0;36m"
 #define COLOR_WHITE	"\x1B[0;37m"
-#define COLOR_WHITE_BG	"\x1B[0;47m"
+#define COLOR_WHITE_BG	"\x1B[0;47;30m"
 #define COLOR_HIGHLIGHT	"\x1B[1;39m"
 
 #define COLOR_ERROR	"\x1B[1;31m"
-- 
1.9.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] monitor: Decode ATT Signed Write Command
  2015-05-28 22:13 [PATCH 1/2] monitor: Use black font for white background Szymon Janc
@ 2015-05-28 22:13 ` Szymon Janc
  2015-06-01 10:56 ` [PATCH 1/2] monitor: Use black font for white background Luiz Augusto von Dentz
  1 sibling, 0 replies; 3+ messages in thread
From: Szymon Janc @ 2015-05-28 22:13 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Szymon Janc

Signed Write Command data is as follow:
Attribute Handle (2 octets)
Data (0 or more octets)
Signature (12 octets).

> ACL Data RX: Handle 64 flags 0x02 dlen 20
      ATT: Signed Write Command (0xd2) len 15
        Handle: 0x001f
          Data: 00
          Signature: 00000000df559de6549e1757
---
 monitor/l2cap.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/monitor/l2cap.c b/monitor/l2cap.c
index 409f5f4..725a156 100644
--- a/monitor/l2cap.c
+++ b/monitor/l2cap.c
@@ -2319,6 +2319,13 @@ static void att_write_command(const struct l2cap_frame *frame)
 	print_hex_field("  Data", frame->data + 2, frame->size - 2);
 }
 
+static void att_signed_write_command(const struct l2cap_frame *frame)
+{
+	print_field("Handle: 0x%4.4x", get_le16(frame->data));
+	print_hex_field("  Data", frame->data + 2, frame->size - 2 - 12);
+	print_hex_field("  Signature", frame->data + frame->size - 12, 12);
+}
+
 struct att_opcode_data {
 	uint8_t opcode;
 	const char *str;
@@ -2380,7 +2387,7 @@ static const struct att_opcode_data att_opcode_table[] = {
 			att_handle_value_conf, 0, true },
 	{ 0x52, "Write Command",
 			att_write_command, 2, false },
-	{ 0xd2, "Signed Write Command"		},
+	{ 0xd2, "Signed Write Command", att_signed_write_command, 14, false },
 	{ }
 };
 
-- 
1.9.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] monitor: Use black font for white background
  2015-05-28 22:13 [PATCH 1/2] monitor: Use black font for white background Szymon Janc
  2015-05-28 22:13 ` [PATCH 2/2] monitor: Decode ATT Signed Write Command Szymon Janc
@ 2015-06-01 10:56 ` Luiz Augusto von Dentz
  1 sibling, 0 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2015-06-01 10:56 UTC (permalink / raw)
  To: Szymon Janc; +Cc: linux-bluetooth

Hi Szymon,

On Fri, May 29, 2015 at 1:13 AM, Szymon Janc <szymon.janc@tieto.com> wrote:
> Make sure that font is always visible on white background.
> ---
>  monitor/display.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/monitor/display.h b/monitor/display.h
> index e627401..df08362 100644
> --- a/monitor/display.h
> +++ b/monitor/display.h
> @@ -35,7 +35,7 @@ bool use_color(void);
>  #define COLOR_MAGENTA  "\x1B[0;35m"
>  #define COLOR_CYAN     "\x1B[0;36m"
>  #define COLOR_WHITE    "\x1B[0;37m"
> -#define COLOR_WHITE_BG "\x1B[0;47m"
> +#define COLOR_WHITE_BG "\x1B[0;47;30m"
>  #define COLOR_HIGHLIGHT        "\x1B[1;39m"
>
>  #define COLOR_ERROR    "\x1B[1;31m"
> --
> 1.9.3

Applied, thanks/


-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-06-01 10:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-28 22:13 [PATCH 1/2] monitor: Use black font for white background Szymon Janc
2015-05-28 22:13 ` [PATCH 2/2] monitor: Decode ATT Signed Write Command Szymon Janc
2015-06-01 10:56 ` [PATCH 1/2] monitor: Use black font for white background Luiz Augusto von Dentz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.