Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp1170359pxv; Fri, 23 Jul 2021 01:20:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2+g/UboPx3erpD26op2yNs36eECb+v9UxnnvKourhCA/1nnCzuZwje9gLbt8W4hhY812k X-Received: by 2002:a05:6e02:1e02:: with SMTP id g2mr2832474ila.6.1627028458534; Fri, 23 Jul 2021 01:20:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627028458; cv=none; d=google.com; s=arc-20160816; b=ekAVlL6X9JiSXz2dMbLO9LCtu4Zy69EKNge/9pEdaj0t2H/geiFHF6Rna+nEBzxhSd HKoDsAuORZsNqLcEyYmd64iJztO0JGhd6ASOoiS99DC4nb2vN4IKRslFLVPU6xnxHO29 9TPqEXVNNqRORGmkNZOZkcBgNMaE6slDD5nkxdM62y7IdUIWYA4L84+EXlQcB5PgDe4g Gr3+XE/nUQuG0KJiBC6Wkn7uW5So04DqRd6IoJvph1q71syTSwQGqJehyzXf0vYjJYYB g4Y7LKXbyrANHPwbtBUdIkE7jgkkdoDBdc2EJjwKTuQVmQoWmuxWbCc5Rqzy16X7F/Hd Yv9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:organization:message-id:date:subject:cc:to :from:dkim-signature; bh=y/7zkjvOkARz02kiYDMoiuVEtsO92RdfxmgFCQhzDFE=; b=mUyF+qngROqspTFJKtXv+81hm5Bf1ECRGbUnxLmL5ETxd6IRlBX6eZjPqqZ4qTFRHq +ZmlduU3J9ZG7UVhRMGrrZOQsPVq49p9tXfn4gXPB7L3pQ0t19kP+FU3cRddKJFNbkoe nafV267owz033L+jzb7xABznQBaZYjHx4yCjJPVGwKq8i1zt82Pahk+z5f2NfCVIVjPy KmDgf0Vs7Ud24nVCHI7W34XyBWvgG5NQFHNQhjDUwrVykmdJlNXMs15vWaokgVsg0s7b CsfyDufv8zXgbtY/nxPm2Dvj7V909JQV/8egtwX1Ay2tnQFDj+Xer7xbCeHalo2BmfC+ Duxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codecoup-pl.20150623.gappssmtp.com header.s=20150623 header.b=D5MAZIDt; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n19si8537330iop.0.2021.07.23.01.20.45; Fri, 23 Jul 2021 01:20:58 -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=@codecoup-pl.20150623.gappssmtp.com header.s=20150623 header.b=D5MAZIDt; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234438AbhGWHji (ORCPT + 99 others); Fri, 23 Jul 2021 03:39:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229907AbhGWHji (ORCPT ); Fri, 23 Jul 2021 03:39:38 -0400 Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1B93C061575 for ; Fri, 23 Jul 2021 01:20:11 -0700 (PDT) Received: by mail-lj1-x230.google.com with SMTP id h9so721806ljq.8 for ; Fri, 23 Jul 2021 01:20:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codecoup-pl.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:organization:in-reply-to :references:mime-version:content-transfer-encoding; bh=y/7zkjvOkARz02kiYDMoiuVEtsO92RdfxmgFCQhzDFE=; b=D5MAZIDtEAiLTP2fgn6tNboHLs+fwvt9jnutWvimrwqTYZCyWinx/ewlAXSMdW2Fsa UEnMnG1StGLY3ei6FqUYhex5bEibbyZYkS62XdAmJ96S3ZKX0iUev/Cn51x20GhoO37P 35x7l4wVjrSUqMxGRqU4Viu2u/hEI3s6tHGxI3YUsVwNXOIzjiXdRBD+pV0cw/h2iih8 yxO3XIc6IV/L9hO0vkwf895hDCxxUI2boYDpn6KHc0LY/I3Yc7ARZmBBUsUt868eXTv8 IcqElVMkKgPt1HLNNO78nNb7bF6AIgT71z2Fff2MG1enXqmI6O58ahSHpttj4ENCad3F DtLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :in-reply-to:references:mime-version:content-transfer-encoding; bh=y/7zkjvOkARz02kiYDMoiuVEtsO92RdfxmgFCQhzDFE=; b=LWAxUFKZmZDCNzwnYBl0KGlgoRmkMitLrmPUow8ZFsKHixuNA7TU+NYnIGnK2mZt2Y Fp79QeGeHc0aNWi3Ao9bhfycb2dzB9azWrV1asOqsAvSyQ9ZgZala5OlUs65+ZGlDm4d uMXeDhKAQKuaX2QVotTOsKF2sEicrRcrScCmILr4fTqSDDll7p+zPoEBO/NyBIjBC1uj Jj7ByeVZf/WAcOD5LI09UJql7yhv5MGJ6uiK5ZC38F0LzUBoGYNbv8ZRC3ncsKQ/9nTe J4zhSQVI7EOKysSMzZXH59ghGKIMc1abAXkjbSQDjB9uazzpbQE7eN3ShWAXEOwhZ5nt 5gDw== X-Gm-Message-State: AOAM531gmb6O+yqJnKNPpr/F0/1KzYNEpjKEGUhFtaWzlTK0viec3nmQ thIw2dlV9qROLGIF5A7PR17CrMQLPQCk8g== X-Received: by 2002:a05:651c:a06:: with SMTP id k6mr2573335ljq.435.1627028409505; Fri, 23 Jul 2021 01:20:09 -0700 (PDT) Received: from ix.localnet ([95.143.243.62]) by smtp.gmail.com with ESMTPSA id h10sm2168117lfp.151.2021.07.23.01.20.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jul 2021 01:20:08 -0700 (PDT) From: Szymon Janc To: Alain Michaud , Marcel Holtmann Cc: Miao-chen Chou , Bluetooth Kernel Mailing List , Luiz Augusto von Dentz , Alain Michaud , Howard Chung Subject: Re: [BlueZ PATCH v2 1/3] error: BR/EDR and LE connection failure reasons Date: Fri, 23 Jul 2021 10:20:07 +0200 Message-ID: <2206189.ElGaqSPkdT@ix> Organization: CODECOUP In-Reply-To: <5350EBBD-7F81-448E-B96A-A1C09F8EC676@holtmann.org> References: <20210626052152.2543526-1-mcchou@chromium.org> <5350EBBD-7F81-448E-B96A-A1C09F8EC676@holtmann.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org 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 -- pozdrawiam Szymon Janc