cancel
Showing results for 
Search instead for 
Did you mean: 

How to tell Link Layer using Data Length Extension?

rdscliff
Associate II
Posted on June 26, 2018 at 08:54

I'm using BlueNRG-2 in Network Coprocessor mode over the SPI interface.  After establishing a connection with my device, how can I tell if the remote device supports Data Length Extension?

I've experimented with the ACI_GATT_EXCHANGE_CONFIG command but that negotiates the max ATT_MTU size for L2CAP but the Response Event doesn't tell you anything about the Link Layer data size and if Data Length Extension is being used.  Is there a way to find out?

2 REPLIES 2
Winfred LU
ST Employee
Posted on June 28, 2018 at 03:45

Hi Shaq,

Could you check how the device responses to LL_FEATURES_REQ and LL_LENGTH_REQ?

Thank you.

Best Regards,

Winfred

rdscliff
Associate II

I figured it out. Shortly after I posted my question, I noticed the new v2.1 FW was posted along with new documentation. The new release had new commands for negotiating larger ATT_MTU and Link Layer PDUs.

First step for a client is to send an ACI_GATT_EXCHANGE_CONFIG command so that both ends negotiate their max MTU. I noticed Android phones will not turn on DLE if the MTU length does not require it.

Then send an HCI_LE_SET_DATA_LENGTH command. A 4.1 device will reject the command as invalid and no response will be received. Sometimes a phone will beat you to it request a DLE data length change before you do. Either way, you will get an HCI_LE_META_EVENT containing a DATA_LENGTH_CHANGE event. The event will contain the new LL packet sizes.