Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp324092ybg; Fri, 12 Jun 2020 02:30:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwhhkdW+3Egqo4xz4goRUsTAupMMB2g3cvW+wnavIhr+Muw/js4MfnEfU1G/CHCuSOOXhPy X-Received: by 2002:a17:906:cede:: with SMTP id si30mr12767707ejb.315.1591954237174; Fri, 12 Jun 2020 02:30:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591954237; cv=none; d=google.com; s=arc-20160816; b=DjlZHFTcRYWqe29D1cN2Iq7STK53BwEXhPoikdufRSxSvVvLJxJRhxKw07nRgY7Tgn O6N8zIIwUqatqScpn8faioZVTxGRnIA3mjIo/xWk78gkt4c2ho4uLWi7+ADxwYcFbyGJ hFWJTQTO1SckWoOIDut2Px6WvJVZSPS+Omx88+vGA+bqPEsIXDy0QYcm88QJRFaJ8XQG CrCzDpXh/0rdHJhS8r3zBqsGV+ueWxp7ac9A9QEh7Ux+pMB4U5YmIkBEA8LM9YroGko9 k9NRiByisR0tI7FnscGmRpXkJEWpRFSV/wLPMNmner/gpdz4ScZ6+LJyW30Httzmk8bf xpFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=dCk37B/h0vBb6V74rwNY9TowK68T/jCy+jx0W/nHW7I=; b=TRkFEzHRVpJvIXElqMnX/bwxOSHs5bzR1xg3dE+qCyhMSkJjwHbAIv4Etuc8dt2Lof 0NTJMNQnrfnl2uo+RIQHmYQtUvGtD4T91vhEUc0VpEyh7hH/6i9Csh872ZF4McI7K6Ty HiP4Gqnpd0HjUcPf7ODzGuBddZbYoa45qryR+/4C4X2Jd7iixq/23rz1QGXCkckXLNbZ 93+CJtmGZRbYnHJEBMSInm2Ow6bUargYt5UPFWBO7xMAGmJuKDXo5RMy6Z4REStJgzFK mpgT3+cxqr9ce3uIz0u1bEc0Jb6V+ZaLEYsZpGKKP5yS/jLDCsaCCMaWRJx/Rm0b7KFp u9GQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=K1+I39ar; 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 n18si3125397edq.195.2020.06.12.02.29.59; Fri, 12 Jun 2020 02:30:37 -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=K1+I39ar; 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 S1726372AbgFLJ1h (ORCPT + 99 others); Fri, 12 Jun 2020 05:27:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726335AbgFLJ1h (ORCPT ); Fri, 12 Jun 2020 05:27:37 -0400 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12049C03E96F for ; Fri, 12 Jun 2020 02:27:37 -0700 (PDT) Received: by mail-ej1-x62c.google.com with SMTP id mb16so9429162ejb.4 for ; Fri, 12 Jun 2020 02:27:36 -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:content-transfer-encoding; bh=dCk37B/h0vBb6V74rwNY9TowK68T/jCy+jx0W/nHW7I=; b=K1+I39arBbQ1KVnx3UjsPTj8WDeg0cx6Ie9xN1IkQl1RzA17jj7pwUtHz3tz3h4tKs 4y6ltiRnqLRgE4SnoYCHkTikyfiAx/rTS5K0pPMbks3N8ErUClzueI6zdDCuM776l4cU EMjE5DdkecFiBcCnFxbXpfeaW0qXGVTtAlpi9CiL7aNePp4fFAv03SBlgOBZhnr60kJU HvJLxRViuLriVylRcPOpjkZ8cBz0B6j8A6O7NUwTuWtNI3e+J71n+zBuzyIJS0XPPMu8 /2XDC1YEMbT8L9DBU84iTk4XwvpdjUIEukTNiAAHnaznHqmrIfgaHgMDHDnAcTq/csJ6 YZaw== 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:content-transfer-encoding; bh=dCk37B/h0vBb6V74rwNY9TowK68T/jCy+jx0W/nHW7I=; b=Om5/8VeKNPzbV1rOl/dkvPrfPsDAWf09wTN9psrMCVz6d2tAdlmj6IuLFdk61Nt6iZ 3ktmPc6z0GTzccCaHr/2Kpdob4kUj+ED2R7f4IpSNFJU/lokPl4sDq94u8ewbasf5T6B aRnc5AnmNc1gLJjhV3IXy/nbnfDKERxUzdsGxTcxaGuIkeq6Xf05S5kUOMvcCiEnohGw jJLYS6O1TbPPqgWVYG3l4l1/zWEthUC7bIl8hkxnRWPfKWUT5SYYv0nG9nWVVVA7Qxik Vsup83Ol/Bg1Wo6cAJqv6T77KrrymzIl/cXO9yPFkCrpaRUpXxg633ntPYhWOonFYuvu mZvA== X-Gm-Message-State: AOAM530mc7loPwsSNlyDr0WUMQaXBFBF+a91qVNsQwXJMLT0+Pxc/Rgn WGo0bqwr0BwgJVu/r5x1O+nu8kdkqub+trS8mIMV6w== X-Received: by 2002:a17:906:ca54:: with SMTP id jx20mr13154885ejb.549.1591954055319; Fri, 12 Jun 2020 02:27:35 -0700 (PDT) MIME-Version: 1.0 References: <64A824C9-7C3C-4B08-8A9E-827121C4786D@holtmann.org> <558DADDA-AC07-4463-A94E-085B16976AAB@holtmann.org> In-Reply-To: From: Yun-hao Chung Date: Fri, 12 Jun 2020 17:27:23 +0800 Message-ID: Subject: Re: Should we disable ERTM as default? To: Luiz Augusto von Dentz Cc: Marcel Holtmann , Bluez mailing list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Luiz, Thanks for the patch. Unfortunately PTS folks told me the issue was caused by bluez initiating AVDTP connection while PTS was expecting to initiate the connection by itself. So it's not related to l2cap channel type. Thanks anyway! On Tue, Jun 9, 2020 at 4:28 AM Luiz Augusto von Dentz wrote: > > Hi Yun-hao, > > On Mon, Jun 8, 2020 at 9:15 AM Luiz Augusto von Dentz > wrote: > > > > Hi Yun-hao, > > > > On Mon, Jun 8, 2020 at 6:11 AM Yun-hao Chung w= rote: > > > > > > Hi Marcel, > > > > > > Here is the piece of the btmon trace. What should be the next step? > > > > > > < ACL Data TX: Handle 256 flags 0x00 dlen 6 > > > Channel: 66 len 2 [PSM 25 mode Basic (0x00)] {chan 2} > > > AVDTP: Discover (0x01) Command (0x00) type 0x00 label 3 nosp 0 > > > > HCI Event: Number of Completed Packets (0x13) plen 5 > > > Num handles: 1 > > > Handle: 256 > > > Count: 1 > > > > HCI Event: Number of Completed Packets (0x13) plen 5 > > > Num handles: 1 > > > Handle: 256 > > > Count: 1 > > > > ACL Data RX: Handle 256 flags 0x02 dlen 8 > > > Channel: 66 len 4 [PSM 25 mode Basic (0x00)] {chan 2} > > > AVDTP: Discover (0x01) Response Accept (0x02) type 0x00 label 3= nosp 0 > > > ACP SEID: 1 > > > Media Type: Audio (0x00) > > > SEP Type: SNK (0x01) > > > In use: No > > > < ACL Data TX: Handle 256 flags 0x00 dlen 18 > > > Channel: 66 len 14 [PSM 25 mode Basic (0x00)] {chan 2} > > > AVDTP: Set Configuration (0x03) Command (0x00) type 0x00 label = 4 nosp 0 > > > ACP SEID: 1 > > > INT SEID: 1 > > > Service Category: Media Transport (0x01) > > > Service Category: Media Codec (0x07) > > > Media Type: Audio (0x00) > > > Media Codec: SBC (0x00) > > > Frequency: 48000 (0x10) > > > Channel Mode: Joint Stereo (0x01) > > > Block Length: 16 (0x10) > > > Subbands: 8 (0x04) > > > Allocation Method: Loudness (0x01) > > > Minimum Bitpool: 2 > > > Maximum Bitpool: 64 > > > > HCI Event: Number of Completed Packets (0x13) plen 5 > > > Num handles: 1 > > > Handle: 256 > > > Count: 1 > > > > ACL Data RX: Handle 256 flags 0x02 dlen 6 > > > Channel: 66 len 2 [PSM 25 mode Basic (0x00)] {chan 2} > > > AVDTP: Set Configuration (0x03) Response Accept (0x02) type 0x0= 0 label 4 nosp 0 > > > < ACL Data TX: Handle 256 flags 0x00 dlen 7 > > > Channel: 66 len 3 [PSM 25 mode Basic (0x00)] {chan 2} > > > AVDTP: Open (0x06) Command (0x00) type 0x00 label 5 nosp 0 > > > ACP SEID: 1 > > > > HCI Event: Number of Completed Packets (0x13) plen 5 > > > Num handles: 1 > > > Handle: 256 > > > Count: 1 > > > > ACL Data RX: Handle 256 flags 0x02 dlen 6 > > > Channel: 66 len 2 [PSM 25 mode Basic (0x00)] {chan 2} > > > AVDTP: Open (0x06) Response Accept (0x02) type 0x00 label 5 nos= p 0 > > > < ACL Data TX: Handle 256 flags 0x00 dlen 12 > > > L2CAP: Connection Request (0x02) ident 6 len 4 > > > PSM: 25 (0x0019) > > > Source CID: 67 > > > > HCI Event: Number of Completed Packets (0x13) plen 5 > > > Num handles: 1 > > > Handle: 256 > > > Count: 1 > > > > ACL Data RX: Handle 256 flags 0x02 dlen 16 > > > L2CAP: Connection Response (0x03) ident 6 len 8 > > > Destination CID: 67 > > > Source CID: 67 > > > Result: Connection pending (0x0001) > > > Status: No further information available (0x0000) > > > > ACL Data RX: Handle 256 flags 0x02 dlen 16 > > > L2CAP: Connection Response (0x03) ident 6 len 8 > > > Destination CID: 67 > > > Source CID: 67 > > > Result: Connection successful (0x0000) > > > Status: No further information available (0x0000) > > > < ACL Data TX: Handle 256 flags 0x00 dlen 23 > > > L2CAP: Configure Request (0x04) ident 7 len 15 > > > Destination CID: 67 > > > Flags: 0x0000 > > > Option: Retransmission and Flow Control (0x04) [mandatory] > > > Mode: Basic (0x00) > > > TX window size: 0 > > > Max transmit: 0 > > > Retransmission timeout: 0 > > > Monitor timeout: 0 > > > Maximum PDU size: 0 > > > > ACL Data RX: Handle 256 flags 0x02 dlen 23 > > > L2CAP: Configure Request (0x04) ident 222 len 15 > > > Destination CID: 67 > > > Flags: 0x0000 > > > Option: Retransmission and Flow Control (0x04) [mandatory] > > > Mode: Streaming (0x04) > > > > Looks like we should be using BT_IO_MODE_STREAMING with MPS then. > > > > > TX window size: 0 > > > Max transmit: 0 > > > Retransmission timeout: 0 > > > Monitor timeout: 0 > > > Maximum PDU size: 672 > > > < ACL Data TX: Handle 256 flags 0x00 dlen 25 > > > L2CAP: Configure Response (0x05) ident 222 len 17 > > > Source CID: 67 > > > Flags: 0x0000 > > > Result: Failure - unacceptable parameters (0x0001) > > > Option: Retransmission and Flow Control (0x04) [mandatory] > > > Mode: Basic (0x00) > > > TX window size: 0 > > > Max transmit: 0 > > > Retransmission timeout: 0 > > > Monitor timeout: 0 > > > Maximum PDU size: 672 > > > > HCI Event: Number of Completed Packets (0x13) plen 5 > > > Num handles: 1 > > > Handle: 256 > > > Count: 1 > > > > HCI Event: Number of Completed Packets (0x13) plen 5 > > > Num handles: 1 > > > Handle: 256 > > > Count: 1 > > > > ACL Data RX: Handle 256 flags 0x02 dlen 29 > > > L2CAP: Configure Response (0x05) ident 7 len 21 > > > Source CID: 67 > > > Flags: 0x0000 > > > Result: Success (0x0000) > > > Option: Maximum Transmission Unit (0x01) [mandatory] > > > MTU: 672 > > > Option: Retransmission and Flow Control (0x04) [mandatory] > > > Mode: Basic (0x00) > > > TX window size: 0 > > > Max transmit: 0 > > > Retransmission timeout: 0 > > > Monitor timeout: 0 > > > Maximum PDU size: 0 > > > > ACL Data RX: Handle 256 flags 0x02 dlen 12 > > > L2CAP: Configure Request (0x04) ident 223 len 4 > > > Destination CID: 67 > > > Flags: 0x0000 > > > < ACL Data TX: Handle 256 flags 0x00 dlen 18 > > > L2CAP: Configure Response (0x05) ident 223 len 10 > > > Source CID: 67 > > > Flags: 0x0000 > > > Result: Success (0x0000) > > > Option: Maximum Transmission Unit (0x01) [mandatory] > > > MTU: 672 > > > > > > Thanks. > > > > > > On Mon, Jun 8, 2020 at 3:58 PM Marcel Holtmann = wrote: > > >> > > >> Hi Yun-hao, > > >> > > >> > I think it is more likely to be the PTS's limitations. I realized = the > > >> > problem is in the media channel not in the signaling channel. PTS > > >> > wants to use streaming mode, but bluez rejects it, and then PTS ab= orts > > >> > the test. According to the MPS 1.0 Spec 6.2, L2CAP streaming mode = is > > >> > the recommendation for optimization when using MPS media control > > >> > channels, so I think bluez doesn't do anything wrong during this t= est. > > >> > > >> do you have the btmon trace for this. I think we should accept ERTM = on the media channel. The unfortunate part is that control and media channe= ls both use PSM 25 and so we can=E2=80=99t be really selective when we are = the acceptor. If MPS wants us to accept ERTM on the media channel we should= allow. For all I care we can even accept it on the control channel, but it= is just a waste of overhead on the L2CAP headers. Actually the new Enhance= d Flow Control mode on BR/EDR would be more efficient for A2DP. > > > > Perhaps we can default to Streaming mode if MPS is enabled, we could > > actually do use it only for the transport channel while initiating but > > as a receiver I don't think it is possible to change after listen. > > I've sent a patch implementing this, let me know if that works with PTS. > > -- > Luiz Augusto von Dentz