Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp4510411ybg; Mon, 8 Jun 2020 09:34:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwGFKfwHM1fhqfOmuQRb/+MOHf7cly3ulhUZ0/AYZd0XfZNBUZNwkDWsIoLO6yHTu2Cyfk+ X-Received: by 2002:a17:906:d117:: with SMTP id b23mr7769521ejz.42.1591634064303; Mon, 08 Jun 2020 09:34:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591634064; cv=none; d=google.com; s=arc-20160816; b=mSvV7aDIDU7ZAerFIlKLKURlHgz7Ca6W9INSCkM3vaj4efGyND6nk79OabvpNwvhW9 L1+Qn9NAbfK5l0Ey7fEX3MW86x6HmCu2XAMkFfZ0jxlsp8kpTW85OlFSpTefpPYSj2/b EmM5tYYsV0zQcqhLS5dXWNon1cim3IGiG06+9U1ZwEsISF2KG7t5d6HZOu3n3G7ETqYA aP5VZ0/NxHTNXTubJkunVmRffdxq+iIDOr/e172CHbQ6ugyZoU+198mOycbIFRP4EGFi TrnM0q+xDbvpcge9L4Jlul7ekG5HWHjlNFNa01p9h8QR0zqxb4pJM9dnGLdJ/q6GQhFG OKDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=MsTWI6scc1s0mDAp31AIciZaQSsV2qoX1DAcGnqVKU4=; b=UYTIAjqO3JLNKZJJPTEDz+2oUTaCs7wpEppUsiHYbzhMUmCL+5sp5YDzt7ns1rD8lE tycfqbGSpzw1wVAlxGJoYDX4JHKrpRCONbYb2IiQ4kpKJfekol1n5YIoNHV1B4uGDRxx lfHL/JfmsgTfzgb8DXnXlYT4zeayhntMtEnejVCHO8gvrhZgNWHSiwFO1HvO83s3E3GL uFuCYtK9Mev5e+uRgrPRqAuTXViX4DbqdwKHN+o80HuWaYSotrI6Na/dW7JmDelr7sv0 gYEG1RbCyfk9fgVZhN1gsgfjJZPM0oxybdRRJTjEWgFvkeh2q6AhNp8i9tFaQEx19JWg hWkA== ARC-Authentication-Results: i=1; mx.google.com; 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 30si9993954edr.262.2020.06.08.09.33.52; Mon, 08 Jun 2020 09:34:24 -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; 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 S1730333AbgFHQd2 convert rfc822-to-8bit (ORCPT + 99 others); Mon, 8 Jun 2020 12:33:28 -0400 Received: from coyote.holtmann.net ([212.227.132.17]:50727 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726042AbgFHQd1 (ORCPT ); Mon, 8 Jun 2020 12:33:27 -0400 Received: from marcel-macbook.fritz.box (p5b3d2638.dip0.t-ipconnect.de [91.61.38.56]) by mail.holtmann.org (Postfix) with ESMTPSA id B2792CECC6; Mon, 8 Jun 2020 18:43:14 +0200 (CEST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: Should we disable ERTM as default? From: Marcel Holtmann In-Reply-To: Date: Mon, 8 Jun 2020 18:33:24 +0200 Cc: Yun-hao Chung , Bluez mailing list , ChromeOS BT Qualification Content-Transfer-Encoding: 8BIT Message-Id: References: <64A824C9-7C3C-4B08-8A9E-827121C4786D@holtmann.org> <558DADDA-AC07-4463-A94E-085B16976AAB@holtmann.org> To: Luiz Augusto von Dentz X-Mailer: Apple Mail (2.3608.80.23.2.2) Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Luiz, >> 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 0x00 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 nosp 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 aborts >>>> 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 test. >>> >>> 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 channels both use PSM 25 and so we can’t 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 Enhanced 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. yep, as acceptor we would have to enable streaming mode and allow to downgrade to basic mode. For initiator we can separate between control channel in basic mode and media channel in streaming mode. Regards Marcel