Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp4277331pxb; Mon, 27 Sep 2021 13:17:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyUwAWcSL5E5LWelJYFwWNUqVScIYF7kEQPvSWStN4i1oRQmWgCDIDprnYhCP1Os+4Up+BK X-Received: by 2002:a17:90a:430f:: with SMTP id q15mr1088474pjg.2.1632773869060; Mon, 27 Sep 2021 13:17:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632773869; cv=none; d=google.com; s=arc-20160816; b=Z4SrI8CMdkENZdM0lpW8h+DrQ+iCwBuuWF6ljMGgokLTF52zNXl8oDSU3MC3Hdvn6h DEpKT+20Mov7WS2W2VoicHqCI/Z/2cYrQBYwFZA6NQVbzN9Nst4CGWPMAsX/1IG+O4N6 xAPm/SJxMpfDH3y34spfwE1GULc3TnNO3tnenlHRb1+xMHLkeGiwmLKROQZfelrBi+nx bpIzjJx0hFWKdTfVBv/sBfmFxtrhu7ev2jlegm+fxkFQr0r9qCoPG9Jf4s4nx1AfdjhT Rb7etTXezkI79N+EkrSZf/dvwo9hUDG3iWgTR8VHMZWk9XjAjpxkJ6BJ582VD+dN0Q9O zRQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:mime-version:message-id:date :dkim-signature; bh=TcaDOnxPmb6Y+ucxYBcxC9sihD6ypsDrKfc5R4obwRk=; b=dEDD4+75Lb/gA4K+4guIIJ0qUfS/NXhowCI8I0oeR18UPUp4YuLWPE/Txo0t9AS8sd KrSzuGIFX56Y79jGEsJ6sCjdJHyMOn+NdjqxpH9/TuUdQdhhVQwDAfjoER35RLK9Wp9W Mxb+YHR6YNe0n5pcSJTWejTt/fEG2AJZrS+tPocvV1E67m2xuZN9lc3BQSbTOo0rQkWV qs/VNWFf1o5l1GlGo6qIQCeFZBSZrWPRNgS2jThIHRomliJiGLrwDA97hHHrWO5RNNEm Mzm+oAO2gw7A3ZHOG7TY0yHt/ykCKoz1+cyRDUp9WgIct01Vznn2QE3J2iXrPgU4Mkp4 fZPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=n+XfXLCV; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u7si3196733pgf.415.2021.09.27.13.17.34; Mon, 27 Sep 2021 13:17:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=n+XfXLCV; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236779AbhI0USm (ORCPT + 99 others); Mon, 27 Sep 2021 16:18:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236763AbhI0USm (ORCPT ); Mon, 27 Sep 2021 16:18:42 -0400 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBA5CC061575 for ; Mon, 27 Sep 2021 13:17:03 -0700 (PDT) Received: by mail-yb1-xb4a.google.com with SMTP id b9-20020a5b07890000b0290558245b7eabso17578996ybq.10 for ; Mon, 27 Sep 2021 13:17:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:message-id:mime-version:subject:from:to:cc; bh=TcaDOnxPmb6Y+ucxYBcxC9sihD6ypsDrKfc5R4obwRk=; b=n+XfXLCVLxvjybdE5qklGTtlwHH+U+fKxx+P9771mSLPxiEof1aSitwqbAbDJJUb5G sbyouoywwyZSG568VVdgBIwK6gAT4HTVTMRJbfitbMWscAjnFHWrr6HlpRL6umgezYkV uaWPObIOfLGo0nGbfqhjyaeyUK3J1Xlss/Zz/+BrkLreKqHed4vewFfU3w9t4TKbhehP L7UOdy39H24FombNErDJ+99NZKwnBqGpCl44QVULmodmg1VNemMFXXcxF8dxSDWa3Yxg BsopEw0tIp7SHMPAhJEcewm5IANLTkKXwgfBbWT04WHegiSfHJOw+yjXsXWjnCe96YHy MqAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=TcaDOnxPmb6Y+ucxYBcxC9sihD6ypsDrKfc5R4obwRk=; b=VNFmy0NVecihV9U13Xdbci++aRL23MZ9vrSW2cbmnaorTK09YFVFlZT9eIJlIkn0bq oEPllVZV4l1aj/j4zxGMyGqlPwAe5dpgEmCTw+YFc4Ppn8LjwZHxerWGokItScX8Xj11 hi/wG0w+LqVRefq1UjB57ZOFpMbMaZ76XHCMdlJH/3L5BBZmPfhNXImrPZ1ZBW+JxRev S0FbjQfqQ0IvwwkpRWE0sWnMyNl28LpWugVJQNfBwWW9F6SDHn0ECxCuNlDUc7dhyk3F VOXhPX72iWC0PgaSzpitHB5EnSsXhEj16bBsrsRCt8DXWjp6ZT6LgMdHm+GJYIAZc5ld x2NQ== X-Gm-Message-State: AOAM531krNQ76ED5dElmgEHEoZPUYzCmONsD2f1o05RhW/ZoUa7XIa+o vozjLvhwbtbZdrjmbmYwVLMLhOv3udcmXA== X-Received: from mmandlik.mtv.corp.google.com ([2620:15c:202:201:8f29:89eb:dfbc:3b00]) (user=mmandlik job=sendgmr) by 2002:a5b:34e:: with SMTP id q14mr2171438ybp.42.1632773823084; Mon, 27 Sep 2021 13:17:03 -0700 (PDT) Date: Mon, 27 Sep 2021 13:16:54 -0700 Message-Id: <20210927201657.593569-1-mmandlik@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.33.0.685.g46640cef36-goog Subject: [BlueZ PATCH v1 0/3] Introduce Advertisement Monitor Device Tracking event From: Manish Mandlik To: marcel@holtmann.org, luiz.dentz@gmail.com Cc: linux-bluetooth@vger.kernel.org, chromeos-bluetooth-upstreaming@chromium.org, Manish Mandlik Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org 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 a new MGMT interface - MGMT_EV_ADV_MONITOR_TRACKING to deliver the Monitor Device event received from the controller to the bluetoothd. Please let me know what you think about this or if you have any further questions. Thanks, Manish. Manish Mandlik (3): doc: Add Advertisement Monitor Device Tracking event lib: Add definition of AdvMonitor Tracking event adv_monitor: Receive Device Tracking event doc/mgmt-api.txt | 27 ++++++++++++++++++++++++++- lib/mgmt.h | 8 ++++++++ src/adv_monitor.c | 25 +++++++++++++++++++++++++ 3 files changed, 59 insertions(+), 1 deletion(-) -- 2.33.0.685.g46640cef36-goog