STM32WBA Bluetooth® LE – Data throughput measurement

Revision as of 14:36, 11 April 2023 by Registered User (→‎Flag configuration on STM32WB)

1. Enhanced ATT feature

Enhanced ATT is a BLE 5.2 standard feature: it is implemented for STM32WB and STM32WBA.
Whereas the original unenhanced Attribute protocol operates in a sequential manner, the Enhanced Attribute Protocol provides a way to perform concurrent/parallel transactions between a BLE client and a server and potentially reduce the latency of operations in some applications.

For example, this is useful on a smartphone where multiple apps may be interfacing with a Bluetooth Low Energy device.
By utilizing EATT, an app’s Attribute transaction would not be blocked while another app’s ATT transaction is in progress, essentially allowing different apps to interact with a Bluetooth Low Energy device in parallel and potentially reducing latency.

1.1. New Enhanced Attribute Protocol (EATT) capabilities

• EATT modifies the sequential transaction model, making concurrent ATT transactions possible when conducted over distinct enhanced ATT bearers.
• EATT uses the L2CAP Enhanced Connection-Oriented Channels mode. This L2CAP mode provides flow control so that EATT can be regarded as reliable.
• MTU values at the ATT layer and L2CAP layer have been made independently configurable, and this may reduce latency experienced by some applications that share the BLE stack with other applications.

1.2. Changes introduced in BLE stack by the introduction of EATT

At GATT initialization, two new characteristics are added to the GATT service:

Client Supported Features (for "Enhanced ATT bearer" and "Multiple Handle Value Notifications)
Server Supported Features (for "EATT Supported")

New GATT information are stored in NVM:

Client Supported Features (for "Enhanced ATT bearer" and "Multiple Handle Value Notifications)

Enhancement of existing GATT commands/events and addition of new GATT commands/events.

1.3. New event

ACI_GATT_EATT_BEARER_EVENT

This event informs the application of a change in status of the Enhanced ATT bearer handled by the specified L2CAP channel.

1.4. Enhancement of existing GATT commands and events

Backward compatibility is maintained.
Signification of "Connection Handle" parameter is extended.


1.5. Existing GATT commands supporting the enhancement

Client commands
ACI_GATT_DISC_ALL_PRIMARY_SERVICES
ACI_GATT_DISC_PRIMARY_SERVICE_BY_UUID
ACI_GATT_FIND_INCLUDED_SERVICES
ACI_GATT_DISC_ALL_CHAR_OF_SERVICE
ACI_GATT_DISC_CHAR_BY_UUID
ACI_GATT_DISC_ALL_CHAR_DESC
ACI_GATT_READ_CHAR_VALUE
ACI_GATT_READ_USING_CHAR_UUID
ACI_GATT_READ_LONG_CHAR_VALUE
ACI_GATT_READ_MULTIPLE_CHAR_VALUE
ACI_GATT_READ_LONG_CHAR_DESC
ACI_GATT_READ_CHAR_DESC
ACI_GATT_WRITE_CHAR_VALUE
ACI_GATT_WRITE_LONG_CHAR_VALUE
ACI_GATT_WRITE_CHAR_RELIABLE
ACI_GATT_WRITE_LONG_CHAR_DESC
ACI_GATT_WRITE_CHAR_DESC
ACI_GATT_WRITE_WITHOUT_RESP
ACI_GATT_CONFIRM_INDICATION

Server commands
ACI_GATT_UPDATE_CHAR_VALUE_EXT
ACI_GATT_WRITE_RESP
ACI_GATT_ALLOW_READ
ACI_GATT_DENY_READ

1.6. Existing GATT events supporting the enhancement

Client events
ACI_GATT_PROC_COMPLETE_EVENT
ACI_ATT_FIND_INFO_RESP_EVENT
ACI_ATT_FIND_BY_TYPE_VALUE_RESP_EVENT
ACI_ATT_READ_BY_TYPE_RESP_EVENT
ACI_ATT_READ_RESP_EVENT
ACI_ATT_READ_BLOB_RESP_EVENT
ACI_ATT_READ_MULTIPLE_RESP_EVENT
ACI_ATT_READ_BY_GROUP_TYPE_RESP_EVENT
ACI_ATT_PREPARE_WRITE_RESP_EVENT
ACI_ATT_EXEC_WRITE_RESP_EVENT
ACI_GATT_ERROR_RESP_EVENT
ACI_GATT_DISC_READ_CHAR_BY_UUID_RESP_EVENT
ACI_GATT_INDICATION_EVENT
ACI_GATT_INDICATION_EXT_EVENT
ACI_GATT_NOTIFICATION_EVENT
ACI_GATT_NOTIFICATION_EXT_EVENT

Server events
ACI_GATT_SERVER_CONFIRMATION_EVENT
ACI_GATT_READ_PERMIT_REQ_EVENT
ACI_GATT_READ_MULTI_PERMIT_REQ_EVENT
ACI_GATT_WRITE_PERMIT_REQ_EVENT
ACI_GATT_PREPARE_WRITE_PERMIT_REQ_EVENT

1.7. Flag configuration on STM32WB

To enable EATT feature on STM32WB;
Use SHCI_C2_BLE_INIT_OPTIONS_ENHANCED_ATT_SUPPORTED to configure CFG_BLE_OPTIONS_EXT in app_conf.h

1.8. how to implement on STM32WBA

• Issue: the Enhanced ATT feature “can provide an improved user experience on devices where there are multiple applications using the BLE stack”. • Solution: we have introduced a new static GATT mode: • BLE_OPTIONS_ENHANCED_ATT This mode along with new commands and events implements the Enhanced ATT feature (see next slides). • Implemented: in tag 111 only for “full extended” stack (included as “enabled” in WB cube release 1.15, and as “certified” in release 1.16)

2. References