summaryrefslogtreecommitdiff
path: root/client/adv_monitor.h
diff options
context:
space:
mode:
authorHoward Chung <howardchung@google.com>2020-09-16 15:16:50 +0800
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2020-09-16 09:38:03 -0700
commit566db0ed69d1cabea83e76f843051b9eb6fb0777 (patch)
tree8c6ad9c32c380620edb18965f07e151a0fe78b49 /client/adv_monitor.h
parent664e10ff7ebf8dd9b132bd0a5c68f47ddbf561c7 (diff)
downloadbluez-566db0ed69d1cabea83e76f843051b9eb6fb0777.tar.gz
client: Implement more interfaces of ADV monitor in bluetoothctl
This patch creates a submenu in bluetoothctl and implements several commands. new commands: [bluetooth]# menu monitor [bluetooth]# add-or-pattern 1 2 ab0011 Advertisement Monitor 0 added [bluetooth]# add-or-pattern-rssi -80, ,5 1 2 aa 3 4 ff Advertisement Monitor 1 added [bluetooth]# get-pattern all Advertisement Monitor 0 path: /org/bluez/adv_monitor_app/0 type: or_patterns pattern 1: start position: 1 AD data type: 2 content: ab0011 Advertisement Monitor 1 path: /org/bluez/adv_monitor_app/1 type: or_patterns rssi: high threshold: -50 high threshold timer: 5 low threshold: -80 low threshold timer: 5 pattern 1: start position: 1 AD data type: 2 content: aa pattern 2: start position: 3 AD data type: 4 content: ff [bluetooth]# get-supported-info Supported Features: Supported Moniter Types: or_patterns [bluetooth]# remove-pattern 0 Monitor 0 deleted
Diffstat (limited to 'client/adv_monitor.h')
-rw-r--r--client/adv_monitor.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/client/adv_monitor.h b/client/adv_monitor.h
index 77b0b62c6..12c01bd3f 100644
--- a/client/adv_monitor.h
+++ b/client/adv_monitor.h
@@ -17,7 +17,17 @@
*
*/
+#define RSSI_DEFAULT_HIGH_THRESHOLD -50
+#define RSSI_DEFAULT_LOW_THRESHOLD -70
+#define RSSI_DEFAULT_HIGH_TIMEOUT 10
+#define RSSI_DEFAULT_LOW_TIMEOUT 5
+
void adv_monitor_add_manager(DBusConnection *conn, GDBusProxy *proxy);
void adv_monitor_remove_manager(DBusConnection *conn);
void adv_monitor_register_app(DBusConnection *conn);
void adv_monitor_unregister_app(DBusConnection *conn);
+void adv_monitor_add_monitor(DBusConnection *conn, char *type,
+ gboolean rssi_enabled, int argc, char *argv[]);
+void adv_monitor_print_monitor(DBusConnection *conn, int monitor_idx);
+void adv_monitor_remove_monitor(DBusConnection *conn, int monitor_idx);
+void adv_monitor_get_supported_info(void);