Commit Bot submitted this change.
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.
(cherry picked from commit 74fb2e313e4ba1ba1fc5585906fa7c2c113cbcba)
BUG=b:152080234
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: I74e1995f1c4c1e2edba0f65c53a4b9cd121b1eab
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/bluez/+/2141528
Reviewed-by: Shyh-In Hwang <jose...@chromium.org>
Commit-Queue: Yun-Hao Chung <howar...@google.com>
Tested-by: Yun-Hao Chung <howar...@google.com>
---
M doc/advertising-api.txt
M src/advertising.c
M test/example-advertising-intervals
3 files changed, 113 insertions(+), 33 deletions(-)
To view, visit change 2141528. To unsubscribe, or for help writing mail filters, visit settings.