linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Bluez PATCH v2 0/5] Support advertising monitor add pattern with RSSI opcode
@ 2021-01-13  9:49 Archie Pusaka
  2021-01-13  9:49 ` [Bluez PATCH v2 1/5] lib/mgmt: Adding Add Adv Patterns Monitor " Archie Pusaka
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Archie Pusaka @ 2021-01-13  9:49 UTC (permalink / raw)
  To: linux-bluetooth, Luiz Augusto von Dentz; +Cc: CrosBT Upstreaming, Archie Pusaka

From: Archie Pusaka <apusaka@chromium.org>

Hi linux-bluetooth,

This series of patches adds a new MGMT command for adding a monitor
with RSSI parameter. Changes are focused on passing parameters to
the kernel via btmgmt and bluetoothctl.

PTAL and thanks for your feedback!
Archie

Changes in v2:
Remove trailing period and fix order of mgmt parameter

Archie Pusaka (5):
  lib/mgmt: Adding Add Adv Patterns Monitor RSSI opcode
  src/adv_monitor: add monitor with rssi support for mgmt
  btmgmt: advmon add rssi support
  bluetoothctl: advmon rssi support for mgmt
  monitor: Decode add advmon with RSSI parameter

 client/adv_monitor.c |  90 ++++++++++++------------
 client/adv_monitor.h |   1 +
 client/main.c        |  29 ++++----
 lib/mgmt.h           |  15 ++++
 monitor/packet.c     |  43 ++++++++++--
 src/adv_monitor.c    | 143 +++++++++++++++++++++++++++++---------
 tools/btmgmt.c       | 160 ++++++++++++++++++++++++++++++++++++-------
 7 files changed, 357 insertions(+), 124 deletions(-)

-- 
2.30.0.284.gd98b1dd5eaa7-goog


^ permalink raw reply	[flat|nested] 12+ messages in thread
* [Bluez PATCH v4 1/6] lib/mgmt: Adding Add Adv Patterns Monitor RSSI opcode
@ 2021-01-15 11:50 Archie Pusaka
  2021-01-15 12:22 ` Support advertising monitor add pattern with " bluez.test.bot
  0 siblings, 1 reply; 12+ messages in thread
From: Archie Pusaka @ 2021-01-15 11:50 UTC (permalink / raw)
  To: linux-bluetooth, Luiz Augusto von Dentz
  Cc: CrosBT Upstreaming, Archie Pusaka, Miao-chen Chou, Yun-Hao Chung,
	Manish Mandlik

From: Archie Pusaka <apusaka@chromium.org>

The new op is to utilize RSSI in advertisement monitor

Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
Reviewed-by: Yun-Hao Chung <howardchung@google.com>
Reviewed-by: Manish Mandlik <mmandlik@chromium.org>
---

(no changes since v2)

Changes in v2:
* Remove trailing period and fix order of mgmt parameter

 lib/mgmt.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/lib/mgmt.h b/lib/mgmt.h
index f37f7e6540..76a03c9c24 100644
--- a/lib/mgmt.h
+++ b/lib/mgmt.h
@@ -738,6 +738,21 @@ struct mgmt_rp_add_ext_adv_data {
 	uint8_t	instance;
 } __packed;
 
+struct mgmt_adv_rssi_thresholds {
+	int8_t   high_threshold;
+	uint16_t high_threshold_timeout;
+	int8_t   low_threshold;
+	uint16_t low_threshold_timeout;
+	uint8_t  sampling_period;
+} __packed;
+
+#define MGMT_OP_ADD_ADV_PATTERNS_MONITOR_RSSI	0x0056
+struct mgmt_cp_add_adv_patterns_monitor_rssi {
+	struct mgmt_adv_rssi_thresholds rssi;
+	uint8_t pattern_count;
+	struct mgmt_adv_pattern patterns[0];
+} __packed;
+
 #define MGMT_EV_CMD_COMPLETE		0x0001
 struct mgmt_ev_cmd_complete {
 	uint16_t opcode;
-- 
2.30.0.296.g2bfb1c46d8-goog


^ permalink raw reply related	[flat|nested] 12+ messages in thread
* [Bluez PATCH v3 1/5] lib/mgmt: Adding Add Adv Patterns Monitor RSSI opcode
@ 2021-01-14  7:44 Archie Pusaka
  2021-01-14  8:28 ` Support advertising monitor add pattern with " bluez.test.bot
  0 siblings, 1 reply; 12+ messages in thread
From: Archie Pusaka @ 2021-01-14  7:44 UTC (permalink / raw)
  To: linux-bluetooth, Luiz Augusto von Dentz
  Cc: CrosBT Upstreaming, Archie Pusaka, Miao-chen Chou, Yun-Hao Chung,
	Manish Mandlik

From: Archie Pusaka <apusaka@chromium.org>

The new op is to utilize RSSI in advertisement monitor

Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
Reviewed-by: Yun-Hao Chung <howardchung@google.com>
Reviewed-by: Manish Mandlik <mmandlik@chromium.org>
---

(no changes since v2)

Changes in v2:
* Remove trailing period and fix order of mgmt parameter

 lib/mgmt.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/lib/mgmt.h b/lib/mgmt.h
index f37f7e6540..76a03c9c24 100644
--- a/lib/mgmt.h
+++ b/lib/mgmt.h
@@ -738,6 +738,21 @@ struct mgmt_rp_add_ext_adv_data {
 	uint8_t	instance;
 } __packed;
 
+struct mgmt_adv_rssi_thresholds {
+	int8_t   high_threshold;
+	uint16_t high_threshold_timeout;
+	int8_t   low_threshold;
+	uint16_t low_threshold_timeout;
+	uint8_t  sampling_period;
+} __packed;
+
+#define MGMT_OP_ADD_ADV_PATTERNS_MONITOR_RSSI	0x0056
+struct mgmt_cp_add_adv_patterns_monitor_rssi {
+	struct mgmt_adv_rssi_thresholds rssi;
+	uint8_t pattern_count;
+	struct mgmt_adv_pattern patterns[0];
+} __packed;
+
 #define MGMT_EV_CMD_COMPLETE		0x0001
 struct mgmt_ev_cmd_complete {
 	uint16_t opcode;
-- 
2.30.0.284.gd98b1dd5eaa7-goog


^ permalink raw reply related	[flat|nested] 12+ messages in thread
* [Bluez PATCH v1 1/5] lib/mgmt: Adding Add Adv Patterns Monitor RSSI opcode.
@ 2021-01-13  9:25 Archie Pusaka
  2021-01-13  9:42 ` Support advertising monitor add pattern with " bluez.test.bot
  0 siblings, 1 reply; 12+ messages in thread
From: Archie Pusaka @ 2021-01-13  9:25 UTC (permalink / raw)
  To: linux-bluetooth, Luiz Augusto von Dentz
  Cc: CrosBT Upstreaming, Archie Pusaka, Miao-chen Chou, Yun-Hao Chung,
	Manish Mandlik

From: Archie Pusaka <apusaka@chromium.org>

The new op is to utilize RSSI in advertisement monitor

Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
Reviewed-by: Yun-Hao Chung <howardchung@google.com>
Reviewed-by: Manish Mandlik <mmandlik@chromium.org>
---

 lib/mgmt.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/lib/mgmt.h b/lib/mgmt.h
index f37f7e6540..1b8fcc0e10 100644
--- a/lib/mgmt.h
+++ b/lib/mgmt.h
@@ -738,6 +738,21 @@ struct mgmt_rp_add_ext_adv_data {
 	uint8_t	instance;
 } __packed;
 
+struct mgmt_adv_rssi_thresholds {
+	int8_t   high_threshold;
+	uint16_t high_threshold_timeout;
+	int8_t   low_threshold;
+	uint16_t low_threshold_timeout;
+	uint8_t  sampling_period;
+} __packed;
+
+#define MGMT_OP_ADD_ADV_PATTERNS_MONITOR_RSSI	0x0056
+struct mgmt_cp_add_adv_patterns_monitor_rssi {
+	uint8_t pattern_count;
+	struct mgmt_adv_rssi_thresholds rssi;
+	struct mgmt_adv_pattern patterns[0];
+} __packed;
+
 #define MGMT_EV_CMD_COMPLETE		0x0001
 struct mgmt_ev_cmd_complete {
 	uint16_t opcode;
-- 
2.30.0.284.gd98b1dd5eaa7-goog


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

end of thread, other threads:[~2021-01-15 12:23 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-13  9:49 [Bluez PATCH v2 0/5] Support advertising monitor add pattern with RSSI opcode Archie Pusaka
2021-01-13  9:49 ` [Bluez PATCH v2 1/5] lib/mgmt: Adding Add Adv Patterns Monitor " Archie Pusaka
2021-01-13 10:35   ` Support advertising monitor add pattern with " bluez.test.bot
2021-01-13  9:49 ` [Bluez PATCH v2 2/5] src/adv_monitor: add monitor with rssi support for mgmt Archie Pusaka
2021-01-13  9:49 ` [Bluez PATCH v2 3/5] btmgmt: advmon add rssi support Archie Pusaka
2021-01-13  9:49 ` [Bluez PATCH v2 4/5] bluetoothctl: advmon rssi support for mgmt Archie Pusaka
2021-01-13  9:49 ` [Bluez PATCH v2 5/5] monitor: Decode add advmon with RSSI parameter Archie Pusaka
2021-01-13 17:58 ` [Bluez PATCH v2 0/5] Support advertising monitor add pattern with RSSI opcode Luiz Augusto von Dentz
2021-01-14  7:48   ` Archie Pusaka
  -- strict thread matches above, loose matches on Subject: below --
2021-01-15 11:50 [Bluez PATCH v4 1/6] lib/mgmt: Adding Add Adv Patterns Monitor " Archie Pusaka
2021-01-15 12:22 ` Support advertising monitor add pattern with " bluez.test.bot
2021-01-14  7:44 [Bluez PATCH v3 1/5] lib/mgmt: Adding Add Adv Patterns Monitor " Archie Pusaka
2021-01-14  8:28 ` Support advertising monitor add pattern with " bluez.test.bot
2021-01-13  9:25 [Bluez PATCH v1 1/5] lib/mgmt: Adding Add Adv Patterns Monitor " Archie Pusaka
2021-01-13  9:42 ` Support advertising monitor add pattern with " bluez.test.bot

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).