Data Length Extension#

Data Length Extension (DLE) increases the maximum packet size from 27 bytes to 251 bytes, improving throughput and reducing overhead for data-intensive applications.

DLE Overview#

Benefits:

  • Higher Throughput: Larger packets reduce protocol overhead

  • Lower Latency: Fewer packets needed for data transfer

  • Power Efficiency: Fewer connection events for same amount of data

Packet Size Limits:

  • Without DLE: Maximum 27 bytes payload (23 bytes ATT + 4 bytes L2CAP header)

  • With DLE: Maximum 251 bytes LL Data PDU payload (247 bytes + ATT headers + 4 bytes L2CAP header). The 251 octets are payload only; LL header and MIC are additional.

  • Link Layer: Max_TX_Octets / Max_RX_Octets are the payload octets in the LL Data PDU (up to 251 octets with DLE).

  • ATT MTU on SiWx917: Capped at 232 bytes due to controller buffer limits. With DLE, one LL Data PDU carries at most 247 bytes of L2CAP payload (251 − 4-byte L2CAP header); ATT PDUs may span multiple LL packets, and the Bluetooth specification ATT_MTU maximum is higher (up to 517).

Enabling DLE#

Requesting DLE:

  • Use rsi_ble_set_data_len() to request data length extension

  • Specify desired TX octets and TX time

  • Both devices must support DLE for it to be used

DLE Negotiation:

  • DLE is negotiated during connection or after connection establishment

  • Both devices agree on supported packet sizes

  • DLE negotiation completion indicated through rsi_ble_on_data_length_update_t callback (contains rsi_ble_event_data_length_update_t structure)

  • Register callback using rsi_ble_gap_register_callbacks() before requesting DLE

Reading DLE Capabilities:

  • Use rsi_ble_read_max_data_len() to query maximum supported data length

  • Response includes maximum TX/RX octets and time

DLE Best Practices#

When to Use DLE:

  • Applications with frequent large data transfers

  • High-throughput requirements

  • Power-sensitive applications (fewer connection events)

MTU and DLE:

  • DLE operates at link layer (larger packets)

  • MTU operates at ATT layer (larger ATT payloads)

  • Both can be used together for maximum efficiency


APIs Used in This Section#

Topic

APIs / symbols

Reference

DLE — request and query

rsi_ble_set_data_len(), rsi_ble_read_max_data_len()

GAP

DLE — GAP callbacks

rsi_ble_gap_register_callbacks(), rsi_ble_on_data_length_update_t

GAP, Register Callbacks, Callbacks Declarations

DLE — event structure

rsi_ble_event_data_length_update_t

Callbacks Declarations