Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4134639pxf; Mon, 29 Mar 2021 23:20:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyEZ6GXJRPC7WW14gTkGsJdwS+BGgQCEhhDJmc8yDT3eOqHN6iOC7YqRUHRUbEHXIMwb9Kb X-Received: by 2002:a17:906:2795:: with SMTP id j21mr31857290ejc.283.1617085252081; Mon, 29 Mar 2021 23:20:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617085252; cv=none; d=google.com; s=arc-20160816; b=gyytK5irhcIiUsPHbM/Z/Zq6HD4+jZWIp5+0ehDWELopbuhAid5o9eHU5a0kMDiBWq 9j2QMcHwsh6KfHAw9kHtsGLQ+5eahB7LzYXNZTWD997ZN/iAC5CWS2qT63RiNS0Hm24p DhH1fxh6wwoigr6TYh8n6r44hmPUDFl2GU+kHXecsTdfabPdaDQGMu0pd2xWfY0DPga5 QTN9k+SoA+CzLbQeWk8ktcjJph2igDPYhElG0pymmtBuOtV0Eyhf+maFQ2U9ROnW+pMc a7G2WpuAtvrsGUZYePcsELtVNiXvSa6gMBb8li2KQZTUh9lCy/psgSECYaha0UAuLtK6 JiAg== 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=a94eyPW48B2bSD1ggxSG7EzYAsnk4Ura1YcAF42Y9nA=; b=u2+oKCp24KyZ+JaY/V78esPDCl0ZmBXNZWKijoNPmZhp6CsR2WvPFfW8Qp5Z+pYKR8 2m1LB2ElvPtYBIn1n/K7aRzSPAB4jdrc20j80V4+lesnR2dPVGnmPC+e3iy8ER7PgZWB qLYcb2wL5KLiZPiWyldOIpt0Pj3DDmXn7NiN8mFuPwZzMF9CyMfzVe76gcphc8n7IV69 YIhbu0Zr63Lv8qWwEiC/xKUjNmrIdWVIjNcTl6p6H+0g+ptLrPs7ZlRMS1Y8IgYC8u0J bVUtjcSLFiOLIvrrhq9ByjZHgDzsqVGNouR72P3Q2CqRBI4qyGVI1sH/ufdIFDJgF45q Uakw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=BYMGIBPs; 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 e22si9510489edu.575.2021.03.29.23.20.12; Mon, 29 Mar 2021 23:20:52 -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=20161025 header.b=BYMGIBPs; 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 S229479AbhC3GQZ (ORCPT + 99 others); Tue, 30 Mar 2021 02:16:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229468AbhC3GP7 (ORCPT ); Tue, 30 Mar 2021 02:15:59 -0400 Received: from mail-qt1-x849.google.com (mail-qt1-x849.google.com [IPv6:2607:f8b0:4864:20::849]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91F9BC061762 for ; Mon, 29 Mar 2021 23:15:59 -0700 (PDT) Received: by mail-qt1-x849.google.com with SMTP id u13so2518971qtv.20 for ; Mon, 29 Mar 2021 23:15:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc; bh=a94eyPW48B2bSD1ggxSG7EzYAsnk4Ura1YcAF42Y9nA=; b=BYMGIBPsBxyH+pN5bNhet4UUtYl3woQ7jRvLfwtvIUTz8z11h6fBVeGsQWTJuE0yx5 F8lbePXVADqfbCL4AIkQT2giBtBC7CEfvvSU/CZehcJ+LbdGIdWVcbhf2RilTKSK7Nx2 Fs6QRNFco53xzoZZlGXAtPWstQvnM5OdXE4ivJ+hDygQK0/oKve//ZhdIvWMHW6XP8iI QJgi7XjwZUEz82g/DscL1Owj8OrxhdjVea/3Hc6sBBZowGRdzxFHv11Be668zZLKbBtP +M7L5EwsxhBrtwUy6yTci8+uyg31T7JmSf1ZBbOeEF1mZKBHnnpuvNWldZhjAR10RaE1 kt0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=a94eyPW48B2bSD1ggxSG7EzYAsnk4Ura1YcAF42Y9nA=; b=VSAM7UIs8Y974pqBvqFS17MDiAZ+afMMiPs0kDi3EdFKa+80M2DwuG6GmmYW/8giS6 0z9jDNROvRUOwB/eEhIvzfIrfZC2CC8XcnivIqkoFx9uk7pUpoRqMwA09CsBCs6rDdZa aMoS1SDNPKn5XGimyYKTZBZPIedIXjjMgJqnpe56qCWZgh440dMzQgGg9KDeL7nq7LjW 9mN+RCKGVSIS8wSeSH1VFQqUPItY+65rp6vekqZlRCr6/DC4+hf449gUVGkDLKn934ND mCyDdkN3pRcbnSvgEvMYIhcBye/pf++R6bU95m7YAR21VDH8lSCDFlB95+5wVWsP7H6b 0xyA== X-Gm-Message-State: AOAM531UbRd4yAPJRi3tGgwlQThx9cz/QWSoigNl4BlEVdZhLy/RImJ7 8XN53glwcGSZFM+w4wY6bqjgRx01o5akgw== X-Received: from mmandlik.mtv.corp.google.com ([2620:15c:202:201:95e8:4717:81b0:c797]) (user=mmandlik job=sendgmr) by 2002:a0c:dd14:: with SMTP id u20mr29536428qvk.13.1617084958776; Mon, 29 Mar 2021 23:15:58 -0700 (PDT) Date: Mon, 29 Mar 2021 23:15:49 -0700 Message-Id: <20210329231544.bluez.v1.1.I18e234e0b4d11e2ee24a699e70bde7e0a84b0be7@changeid> Mime-Version: 1.0 X-Mailer: git-send-email 2.31.0.291.g576ba9dcdaf-goog Subject: [bluez PATCH v1] test: Fix AdvMonitor RSSI filter properties From: Manish Mandlik To: marcel@holtmann.org, luiz.dentz@gmail.com Cc: linux-bluetooth@vger.kernel.org, chromeos-bluetooth-upstreaming@chromium.org, Manish Mandlik , apusaka@chromium.org, howardchung@chromium.org, mcchou@chromium.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Update the creation of Advertisement Monitor object as per the decoupled RSSIThresholdsAndTimers strucure. More info: doc/advertisement-monitor-api.txt Reviewed-by: apusaka@chromium.org Reviewed-by: howardchung@chromium.org Reviewed-by: mcchou@chromium.org Signed-off-by: Manish Mandlik --- test/example-adv-monitor | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/test/example-adv-monitor b/test/example-adv-monitor index 6fe8a3058..a405fc7b0 100644 --- a/test/example-adv-monitor +++ b/test/example-adv-monitor @@ -61,8 +61,10 @@ class AdvMonitor(dbus.service.Object): def get_properties(self): properties = dict() properties['Type'] = dbus.String(self.monitor_type) - properties['RSSIThresholdsAndTimers'] = dbus.Struct(self.rssi, - signature='nqnq') + properties['RSSIHighThreshold'] = dbus.Int16(self.rssi_h_thresh) + properties['RSSIHighTimeout'] = dbus.UInt16(self.rssi_h_timeout) + properties['RSSILowThreshold'] = dbus.Int16(self.rssi_l_thresh) + properties['RSSILowTimeout'] = dbus.UInt16(self.rssi_l_timeout) properties['Patterns'] = dbus.Array(self.patterns, signature='(yyay)') return {ADV_MONITOR_IFACE: properties} @@ -72,11 +74,10 @@ class AdvMonitor(dbus.service.Object): def _set_rssi(self, rssi): - h_thresh = dbus.Int16(rssi[self.RSSI_H_THRESH]) - h_timeout = dbus.UInt16(rssi[self.RSSI_H_TIMEOUT]) - l_thresh = dbus.Int16(rssi[self.RSSI_L_THRESH]) - l_timeout = dbus.UInt16(rssi[self.RSSI_L_TIMEOUT]) - self.rssi = (h_thresh, h_timeout, l_thresh, l_timeout) + self.rssi_h_thresh = rssi[self.RSSI_H_THRESH] + self.rssi_h_timeout = rssi[self.RSSI_H_TIMEOUT] + self.rssi_l_thresh = rssi[self.RSSI_L_THRESH] + self.rssi_l_timeout = rssi[self.RSSI_L_TIMEOUT] def _set_patterns(self, patterns): -- 2.31.0.291.g576ba9dcdaf-goog