Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp1352502pxv; Fri, 23 Jul 2021 06:23:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwFWBC74VWOo6/8duKlq80I5vvWnycdRsp+UQxCpu/Y81sK+Fcc2inld0KM+QrslsW9yj81 X-Received: by 2002:a92:6610:: with SMTP id a16mr3349265ilc.71.1627046595728; Fri, 23 Jul 2021 06:23:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627046595; cv=none; d=google.com; s=arc-20160816; b=grN0pDd7nT0JP5955oDV6ruGk2+Z5kKuihjEGNnPo7VB4zx3pjzL/D87GFWDzZih+2 RzibhKMwRnMwoGU3Ikf69+e1t7K2wNU6yP0EzHUChcWoNzVoD3G31SJeIIdtXUPwfHqK VmBPBoClJSZFfzpqp7vQ63BP5YKnEVriGHx3i79HCCZdvZVG+dNblNfoaQuQIjEFX8Zv Sb4ABTGqxOvTQ906YcsbevgqzpH/7c2ta+YtG7aHxZpOr4UXy5f7bE5PlNe7HoGcoHF3 plCCJ0q7o6ymB1rX8aZj3vviCjjci3iPfzEkEFOGDXjWgKhvnDyJu0FMqeGDhbCv9OUt K+gA== 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=XnDsomaFlcNC3McINgc0uDEVcOJXYzs3EaeY8FFuK24=; b=vFkG83CWiKAwaKAF4GKrIq7osXU2fo4gsGS1M1nJoFepMcik9VjK4l80ogj9wBL+kd 1pNFLLnFRTTpMnaIBASlRpIKE9aAkEQ3DueFvaVUIF+kDVqlUhvszcAhJLSCItM+5gQT 4qwjl9seneqbBCLYPQqmRIKdcBt4v15M8Xu6Po3/7RNlskE1PvapIisnaCbs5XQWzdAi U632jzzTYQdbYMciBt9IWcx+vExXdU8QbMrtTIb9cCQch2mB/KBDBYR1kxc2tF7pCZvi hrRayoCHMVxts2VV3MfsA4PU6yLfckiAMc50RLyx8VaJEVSG3P7PJWkxU5i+elW9DXFl H2FA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=kXLMXTvg; 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 m6si33237644iol.83.2021.07.23.06.22.42; Fri, 23 Jul 2021 06:23:15 -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=kXLMXTvg; 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 S235005AbhGWMkv (ORCPT + 99 others); Fri, 23 Jul 2021 08:40:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235118AbhGWMkD (ORCPT ); Fri, 23 Jul 2021 08:40:03 -0400 Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0438C061575 for ; Fri, 23 Jul 2021 06:20:35 -0700 (PDT) Received: by mail-lj1-x231.google.com with SMTP id q2so1671734ljq.5 for ; Fri, 23 Jul 2021 06:20:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=XnDsomaFlcNC3McINgc0uDEVcOJXYzs3EaeY8FFuK24=; b=kXLMXTvgXfOtGs8oaJZzqNdxx5jl21FkoltmDFBSOhhRoupK7zGR7w41t2wmi0RSs9 DyNNgqO75lhQGDzfLrogGFFgfd8hpRMgdwERXsTm99ZAn/I2NyYdqkYMYKxPzHmwlnaX Pj/JOQbQO/+Lsj1WkGcd7p7bn1BH9VmTtQjmbBba1+mN1ZnNgbVzEDsD2+3Piswq6gAI u4653HEomQQzedpuKQcAUz25JpMionw2UxQpytwuFi01zOYq8QDI5ieqm16cF0ZomNsu 7l/v4HzvOb51yJgLo3oa0dEdmLcMI/w95Ah/LodV5uwcq+gcFlJbl9tq+hsYg3FAp6XB Bpcw== 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=XnDsomaFlcNC3McINgc0uDEVcOJXYzs3EaeY8FFuK24=; b=Cl+Ih/HBVZMdINTH0X3VKKrxjhNqhno1+K2Z73kYLusxZ66GR1d4Jp3duxJ4fHXRgB GcPWTd1c3sCuSGhAMKYQVeRgqRF8BlxcAofCF5ePWvuhfqjU2/VcM3jex38xPZ8z/iBy L4DWz+MYCMGbQn2EU+jqcSxhMbxGdd7s9jwObNjEBjHlb1spc0Gu1PCJoio1gYwhec1Y 5za7SThbtWKoVrgJzesrh+TnYykfw7rzfpNBL/6lgTQf16dA35GPEMtrk7s0p/MC0u/l INt7LETjoJSz8UyNEsGwRnHPhMz6WT84ZXlmf6NEIxkg1xRuvg/7jp7plI3DPVBTi1It mbpw== X-Gm-Message-State: AOAM531oY8vmeqdlJ6YvG7d8pIBs3u2tthCjj83hdq7KzZ5bszLFZDNj CUOTF+LkTi4yCLR9HiIFqxurdOD+1WmOMJ9SlWXLZA== X-Received: by 2002:a05:651c:1108:: with SMTP id d8mr3404689ljo.127.1627046433930; Fri, 23 Jul 2021 06:20:33 -0700 (PDT) MIME-Version: 1.0 References: <20210626052152.2543526-1-mcchou@chromium.org> <5350EBBD-7F81-448E-B96A-A1C09F8EC676@holtmann.org> <2206189.ElGaqSPkdT@ix> In-Reply-To: <2206189.ElGaqSPkdT@ix> From: Alain Michaud Date: Fri, 23 Jul 2021 09:20:17 -0400 Message-ID: Subject: Re: [BlueZ PATCH v2 1/3] error: BR/EDR and LE connection failure reasons To: Szymon Janc Cc: Marcel Holtmann , Miao-chen Chou , Bluetooth Kernel Mailing List , Luiz Augusto von Dentz , Alain Michaud , Howard Chung Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org On Fri, Jul 23, 2021 at 4:20 AM Szymon Janc wrote: > > Hi, > > On Friday, 23 July 2021 09:38:40 CEST Marcel Holtmann wrote: > > > >>>>> What is the intention to split BR/EDR and LE here. You do know > > >>>>> up-front what connection type you are. Trying to figure out from the > > >>>>> error code what connection you have been trying to establish is plain > > >>>>> wrong.>>>> > > >>>> In fact the up-front connection type is not necessarily known. In the > > >>>> case of dual-mode devices, such as Bose QC35, a D-Bus client can issue > > >>>> Connect(), and it depends on the timing of connection request (adv > > >>>> usually arrive first compared to inquiry result), it can be either > > >>>> BR/EDR or LE link being established. Another aspect of this is the > > >>>> metrics collection, where knowing transport can be handy. For > > >>>> instance, we can associate the certain error to particular use cases > > >>>> at application layer, and that can help targeting the bottleneck to > > >>>> tackle. > > >>> > > >>> Then we need to find a different way to convey the transport chosen. > > >>> Doing this by error message is a bad idea.>>> > > >>>>> The description is that you want to know exactly where the connection > > >>>>> failed. And I think that can be established independent from the > > >>>>> transport.>>>> > > >>>> Indeed the intention is to know where it failed exactly. However, as > > >>>> mentioned above, transport information is also an important piece of > > >>>> information to know. > > >>> > > >>> We need to find a different way to inform about which transport failed > > >>> (or better which was chosen in the first place).> > > > I would love to hear your thoughts on an alternative. Many of the > > > Apis are transport agnostic (Connect/Pair may end up connecting to > > > either available transports for dual mode devices), but yet the error > > > that results from them are not. Errors from one transport doesn't > > > make sense for one and vice versa. A platform wanting to leverage > > > telemetry and metrics to drive ecosystem improvements would ultimately > > > need to know the difference even if the applications may not need to > > > care. > > > > and we might have made a mistake in the API design and should have given the > > caller more control. We need to review the API design and see if things > > have to change. Just glueing things on at the end makes me suspicious. > > Some (5, wow!) years back I've loosely proposed split for org.bluez.Device API > that was meant to handle some of the dual mode devices issues we've been > seeing [1] [2]. > > We never got time to fully implement it (mostly due to hacking around device.c > instead of properly splitting internal implementation into device_le.c and > device_bredr.c) but got some very initial PoC running. > > With new interfaces old Device1 could be simply super-set of two for legacy > applications purposes. > > Maybe such approach is worth re-considering? > > > [1] https://marc.info/?l=linux-bluetooth&m=145710680912268&w=2 > [2] https://marc.info/?l=linux-bluetooth&m=145973293118003&w=2 Definitely worth reconsidering. We've recently introduced a ConnectLE Api as a stop gap measure for something very similar. I'd love to see the equivalent of a ConnectClassic / ConnectLE distinction. However, I still believe the "Generic" Connect serves its purpose as you alluded to above. Even if it could be built using layers, I still believe there is value from a telemetry POV to understand the errors from the field better and there, the distinction between the specific transport matter. Just like today, I suspect many applications will continue to use the generic "Connect" as to not replicate the logic it ultimately implements for dealing with dual mode devices, yet results/metrics would be important. The team strives to improve interoperability at a large scale in the ecosystem, I believe these data point distinctions are a critical enabler to get better insights into the specific errors customers are seeing. A counter proposal that would be acceptable to you, achieves the objectives and that the team can implement would be a nice next step. Thanks! Alain > > > -- > pozdrawiam > Szymon Janc > >