2019-08-27 02:15 PM
I am trying to understand what parameters I could change to increase throughput.
In the file app_conf.h
/**
* Maximum supported ATT_MTU size
*/
#define CFG_BLE_MAX_ATT_MTU (156)
/**
* Size of the storage area for Attribute values
* This value depends on the number of attributes used by application. In particular the sum of the following quantities (in octets) should be made for each attribute:
* - attribute value length
* - 5, if UUID is 16 bit; 19, if UUID is 128 bit
* - 2, if server configuration descriptor is used
* - 2*DTM_NUM_LINK, if client configuration descriptor is used
* - 2, if extended properties is used
* The total amount of memory needed is the sum of the above quantities for each attribute.
*/
#define CFG_BLE_ATT_VALUE_ARRAY_SIZE (1344)
/**
* Prepare Write List size in terms of number of packet with ATT_MTU=23 bytes
*/
#define CFG_BLE_PREPARE_WRITE_LIST_SIZE ( 0x3A )
/**
* Number of allocated memory blocks
*/
#define CFG_BLE_MBLOCK_COUNT ( 0x79 )
/**
* Enable or disable the Extended Packet length feature. Valid values are 0 or 1.
*/
#define CFG_BLE_DATA_LENGTH_EXTENSION 1
The comment above "#define CFG_BLE_PREPARE_WRITE_LIST_SIZE ( 0x3A )" says ATT_MTU for 23 bytes but ATT_MTU, by default, set to 156 bytes.
Could somebody either explain or point to a document that could explain on how to set this variables.
2019-08-30 05:28 AM
Please have a look at the application note AN5289. One chapter named "How to start the BLE stack – SHCI_C2_BLE_Init()" explains how the parameters (like CFG_BLE_PREPARE_WRITE_LIST_SIZE and others ...) are initialized with the proper calculated values.
Now I understand the real question is about the increase of the throughput. Look at the BLE_DataThroughput example. Data throughput is done via notifications (server to client) and not with data writing (client to server) with ATT_MTU_MAX = 250.
Note there is also a chapter dedicated to data throughput in AN5289.
The max value of ATT_MTU supported for data communication is exchanged using the ATT_GATT_EXCHANGE_CONFIG command. If not used, the ATT_MTU value remains to the one by default (23).
hope this helps.