@@ -200,7 +200,7 @@ static const char *settings_str[] = {
"powered", "connectable", "fast-connectable", "discoverable",
"bondable", "link-security", "ssp", "br/edr", "hs", "le",
"advertising", "secure-conn", "debug-keys", "privacy",
- "configuration", "static-addr", "phy", "wbs"
+ "configuration", "static-addr", "phy", "wbs" "advertising-intervals",
};
static void mgmt_new_settings(uint16_t len, const void *buf)
@@ -11669,6 +11669,7 @@ static const struct bitfield_data mgmt_settings_table[] = {
{ 15, "Static Address" },
{ 16, "PHY Configuration" },
{ 17, "Wideband Speech" },
+ { 18, "Advertising Intervals" },
{ }
};
@@ -12988,6 +12989,23 @@ static void mgmt_set_phy_cmd(const void *data, uint16_t size)
mgmt_print_phys("Selected PHYs", selected_phys);
}
+static void mgmt_set_adv_interval_cmd(const void *data, uint16_t size)
+{
+ uint16_t min_adv_interval = get_le16(data);
+ uint16_t max_adv_interval = get_le16(data+2);
+
+ print_field("Min advertising interval: 0x%4.4x", min_adv_interval);
+ print_field("Max advertising interval: 0x%4.4x", max_adv_interval);
+}
+
+static void mgmt_set_adv_interval_rsp(const void *data, uint16_t size)
+{
+ uint32_t current_settings = get_le32(data);
+
+ print_field("Current settings: 0x%8.8x", current_settings);
+}
+
+
struct mgmt_data {
uint16_t opcode;
const char *str;
@@ -13207,6 +13225,9 @@ static const struct mgmt_data mgmt_command_table[] = {
{ 0x0045, "Set PHY Configuration",
mgmt_set_phy_cmd, 4, true,
mgmt_null_rsp, 0, true },
+ { 0x0060, "LE Set Advertising Interval",
+ mgmt_set_adv_interval_cmd, 4, true,
+ mgmt_set_adv_interval_rsp, 4, true},
{ }
};
The following lines will show in btmon: bluetoothd: Set Advertising Intervals: 0x0140, 0x0280 @ MGMT Command: LE Set Advertising Interval (0x0060) plen 4 Min advertising interval: 0x0140 Max advertising interval: 0x0280 @ MGMT Event: Command Complete (0x0001) plen 7 LE Set Advertising Interval (0x0060) plen 4 Status: Success (0x00) Current settings: 0x00040ad0 Signed-off-by: Howard Chung <howardchung@google.com> --- Changes in v2: None monitor/control.c | 2 +- monitor/packet.c | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-)