@@ -4431,6 +4431,24 @@ static void load_default_system_params(struct btd_adapter *adapter)
len += sizeof(params[i].u16);
}
+ if (main_opts.default_params.advmon_allowlist_scan_duration) {
+ params[i].entry.type = 0x001d;
+ params[i].entry.length = sizeof(params[i].u16);
+ params[i].u16 =
+ main_opts.default_params.advmon_allowlist_scan_duration;
+ ++i;
+ len += sizeof(params[i].u16);
+ }
+
+ if (main_opts.default_params.advmon_no_filter_scan_duration) {
+ params[i].entry.type = 0x001e;
+ params[i].entry.length = sizeof(params[i].u16);
+ params[i].u16 =
+ main_opts.default_params.advmon_no_filter_scan_duration;
+ ++i;
+ len += sizeof(params[i].u16);
+ }
+
err = mgmt_send(adapter->mgmt, MGMT_OP_SET_DEF_SYSTEM_CONFIG,
adapter->dev_id, len, params, NULL, NULL, NULL);
if (!err)
@@ -93,6 +93,9 @@ struct main_opts {
uint16_t le_conn_latency;
uint16_t le_conn_lsto;
uint16_t le_autoconnect_timeout;
+
+ uint16_t advmon_allowlist_scan_duration;
+ uint16_t advmon_no_filter_scan_duration;
} default_params;
@@ -123,6 +123,8 @@ static const char *controller_options[] = {
"LEConnectionLatency",
"LEConnectionSupervisionTimeout",
"LEAutoconnecttimeout",
+ "AdvMonAllowlistScanDuration",
+ "AdvMonNoFilterScanDuration",
NULL
};
@@ -434,6 +436,14 @@ static void parse_controller_config(GKeyFile *config)
&main_opts.default_params.le_autoconnect_timeout,
0x0001,
0x4000},
+ { "AdvMonAllowlistScanDuration",
+ &main_opts.default_params.advmon_allowlist_scan_duration,
+ 1,
+ 10000},
+ { "AdvMonNoFilterScanDuration",
+ &main_opts.default_params.advmon_no_filter_scan_duration,
+ 1,
+ 10000},
};
uint16_t i;
@@ -152,6 +152,13 @@
#LEConnectionSupervisionTimeout=
#LEAutoconnecttimeout=
+# Scan duration during interleaving scan. Only used when scanning for ADV
+# monitors. The units are msec.
+# Default: 300
+#AdvMonAllowlistScanDuration=
+# Default: 500
+#AdvMonNoFilterScanDuration=
+
[GATT]
# GATT attribute cache.
# Possible values: