public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* Support for Data Length Extension (DLE)?
@ 2022-10-17 14:54 Christian Eggers
  2022-10-17 20:11 ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 2+ messages in thread
From: Christian Eggers @ 2022-10-17 14:54 UTC (permalink / raw)
  To: linux-bluetooth

When monitoring a Bluetooth connection between two Linux systems
(kernel 5.14 / 5.15 + bluez-5.65), I noticed the following:

> HCI Event: LE Meta Event (0x3e) plen 12                                                                                                                          #21108 [hci0] 1650.255887
      LE Read Remote Used Features (0x04)
        Status: Success (0x00)
        Handle: 25 Address: 00:1A:7D:F0:21:40 (OUI 00-1A-7D)
        Features: 0xbd 0x5f 0x66 0x00 0x00 0x00 0x00 0x00
...
          LE Data Packet Length Extension
...

> ACL Data RX: Handle 25 flags 0x02 dlen 18                                                                                                                        #21109 [hci0] 1650.300224
      LE L2CAP: LE Connection Request (0x14) ident 1 len 10
        PSM: 128 (0x0080)
        Source CID: 64
        MTU: 672
        MPS: 23
        Credits: 30
< ACL Data TX: Handle 25 flags 0x00 dlen 18                                                                                                                        #21110 [hci0] 1650.300431
      LE L2CAP: LE Connection Response (0x15) ident 1 len 10
        Destination CID: 64
        MTU: 672
        MPS: 23
        Credits: 30
        Result: Connection successful (0x0000)
...
> HCI Event: LE Meta Event (0x3e) plen 11                                                                                                                          #21113 [hci0] 1650.345822
      LE Data Length Change (0x07)
        Handle: 25 Address: 00:1A:7D:F0:21:40 (OUI 00-1A-7D)
        Max TX octets: 251
        Max TX time: 2120
        Max RX octets: 251
        Max RX time: 2120

I can't find that HCI_EV_LE_DATA_LEN_CHANGE is implemented anywhere in the kernel nor in bluez userspace.
So why do I get this event? Is it generated by controller firmware itself?

I think that both adapters support DLE. Is there there already support for using it with Linux?

regards
Christian




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

* Re: Support for Data Length Extension (DLE)?
  2022-10-17 14:54 Support for Data Length Extension (DLE)? Christian Eggers
@ 2022-10-17 20:11 ` Luiz Augusto von Dentz
  0 siblings, 0 replies; 2+ messages in thread
From: Luiz Augusto von Dentz @ 2022-10-17 20:11 UTC (permalink / raw)
  To: Christian Eggers; +Cc: linux-bluetooth

Hi Christian,

On Mon, Oct 17, 2022 at 7:57 AM Christian Eggers <ceggers@arri.de> wrote:
>
> When monitoring a Bluetooth connection between two Linux systems
> (kernel 5.14 / 5.15 + bluez-5.65), I noticed the following:
>
> > HCI Event: LE Meta Event (0x3e) plen 12                                                                                                                          #21108 [hci0] 1650.255887
>       LE Read Remote Used Features (0x04)
>         Status: Success (0x00)
>         Handle: 25 Address: 00:1A:7D:F0:21:40 (OUI 00-1A-7D)
>         Features: 0xbd 0x5f 0x66 0x00 0x00 0x00 0x00 0x00
> ...
>           LE Data Packet Length Extension
> ...
>
> > ACL Data RX: Handle 25 flags 0x02 dlen 18                                                                                                                        #21109 [hci0] 1650.300224
>       LE L2CAP: LE Connection Request (0x14) ident 1 len 10
>         PSM: 128 (0x0080)
>         Source CID: 64
>         MTU: 672
>         MPS: 23
>         Credits: 30
> < ACL Data TX: Handle 25 flags 0x00 dlen 18                                                                                                                        #21110 [hci0] 1650.300431
>       LE L2CAP: LE Connection Response (0x15) ident 1 len 10
>         Destination CID: 64
>         MTU: 672
>         MPS: 23
>         Credits: 30
>         Result: Connection successful (0x0000)
> ...
> > HCI Event: LE Meta Event (0x3e) plen 11                                                                                                                          #21113 [hci0] 1650.345822
>       LE Data Length Change (0x07)
>         Handle: 25 Address: 00:1A:7D:F0:21:40 (OUI 00-1A-7D)
>         Max TX octets: 251
>         Max TX time: 2120
>         Max RX octets: 251
>         Max RX time: 2120
>
> I can't find that HCI_EV_LE_DATA_LEN_CHANGE is implemented anywhere in the kernel nor in bluez userspace.
> So why do I get this event? Is it generated by controller firmware itself?

We do programm the it earlier though with HCI_OP_LE_WRITE_DEF_DATA_LEN:

https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git/tree/net/bluetooth/hci_sync.c#n4362

> I think that both adapters support DLE. Is there there already support for using it with Linux?

I guess it would probably make sense to handle
HCI_EV_LE_DATA_LEN_CHANGE, that said it seems to come after the L2CAP
Connection Request in case you are suggesting to align the MTU with
Max TX/RX length.

> regards
> Christian
>
>
>


-- 
Luiz Augusto von Dentz

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

end of thread, other threads:[~2022-10-17 20:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-17 14:54 Support for Data Length Extension (DLE)? Christian Eggers
2022-10-17 20:11 ` Luiz Augusto von Dentz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox