Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3919494pxv; Mon, 28 Jun 2021 16:40:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzqX5BstDSYtXaz2NcFVriMVJZhXpg8R6NHoMd7qm2mUp1QwzXZLW61oAo7gDj+aX6ki9gO X-Received: by 2002:a92:6610:: with SMTP id a16mr19472768ilc.124.1624923623961; Mon, 28 Jun 2021 16:40:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624923623; cv=none; d=google.com; s=arc-20160816; b=xhhF8+MKx/AzVHw5DfpgkdZ/tmxXcFogDqsduxzc6nMnPCo2g/x94in0YNLPUWxNeZ aHGHzSzZTJvBRDzQIdp+0hNUfDmCVwOytwJ2iglZWz+D/rKZlOidYWjvySJvC5166xsk BblvE9PW4Dj1u+5iWb3EHGDReglhLxZIRk0io2xmNivjkdOVpU9GRAomLItB+tqNds8D HV2L6qpvcjvMyjFOEbe4VZ6HQMyg+ESdIv2JnqpFzM/fuJ0fNceh0zMoB1HEJtoyBN9x +qO1UqmNgqnxvmYkr3AyjI8AXLae07Zq2kknFN3U7RzrzCUQbBiL9bccRwVnKUrvnnuo F7Fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=GM9jsAlrYg2SRXzVRGphJEsMstnF14zXR2P0IoS3Uks=; b=eIGlRXqXXMThFmW6OwOJ9QHqueSo/lVAKcJvLiaqeyNnU9uqMiAIWbSPkHp9Y0fomd Ntf/i8r+JoozXjF4J3kplg+ph5szl9wauB4sy3Kn1jQMawA5Y8NH1wsAwC2AVAGTIfsN nnEVBds/zKinNIjplRofdhVH21QkhvpoRTTuBKr7igcysHHdTNjsHyqASiQ49RPtpaZc kp3ust3x7YaA7QvA3NLtUcObUuWVPG/91F+dmUDtbYdZfeCVs0fus/tQ0+25DNUhTvYZ 9hS/Pp59/A4Hk+nom0Khw8i2cYQAWrbeRHO22oFJ5Q4KuqebX5trMzSusRFbA+CBNn/G NOhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=p3ym1tBT; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w3si20290120iol.91.2021.06.28.16.40.09; Mon, 28 Jun 2021 16:40:23 -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=@gmail.com header.s=20161025 header.b=p3ym1tBT; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232713AbhF1Rfi (ORCPT + 99 others); Mon, 28 Jun 2021 13:35:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232498AbhF1Rfi (ORCPT ); Mon, 28 Jun 2021 13:35:38 -0400 Received: from mail-yb1-xb31.google.com (mail-yb1-xb31.google.com [IPv6:2607:f8b0:4864:20::b31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4094AC061574 for ; Mon, 28 Jun 2021 10:33:11 -0700 (PDT) Received: by mail-yb1-xb31.google.com with SMTP id i4so19799582ybe.2 for ; Mon, 28 Jun 2021 10:33:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=GM9jsAlrYg2SRXzVRGphJEsMstnF14zXR2P0IoS3Uks=; b=p3ym1tBTILjcSZnia9PTd6/WGxLoqoJl6mMZD/Lpr6/tavfzVfgPuG2xh8MStopgdr pOi2GGBx3sVZkXbXFw1WhS1uC0HXZBmyghLVCV6QLIm/VEd4orQYqeTMfAUK7PN1VTYK v0Zni7hqR+fQHywe9ev0jEQF+IGiwTWmFWxGEEfoPxGWJXUzveSaVAqDICGDD0VrPvq8 ZavRAuwN9/Z7o3TFHHAyPMNwha7ngF/HCFUIA5JMqJyccU5l4mIFLDOvPn7UgHyyEHbo S/lUNHNKgNIdoy4w5KRa2SdwbXLJ4BsuvFC+hoi2PdDT7IdPhW9khzUPRdeP2VnacCG9 Zsiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=GM9jsAlrYg2SRXzVRGphJEsMstnF14zXR2P0IoS3Uks=; b=tjaahFDODUJE30iUK5KBUnEnwZ4BxTeJNPCvHX//UJBjAf/bNKSTx56/HtVsQEaL/L txtjyzKJhxUQrkblzXCBHwznVvDanvqPRznbXatu7o7zEJIXbEJR4XV4aa/8HW648sxh 9FDMHpiny4ATHXlN1mh4xb7OCxsTKbT4xvYTK9PDYvDv+i8MmMwYkPvmFoFE537wp9cM TnaxiUf77MGkJpqo1ftXMLcxrD0fL/Ke0nD4B4CDf8U2C2LxdbAESUGeSnHEix8juf0T EBeptmXHkJkRj8PGzXgFKqhqaMV7hpKzlf9gL5rzooggJKdMLA1uD9cYBkht/Ku1/WsB Dndg== X-Gm-Message-State: AOAM530tclBbwhIp3IYK0R/rF1QhalgFPbcMMq/n31T5YKCBy5t46Nk2 QjytJ2wyewHBVIAvvwqw98gnQFi/najnalkNFn6+Vv3bZV0= X-Received: by 2002:a25:be02:: with SMTP id h2mr33507037ybk.91.1624901590426; Mon, 28 Jun 2021 10:33:10 -0700 (PDT) MIME-Version: 1.0 References: <20210623184355.3685859-1-luiz.dentz@gmail.com> <363a48e3df83590ad4f53383830ca447c71939d7.camel@hadess.net> In-Reply-To: <363a48e3df83590ad4f53383830ca447c71939d7.camel@hadess.net> From: Luiz Augusto von Dentz Date: Mon, 28 Jun 2021 10:32:59 -0700 Message-ID: Subject: Re: [PATCH BlueZ] doc/agent-api: Add AuthenticationFailed method To: Bastien Nocera Cc: "linux-bluetooth@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Bastien, On Mon, Jun 28, 2021 at 7:59 AM Bastien Nocera wrote: > > On Wed, 2021-06-23 at 11:43 -0700, Luiz Augusto von Dentz wrote: > > From: Luiz Augusto von Dentz > > > > This introduces AuthenticationFailed method which is used to indicate > > when there was an authentication failure with a remote device which is > > recommended by the core spec: > > > > BLUETOOTH CORE SPECIFICATION Version 5.2 | Vol 3, Part C page 1314: > > '5.2.2.3 Simple Pairing after authentication failure > > When the link key is stored, subsequent connections to the same device > > will use authentication but this may fail if the remote device has > > deleted the link key. Table 5.2 defines what shall be done depending > > on the type of the link key and whether bonding was performed or not.' > > > > So following Table 5.2 recommendation the AuthenticationFailed method > > would be called when authentication fails with a bonded device. > > --- > > doc/agent-api.txt | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > diff --git a/doc/agent-api.txt b/doc/agent-api.txt > > index 0d9347cab..91d752b0a 100644 > > --- a/doc/agent-api.txt > > +++ b/doc/agent-api.txt > > @@ -183,3 +183,8 @@ Methods void Release() > > > > This method gets called to indicate that the > > agent > > request failed before a reply was returned. > > + > > + void AuthenticationFailed(object device, byte status) > > + > > + This method indicates that there was an > > authentication > > + failure with a remote device. > > Is there a way that we could have some persistent storage for when the > last authentication error happened? > > This would allow showing a /!\ icon in the device list even though we > don't have an agent running in the session, just when the settings are > open, in GNOME. I guess you are suggesting introducing a property to the device object e.g. AuthenticationStatus or something like that, that way one can figure out if the device needs repairing or not. Alternatively we could just remove the device, after a few attempts, if there is no agent of the agent don't implement the new method. > This would also allow the settings to get this information in the first > place, otherwise we'd need to have some side-channel to funnel that > information from the "desktop-wide" agent to the settings agent. > > I've made the upstream bug[1] public now, can you reference it in the > commit message? Sure. > Cheers > > [1]: https://gitlab.gnome.org/GNOME/gnome-bluetooth/-/issues/91 > -- Luiz Augusto von Dentz