diff mbox series

[BlueZ,v6,6/6] core: Update default advmon Sampling_Period to 0xFF

Message ID 20211120072449.BlueZ.v6.6.I363090b80e59a3cda134c9bd2df0b3bca2cb527b@changeid (mailing list archive)
State Accepted
Delegated to: Luiz Von Dentz
Headers show
Series [BlueZ,v6,1/6] doc: Introduce the Adv Monitor Device Found/Lost events | expand

Checks

Context Check Description
tedd_an/checkpatch success Checkpatch PASS
tedd_an/gitlint success Gitlint PASS

Commit Message

Manish Mandlik Nov. 20, 2021, 3:29 p.m. UTC
Update default Advertisemet Monitor Sampling_Period to 0xFF. It
indicates that controller will report only one advertisement per
monitoring period for a device. This will help reduce the power
consumption drastically.

Reviewed-by: Miao-chen Chou <mcchou@google.com>
---

Changes in v6:
- Update information about the value range and units.
- Update commented entry to use the default value

Changes in v5:
- New patch in the series. Update default Sampling_Period to 0xFF.

 src/main.c    | 2 +-
 src/main.conf | 8 ++++++--
 2 files changed, 7 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/src/main.c b/src/main.c
index 5ca8d5644..1f852fdf6 100644
--- a/src/main.c
+++ b/src/main.c
@@ -932,7 +932,7 @@  static void init_defaults(void)
 	btd_opts.avdtp.session_mode = BT_IO_MODE_BASIC;
 	btd_opts.avdtp.stream_mode = BT_IO_MODE_BASIC;
 
-	btd_opts.advmon.rssi_sampling_period = 0;
+	btd_opts.advmon.rssi_sampling_period = 0xFF;
 }
 
 static void log_handler(const gchar *log_domain, GLogLevelFlags log_level,
diff --git a/src/main.conf b/src/main.conf
index e05291d8e..17795a847 100644
--- a/src/main.conf
+++ b/src/main.conf
@@ -260,5 +260,9 @@ 
 [AdvMon]
 # Default RSSI Sampling Period. This is used when a client registers an
 # advertisement monitor and leaves the RSSISamplingPeriod unset.
-# Default: 0
-#RSSISamplingPeriod=0
+# Possible values:
+# 0x00       Report all advertisements
+# N = 0xXX   Report advertisements every N x 100 msec (range: 0x01 to 0xFE)
+# 0xFF       Report only one advertisement per device during monitoring period
+# Default: 0xFF
+#RSSISamplingPeriod=0xFF