Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH 1/2] Fix time intervals dumping of LE commands.
@ 2011-01-24 19:32 André Dieb Martins
  2011-01-24 19:32 ` [PATCH 2/2] Implement dumping for evnet LE Connection Update Complete André Dieb Martins
  0 siblings, 1 reply; 3+ messages in thread
From: André Dieb Martins @ 2011-01-24 19:32 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: André Dieb Martins

Add missing btohs() convertions and spec. constants for converting time
intervals for LE Set Scan Parameters and LE Set Advertising Parameters.
---
 parser/hci.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/parser/hci.c b/parser/hci.c
index d9bac9b..41a19b4 100644
--- a/parser/hci.c
+++ b/parser/hci.c
@@ -1582,7 +1582,8 @@ static inline void le_set_advertising_parameters_dump(int level, struct frame *f
 	le_set_advertising_parameters_cp *cp = frm->ptr;
 
 	p_indent(level, frm);
-	printf("min 0x%04xms max 0x%04xms\n", cp->min_interval, cp->max_interval);
+	printf("min %.3fms, max %.3fms\n", btohs(cp->min_interval) * 0.625,
+			btohs(cp->max_interval) * 0.625);
 
 	p_indent(level, frm);
 	printf("type 0x%02x (%s) ownbdaddr 0x%02x (%s)\n", cp->advtype,
@@ -1608,7 +1609,8 @@ static inline void le_set_scan_parameters_dump(int level, struct frame *frm)
 		cp->type == 0x00 ? "passive" : "active");
 
 	p_indent(level, frm);
-	printf("interval %04xms window %04xms\n", cp->interval, cp->window);
+	printf("interval %.3fms window %.3fms\n", btohs(cp->interval) * 0.625,
+		btohs(cp->window) * 0.625);
 
 	p_indent(level, frm);
 	printf("own address: 0x%02x (%s) policy: %s\n", cp->own_bdaddr_type,
-- 
1.7.1


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

* [PATCH 2/2] Implement dumping for evnet LE Connection Update Complete.
  2011-01-24 19:32 [PATCH 1/2] Fix time intervals dumping of LE commands André Dieb Martins
@ 2011-01-24 19:32 ` André Dieb Martins
  2011-01-31  8:36   ` Johan Hedberg
  0 siblings, 1 reply; 3+ messages in thread
From: André Dieb Martins @ 2011-01-24 19:32 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: André Dieb Martins

---
 parser/hci.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/parser/hci.c b/parser/hci.c
index 41a19b4..64c3b0c 100644
--- a/parser/hci.c
+++ b/parser/hci.c
@@ -3532,6 +3532,19 @@ static inline void evt_le_advertising_report_dump(int level, struct frame *frm)
 	}
 }
 
+static inline void evt_le_conn_update_complete_dump(int level, struct frame *frm)
+{
+	evt_le_connection_update_complete *uevt = frm->ptr;
+
+	p_indent(level, frm);
+	printf("status 0x%2.2x handle %d\n", uevt->status, btohs(uevt->handle));
+
+	p_indent(level, frm);
+	printf("interval %.2fms, latency %.2fms, superv. timeout %.2fms\n",
+			btohs(uevt->interval) * 1.25, btohs(uevt->latency) * 1.25,
+			btohs(uevt->supervision_timeout) * 10.0);
+}
+
 static inline void le_meta_ev_dump(int level, struct frame *frm)
 {
 	evt_le_meta_event *mevt = frm->ptr;
@@ -3552,6 +3565,9 @@ static inline void le_meta_ev_dump(int level, struct frame *frm)
 	case EVT_LE_ADVERTISING_REPORT:
 		evt_le_advertising_report_dump(level + 1, frm);
 		break;
+	case EVT_LE_CONN_UPDATE_COMPLETE:
+		evt_le_conn_update_complete_dump(level + 1, frm);
+		break;
 	default:
 		raw_dump(level, frm);
 		break;
-- 
1.7.1


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

* Re: [PATCH 2/2] Implement dumping for evnet LE Connection Update Complete.
  2011-01-24 19:32 ` [PATCH 2/2] Implement dumping for evnet LE Connection Update Complete André Dieb Martins
@ 2011-01-31  8:36   ` Johan Hedberg
  0 siblings, 0 replies; 3+ messages in thread
From: Johan Hedberg @ 2011-01-31  8:36 UTC (permalink / raw)
  To: André Dieb Martins; +Cc: linux-bluetooth

Hi André

On Mon, Jan 24, 2011, André Dieb Martins wrote:
> ---
>  parser/hci.c |   16 ++++++++++++++++
>  1 files changed, 16 insertions(+), 0 deletions(-)

Both patches have been pushed upstream. Thanks.

Johan

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

end of thread, other threads:[~2011-01-31  8:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-24 19:32 [PATCH 1/2] Fix time intervals dumping of LE commands André Dieb Martins
2011-01-24 19:32 ` [PATCH 2/2] Implement dumping for evnet LE Connection Update Complete André Dieb Martins
2011-01-31  8:36   ` Johan Hedberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox