CHROMIUM: supports a new dbus method ResetAdvertising
This patch supports a new dbus method ResetAdvertising which
removes all existing advertisements and resets the advertising
intervals to default. Note that advertising would be disabled
when the last advertisement is removed.
CQ-DEPEND=CL:390172
BUG=chromium:602461
TEST=Perform the following steps on a DUT.
On a terminal, use btmon to monitor the logs.
$ btmon
On another terminal, execute the following steps:
1. Copy example-advertisement to the DUT, and
run the command on the DUT.
$ ./example-advertisement &
2. Copy example-advertising-intervals to the DUT and
run the command on the DUT.
$ ./example-advertising-intervals --set 200 200
3. On another machine, use hcitool to observe advertising packets of the DUT.
$ sudo hcitool lescan
4. Reset advertising on the DUT.
$ ./example-advertising-intervals --reset
Observe that advertisements are removed in the btmon log and
advertising is disabled.
Change-Id: I46d92b90763af3260355ba237165b6be3ad29e94
Reviewed-on: https://chromium-review.googlesource.com/390191
Commit-Ready: Shyh-In Hwang <josephsih@chromium.org>
Tested-by: Shyh-In Hwang <josephsih@chromium.org>
Tested-by: Miao-chen Chou <mcchou@chromium.org>
Reviewed-by: Rahul Chaturvedi <rkc@chromium.org>
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
3 files changed