Skip to main content
EBard.1
Associate II
December 17, 2024
Question

STM32WB55 MTU SIZE

  • December 17, 2024
  • 4 replies
  • 1385 views

I am currently working with the STM32WB55RGV6 MCU and utilizing the BLE functionality provided in the BLE_p2pserver example (STM32Cube_FW_WB_V1.18.0) from ST. However, I am facing a limitation where the data packet size is restricted to 20 bytes, preventing me from sending larger amounts of data.

I have come across forums suggesting that the MTU size can be increased to enable higher data throughput. However, I am not very experienced in writing or modifying the software, and I need step-by-step guidance to implement this change correctly.

I also found Application Note AN5289 and investigated the section on "How to maximize data throughput". While the document provides suggestions, I am unsure how to apply them to my code.

Could you please provide clear, step-by-step instructions on how to:

  1. Increase the BLE MTU size,
  2. Apply the recommendations from AN5289 to maximize the BLE throughput,
  3. Make the necessary modifications to the BLE_p2pserver example?

Your help would be greatly appreciated, as I am currently stuck on this issue.

Thank you!

4 replies

STTwo-32
ST Technical Moderator
December 18, 2024

Hello @EBard.1 

1) You can increase the MTU size throw the #define CFG_BLE_MAX_ATT_MTU on the app_conf.h file. 

2+3) to understand how those recommendations work, you can take a look at the  BLE_DataThroughput.

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
EBard.1
EBard.1Author
Associate II
December 20, 2024

Hi,
Thank you,
Currently I am using BLE_p2p example provided by ST. 


I found that forum, should I go over these suggestions? Is there anything to add on these suggestions? 
https://community.st.com/t5/stm32-mcus-wireless/aci-gatt-update-char-value-ext-issue/td-p/652328


Should I add these?:
hci_le_set_data_length
* hci_le_set_phy

Can you guide me like on the link please? Thank you. 




STTwo-32
ST Technical Moderator
December 20, 2024

Hello @EBard.1 

I think that following the recommendations of my answer on the last post should do the job. 

Best Regards.

STTwo-32

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
EBard.1
EBard.1Author
Associate II
December 20, 2024

Hi,

Should I add these functions, what do you think?

hci_le_set_data_length
* hci_le_set_phy

Thank you for your answers!

STTwo-32
ST Technical Moderator
December 20, 2024

I don't think so. But you could try.

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
EBard.1
EBard.1Author
Associate II
December 20, 2024

Thank you again, for that function:

aci_gatt_update_char_value_ext(0x0000, aPeerToPeerContext.PeerToPeerSvcHdle, aPeerToPeerContext.P2PNotifyServerToClientCharHdle, 0x00, 509, 0, 243, (uint8_t *) pPayload);

Should I use 0x0000 adress for the Update_Type ? 

STTwo-32
ST Technical Moderator
December 20, 2024

 This parameter depends on the client(s) you want to select to be notified.

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.