client: Implement more interfaces of ADV monitor in bluetoothctl
authorHoward Chung <howardchung@google.com>
Wed, 16 Sep 2020 07:16:50 +0000 (15:16 +0800)
committerAyush Garg <ayush.garg@samsung.com>
Fri, 11 Mar 2022 13:38:32 +0000 (19:08 +0530)
commit414322de8f32cf59cb3f17281d717ce9ed9a4c2b
tree9bb130d1c3a54de21a12172cb765c7e37a91f706
parent04226fbba02cbf0e31899e5fba791f2b3aca0fb2
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

Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
client/adv_monitor.c
client/adv_monitor.h
client/main.c