2022-05-30 09:05 AM
I'm using STM32WB55 and communicating with a program using Windows BLE APIs.
My system affords BLE 5.2 version and I know it affords 2 Mbps.
However, I don't know how to change the BLE setup in the microcontroller and my program.
Currently, my microcontroller can send 244 bytes of data per packet.
So, Here is some question.
I hope your comments.
Solved! Go to Solution.
2022-06-01 07:45 AM
Hello,
In order to change ATT MTU size, you can change the value of the following define in app_conf.h:
/**
* Maximum supported ATT_MTU size
* This parameter is ignored by the CPU2 when CFG_BLE_OPTIONS is set to 1"
*/
#define CFG_BLE_MAX_ATT_MTU (156)
In BLE_p2pServer example, you can change the connection interval using SW2, see Connection_Interval_Update_Req function in app_ble.c file.
You can also increase the data characteristic value size.
The BLE parameters of your Windows program change automatically according to it's capabilities.
Best Regards
2022-06-01 06:41 AM
My custom C# program can get a ~130 packet per second using subscribe mode (continuous communication). It would mean the connection interval act as a bottleneck to increasing the speed (generally speaking, the initial connection interval is 7.5 ms. So, ~130 packet per second makes sense.)
2022-06-01 07:45 AM
Hello,
In order to change ATT MTU size, you can change the value of the following define in app_conf.h:
/**
* Maximum supported ATT_MTU size
* This parameter is ignored by the CPU2 when CFG_BLE_OPTIONS is set to 1"
*/
#define CFG_BLE_MAX_ATT_MTU (156)
In BLE_p2pServer example, you can change the connection interval using SW2, see Connection_Interval_Update_Req function in app_ble.c file.
You can also increase the data characteristic value size.
The BLE parameters of your Windows program change automatically according to it's capabilities.
Best Regards
2022-06-01 07:59 AM
Thanks for the clear comment but I have one more question.
Where could I modify the connection interval? and is it possible?
2022-06-07 06:18 AM
I checked both file for ATT_MTU and Connection_Interval_Update_Req.
but still hard to understand.
I can see these options below but I cannot understand the meaning of each component.
#define CFG_BLE_NUM_GATT_ATTRIBUTES 68
#define CFG_BLE_MAX_ATT_MTU (156)
#define CFG_BLE_ATT_VALUE_ARRAY_SIZE (1344)
#define CFG_BLE_PREPARE_WRITE_LIST_SIZE BLE_PREP_WRITE_X_ATT(CFG_BLE_MAX_ATT_MTU)
Where can I see a detailed example for these setups?
+ my current setup can send 245 bytes but I cannot understand why it is possible for the current setup.
2022-06-08 07:51 AM
Hello,
You can modify the connection interval once the connection is established after the connection update. You can also look BLE_DataThroughput example available in STM32CubeWB package maybe it can help you to understand.
Best Regards