Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PW_SID:569881] Add Advertisement Monitor Device Found/Lost events #1052

Closed
wants to merge 4 commits into from

Conversation

BluezTestBot
Copy link
Owner

Hello Bt-Maintainers,

Bluetooth Advertisement Monitor API was introduced to support background
scanning and proximity detection based on the application specified RSSI
thresholds and content filters on LE advertisement packets.

To optimize the power consumption, the API offloads the content
filtering and RSSI tracking to the controller if the controller
offloading support is available. However, this monitoring is not
completely offloaded as the bluetoothd also handles RSSI thresholds and
timeouts in order to fulfill high/low thresholds/timeouts filtering with
D-bus clients.

There is further room to achieve better power optimization by supporting
the controller event HCI_VS_MSFT_LE_Monitor_Device_Event to fulfill true
monitor offloading. This is currently not supported as it was originally
desired to minimize the changes to the MGMT interface and reuse the
existing MGMT event - MGMT_EV_DEVICE_FOUND to pass advertisements to
bluetoothd and let bluetoothd handle the RSSI thresholds and timeouts in
order to fulfill the D-bus API requirements for the client.

This patch series introduces MGMT event MGMT_EV_ADV_MONITOR_DEVICE_FOUND
and MGMT_EV_ADV_MONITOR_DEVICE_LOST to indicate that the controller has
started/stopped monitoring a particular device.

Please let me know what you think about this or if you have any further
questions.

Thanks,
Manish.

Changes in v4:

  • Add Advertisement Monitor Device Found event, make Address_Type 0 as
    reserved.
  • Add Advertisement Monitor Device Found event.
  • Add Advertisement Monitor Device Found event.

Changes in v3:

  • Discard changes to the Device Found event and notify bluetoothd only
    when the controller stops monitoring the device via new Device Lost
    event.
  • Discard changes to the Device Found event and notify bluetoothd only
    when the controller stops monitoring the device via new Device Lost
    event.
  • Fix indentation of the adv_monitor_device_lost_callback() name and
    it's arguments.

Changes in v2:

  • Instead of creating a new 'Device Tracking' event, add a flag 'Device
    Tracked' in the existing 'Device Found' event and add a new 'Device
    Lost' event to indicate that the controller has stopped tracking that
    device.
  • Instead of creating a new 'Device Tracking' event, add a flag 'Device
    Tracked' in the existing 'Device Found' event and add a new 'Device
    Lost' event to indicate that the controller has stopped tracking that
    device.
  • Update function name adv_monitor_tracking_callback() to
    adv_monitor_device_lost_callback() as it will receive only Device Lost
    event.

Manish Mandlik (3):
doc: Introduce the Adv Monitor Device Found/Lost events
lib: Add definitions of the Adv Monitor Device Found/Lost events
adv_monitor: Receive the Device Found/Lost events

doc/mgmt-api.txt | 50 ++++++++++++++++++++++++++++++++++++++++++++++-
lib/mgmt.h | 14 +++++++++++++
src/adv_monitor.c | 50 +++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 113 insertions(+), 1 deletion(-)

tedd-an and others added 4 commits October 25, 2021 18:28
This patch adds workflow files for ci:

[schedule_work.yml]
  - runs every 30 mins.
  - sync repo with upstream repo and rebase workflow branch to tip of
    master.
  - creates PR after reading patches from patchwork.kernel.org

[ci.yml]
  - Tests the following checks:
    - checkpatch
    - gitlint
    - make
    - make check

[code_scan.yml]
    - Static code checker: Coverity and Clang
    - Coverity: Submit the result to the coverity website
    - Clang Code Scan: Send email with result file to the internal team

To simplify the history, new change will amend to this patch without
creating new patch.
This patch introduces new MGMT events to indicate that the controller
has started/stopped tracking a particular device matching one of the
already added Advertisement Monitor.
This patch adds definitions of the new Advertisement Monitor Device
Found and Device Lost events to indicate that the controller has
started/stopped tracking a particular device.
This patch registers callback finctions to receive the Advertisement
Monitor Device Found and Device Lost events.

Test performed:
- verified by logs that the MSFT Monitor Device is received from the
  controller and the bluetoothd is notified whenever the controller
  starts/stops monitoring a device.
@BluezTestBot
Copy link
Owner Author

CheckPatch
Test ID: checkpatch
Desc: Run checkpatch.pl script with rule in .checkpatch.conf
Duration: 4.39 seconds
Result: PASS

@BluezTestBot
Copy link
Owner Author

GitLint
Test ID: gitlint
Desc: Run gitlint with rule in .gitlint
Duration: 2.90 seconds
Result: PASS

@BluezTestBot
Copy link
Owner Author

Prep - Setup ELL
Test ID: setupell
Desc: Clone, build, and install ELL
Duration: 52.11 seconds
Result: PASS

@BluezTestBot
Copy link
Owner Author

Build - Prep
Test ID: buildprep
Desc: Prepare environment for build
Duration: 0.54 seconds
Result: PASS

@BluezTestBot
Copy link
Owner Author

Build - Configure
Test ID: build
Desc: Configure the BlueZ source tree
Duration: 9.39 seconds
Result: PASS

@BluezTestBot
Copy link
Owner Author

Build - Make
Test ID: buildmake
Desc: Build the BlueZ source tree
Duration: 225.67 seconds
Result: PASS

@BluezTestBot
Copy link
Owner Author

Make Check
Test ID: makecheck
Desc: Run 'make check'
Duration: 9.84 seconds
Result: PASS

@BluezTestBot
Copy link
Owner Author

Make Distcheck
Test ID: makedistcheck
Desc: Run distcheck to check the distribution
Duration: 266.48 seconds
Result: PASS

@BluezTestBot
Copy link
Owner Author

Build w/ext ELL - Configure
Test ID: build_extell
Desc: Configure BlueZ source with '--enable-external-ell' configuration
Duration: 9.65 seconds
Result: PASS

@BluezTestBot
Copy link
Owner Author

Build w/ext ELL - Make
Test ID: build_extell_make
Desc: Build BlueZ source with '--enable-external-ell' configuration
Duration: 214.45 seconds
Result: PASS

@github-actions github-actions bot force-pushed the workflow branch 3 times, most recently from 42a749b to a55d828 Compare October 26, 2021 20:43
@github-actions github-actions bot force-pushed the workflow branch 2 times, most recently from 98f0f5f to 6479aae Compare November 4, 2021 02:17
@BluezTestBot BluezTestBot deleted the 569881 branch November 4, 2021 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants