OSDN Git Service

client: main: add support for SetDiscoveryFilter
authorJakub Pawlowski <jpawlowski@google.com>
Tue, 28 Apr 2015 07:04:55 +0000 (00:04 -0700)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tue, 28 Apr 2015 07:43:14 +0000 (10:43 +0300)
commitd68ff945809b01a8d71967041717fba04ceba16d
tree7052a646408effb0fb547b8aef81499d43788ea4
parentb669604f43bbbf04ebaa66dd14ad9cfb005e561b
client: main: add support for SetDiscoveryFilter

This patch adds set-scan-filter-* commands to sample DBus client that
might be used to modify discovery filter.

set-scan-filter-uuids - sets filter uuids field
set-scan-filter-rssi - sets filter rssi and clears pathloss
set-scan-filter-pathloss - sets filter pathloss and clears rssi
set-scan-filter-transport - sets filter transport
set-scan-filter-clear - clears filter

Sample output:
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# set-scan-filter-uuids babe
SetDiscoveryFilter success
[bluetooth]# set-scan-filter-transport le
SetDiscoveryFilter success
[bluetooth]# set-scan-filter-rssi -69
SetDiscoveryFilter success
[bluetooth]# scan on
Discovery started
[CHG] Controller 00:1A:7D:DA:71:13 Discovering: yes
[CHG] Device 44:89:1C:C5:67:94 RSSI: -66
[CHG] Device 44:89:1C:C5:67:94 TxPower: -21
[CHG] Device 44:89:1C:C5:67:94 RSSI: -65
[CHG] Device 44:89:1C:C5:67:94 RSSI: -58
[CHG] Device 44:89:1C:C5:67:94 RSSI: -64
[CHG] Device 44:89:1C:C5:67:94 RSSI: -59
[CHG] Device 44:89:1C:C5:67:94 RSSI: -65
[CHG] Device 44:89:1C:C5:67:94 RSSI: -59
[CHG] Device 44:89:1C:C5:67:94 RSSI: -64
[bluetooth]# set-scan-filter-rssi -90
SetDiscoveryFilter success
[CHG] Device 44:89:1C:C5:67:94 RSSI: -76
[CHG] Device 44:89:1C:C5:67:94 RSSI: -82
[CHG] Device 44:89:1C:C5:67:94 RSSI: -75
[CHG] Device 44:89:1C:C5:67:94 RSSI: -81
[CHG] Device 44:89:1C:C5:67:94 RSSI: -76
[CHG] Device 44:89:1C:C5:67:94 RSSI: -76
[CHG] Device 44:89:1C:C5:67:94 RSSI: -81
[CHG] Device 44:89:1C:C5:67:94 RSSI: -75
[CHG] Device 44:89:1C:C5:67:94 RSSI: -82
[CHG] Device 44:89:1C:C5:67:94 RSSI: -82
[bluetooth]# scan off
[CHG] Device 44:89:1C:C5:67:94 TxPower is nil
[CHG] Device 44:89:1C:C5:67:94 RSSI is nil
Discovery stopped
[CHG] Controller 00:1A:7D:DA:71:13 Discovering: no
client/main.c