All of lore.kernel.org
 help / color / mirror / Atom feed
* Should we disable ERTM as default?
@ 2020-06-03 14:04 Yun-hao Chung
  2020-06-03 17:40 ` Marcel Holtmann
  0 siblings, 1 reply; 9+ messages in thread
From: Yun-hao Chung @ 2020-06-03 14:04 UTC (permalink / raw)
  To: Bluez mailing list; +Cc: ChromeOS BT Qualification

Hi Linux-bluetooth,

When I ran the following tests in PTS qualification on Chrome OS, I
couldn’t pass all of them because they all failed to create an AVDTP
connection with channel type as ‘Streaming’ or ‘Enhanced
Retransmission’.

- MPS/AG-SRC-TG/HFAV/CLH/SD/BV-03-I
- MPS/AG-SRC-TG/HFAV/CLH/SD/BV-04-I
- MPS/AG-SRC-TG/HFAV/CLH/SD/BV-05-I
- MPS/AG-SRC-TG/HFAV/CLH/SD/BV-06-I

It looks like bluez doesn’t want to change its mode even though it
claims it supports them. Our question is do we still want to enable
this feature as default?

Thanks.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Should we disable ERTM as default?
  2020-06-03 14:04 Should we disable ERTM as default? Yun-hao Chung
@ 2020-06-03 17:40 ` Marcel Holtmann
  2020-06-03 19:52   ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 9+ messages in thread
From: Marcel Holtmann @ 2020-06-03 17:40 UTC (permalink / raw)
  To: Yun-hao Chung; +Cc: Bluez mailing list, ChromeOS BT Qualification

Hi Yun-hao,

> When I ran the following tests in PTS qualification on Chrome OS, I
> couldn’t pass all of them because they all failed to create an AVDTP
> connection with channel type as ‘Streaming’ or ‘Enhanced
> Retransmission’.
> 
> - MPS/AG-SRC-TG/HFAV/CLH/SD/BV-03-I
> - MPS/AG-SRC-TG/HFAV/CLH/SD/BV-04-I
> - MPS/AG-SRC-TG/HFAV/CLH/SD/BV-05-I
> - MPS/AG-SRC-TG/HFAV/CLH/SD/BV-06-I
> 
> It looks like bluez doesn’t want to change its mode even though it
> claims it supports them. Our question is do we still want to enable
> this feature as default?

I am a bit confused. So when you use the disable_ertm kernel parameters, these test pass? But ERTM is mandatory for AVRCP 1.3 and later.

Are we sure that MPS test cases are correct? I mean, we never required ERTM for HFP since that is based on RFCOMM and ERTM is useless for RFCOMM.

Regards

Marcel


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Should we disable ERTM as default?
  2020-06-03 17:40 ` Marcel Holtmann
@ 2020-06-03 19:52   ` Luiz Augusto von Dentz
  2020-06-05 11:09     ` Yun-hao Chung
  0 siblings, 1 reply; 9+ messages in thread
From: Luiz Augusto von Dentz @ 2020-06-03 19:52 UTC (permalink / raw)
  To: Marcel Holtmann
  Cc: Yun-hao Chung, Bluez mailing list, ChromeOS BT Qualification

Hi Yun-hao,

On Wed, Jun 3, 2020 at 10:43 AM Marcel Holtmann <marcel@holtmann.org> wrote:
>
> Hi Yun-hao,
>
> > When I ran the following tests in PTS qualification on Chrome OS, I
> > couldn’t pass all of them because they all failed to create an AVDTP
> > connection with channel type as ‘Streaming’ or ‘Enhanced
> > Retransmission’.
> >
> > - MPS/AG-SRC-TG/HFAV/CLH/SD/BV-03-I
> > - MPS/AG-SRC-TG/HFAV/CLH/SD/BV-04-I
> > - MPS/AG-SRC-TG/HFAV/CLH/SD/BV-05-I
> > - MPS/AG-SRC-TG/HFAV/CLH/SD/BV-06-I
> >
> > It looks like bluez doesn’t want to change its mode even though it
> > claims it supports them. Our question is do we still want to enable
> > this feature as default?

We don't use ERTM on AVDTP connections, in fact only AVRCP Browsing
channel requires that but I guess you want low level testing of L2CAP
parameters it more common to use l2test instead, or this does not come
from L2CAP test spec?

> I am a bit confused. So when you use the disable_ertm kernel parameters, these test pass? But ERTM is mandatory for AVRCP 1.3 and later.
>
> Are we sure that MPS test cases are correct? I mean, we never required ERTM for HFP since that is based on RFCOMM and ERTM is useless for RFCOMM.
>
> Regards
>
> Marcel
>


-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Should we disable ERTM as default?
  2020-06-03 19:52   ` Luiz Augusto von Dentz
@ 2020-06-05 11:09     ` Yun-hao Chung
  2020-06-08  7:58       ` Marcel Holtmann
  0 siblings, 1 reply; 9+ messages in thread
From: Yun-hao Chung @ 2020-06-05 11:09 UTC (permalink / raw)
  To: Luiz Augusto von Dentz
  Cc: Marcel Holtmann, Bluez mailing list, ChromeOS BT Qualification

Thanks for the responses!

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.

Thanks.

On Thu, Jun 4, 2020 at 3:52 AM Luiz Augusto von Dentz
<luiz.dentz@gmail.com> wrote:
>
> Hi Yun-hao,
>
> On Wed, Jun 3, 2020 at 10:43 AM Marcel Holtmann <marcel@holtmann.org> wrote:
> >
> > Hi Yun-hao,
> >
> > > When I ran the following tests in PTS qualification on Chrome OS, I
> > > couldn’t pass all of them because they all failed to create an AVDTP
> > > connection with channel type as ‘Streaming’ or ‘Enhanced
> > > Retransmission’.
> > >
> > > - MPS/AG-SRC-TG/HFAV/CLH/SD/BV-03-I
> > > - MPS/AG-SRC-TG/HFAV/CLH/SD/BV-04-I
> > > - MPS/AG-SRC-TG/HFAV/CLH/SD/BV-05-I
> > > - MPS/AG-SRC-TG/HFAV/CLH/SD/BV-06-I
> > >
> > > It looks like bluez doesn’t want to change its mode even though it
> > > claims it supports them. Our question is do we still want to enable
> > > this feature as default?
>
> We don't use ERTM on AVDTP connections, in fact only AVRCP Browsing
> channel requires that but I guess you want low level testing of L2CAP
> parameters it more common to use l2test instead, or this does not come
> from L2CAP test spec?
>
> > I am a bit confused. So when you use the disable_ertm kernel parameters, these test pass? But ERTM is mandatory for AVRCP 1.3 and later.
> >
> > Are we sure that MPS test cases are correct? I mean, we never required ERTM for HFP since that is based on RFCOMM and ERTM is useless for RFCOMM.
> >
> > Regards
> >
> > Marcel
> >
>
>
> --
> Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Should we disable ERTM as default?
  2020-06-05 11:09     ` Yun-hao Chung
@ 2020-06-08  7:58       ` Marcel Holtmann
       [not found]         ` <CAPHZWUeo3sAGsgAapYYZTSt_apKvP-2LHOxBbYF_8pcaCzYn1Q@mail.gmail.com>
  0 siblings, 1 reply; 9+ messages in thread
From: Marcel Holtmann @ 2020-06-08  7:58 UTC (permalink / raw)
  To: Yun-hao Chung
  Cc: Luiz Augusto von Dentz, Bluez mailing list, ChromeOS BT Qualification

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.

Regards

Marcel


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Should we disable ERTM as default?
       [not found]         ` <CAPHZWUeo3sAGsgAapYYZTSt_apKvP-2LHOxBbYF_8pcaCzYn1Q@mail.gmail.com>
@ 2020-06-08 16:15           ` Luiz Augusto von Dentz
  2020-06-08 16:33             ` Marcel Holtmann
  2020-06-08 20:28             ` Luiz Augusto von Dentz
  0 siblings, 2 replies; 9+ messages in thread
From: Luiz Augusto von Dentz @ 2020-06-08 16:15 UTC (permalink / raw)
  To: Yun-hao Chung
  Cc: Marcel Holtmann, Bluez mailing list, ChromeOS BT Qualification

Hi Yun-hao,

On Mon, Jun 8, 2020 at 6:11 AM Yun-hao Chung <howardchung@google.com> wrote:
>
> 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 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 <marcel@holtmann.org> 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.

-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Should we disable ERTM as default?
  2020-06-08 16:15           ` Luiz Augusto von Dentz
@ 2020-06-08 16:33             ` Marcel Holtmann
  2020-06-08 20:28             ` Luiz Augusto von Dentz
  1 sibling, 0 replies; 9+ messages in thread
From: Marcel Holtmann @ 2020-06-08 16:33 UTC (permalink / raw)
  To: Luiz Augusto von Dentz
  Cc: Yun-hao Chung, Bluez mailing list, ChromeOS BT Qualification

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 <marcel@holtmann.org> 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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Should we disable ERTM as default?
  2020-06-08 16:15           ` Luiz Augusto von Dentz
  2020-06-08 16:33             ` Marcel Holtmann
@ 2020-06-08 20:28             ` Luiz Augusto von Dentz
  2020-06-12  9:27               ` Yun-hao Chung
  1 sibling, 1 reply; 9+ messages in thread
From: Luiz Augusto von Dentz @ 2020-06-08 20:28 UTC (permalink / raw)
  To: Yun-hao Chung; +Cc: Marcel Holtmann, Bluez mailing list

Hi Yun-hao,

On Mon, Jun 8, 2020 at 9:15 AM Luiz Augusto von Dentz
<luiz.dentz@gmail.com> wrote:
>
> Hi Yun-hao,
>
> On Mon, Jun 8, 2020 at 6:11 AM Yun-hao Chung <howardchung@google.com> wrote:
> >
> > 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 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 <marcel@holtmann.org> 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.

I've sent a patch implementing this, let me know if that works with PTS.

-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Should we disable ERTM as default?
  2020-06-08 20:28             ` Luiz Augusto von Dentz
@ 2020-06-12  9:27               ` Yun-hao Chung
  0 siblings, 0 replies; 9+ messages in thread
From: Yun-hao Chung @ 2020-06-12  9:27 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: Marcel Holtmann, Bluez mailing list

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
<luiz.dentz@gmail.com> wrote:
>
> Hi Yun-hao,
>
> On Mon, Jun 8, 2020 at 9:15 AM Luiz Augusto von Dentz
> <luiz.dentz@gmail.com> wrote:
> >
> > Hi Yun-hao,
> >
> > On Mon, Jun 8, 2020 at 6:11 AM Yun-hao Chung <howardchung@google.com> wrote:
> > >
> > > 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 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 <marcel@holtmann.org> 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.
>
> I've sent a patch implementing this, let me know if that works with PTS.
>
> --
> Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-06-12  9:27 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-03 14:04 Should we disable ERTM as default? Yun-hao Chung
2020-06-03 17:40 ` Marcel Holtmann
2020-06-03 19:52   ` Luiz Augusto von Dentz
2020-06-05 11:09     ` Yun-hao Chung
2020-06-08  7:58       ` Marcel Holtmann
     [not found]         ` <CAPHZWUeo3sAGsgAapYYZTSt_apKvP-2LHOxBbYF_8pcaCzYn1Q@mail.gmail.com>
2020-06-08 16:15           ` Luiz Augusto von Dentz
2020-06-08 16:33             ` Marcel Holtmann
2020-06-08 20:28             ` Luiz Augusto von Dentz
2020-06-12  9:27               ` Yun-hao Chung

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.