Skip to main content
KKIM.6
Senior
May 30, 2022
Solved

How to change the BLE communication setup using STM32WB55?

  • May 30, 2022
  • 3 replies
  • 2310 views

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.

  1. How to change ATT-MTU (number of bytes per packet), Connection Interval, and number of packets. (or a good example for this)
  2. Whether, if I change these BLE setups, the BLE setup of the Windows program automatically changed. (or how to change Windows BLE setup using Windows APIs)
  3. How to transfer multi packets (or a good example for this)

I hope your comments.

This topic has been closed for replies.
Best answer by Remy ISSALYS

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

3 replies

KKIM.6
KKIM.6Author
Senior
June 1, 2022

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.)

Remy ISSALYS
Remy ISSALYSBest answer
ST Technical Moderator
June 1, 2022

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

KKIM.6
KKIM.6Author
Senior
June 1, 2022

Thanks for the clear comment but I have one more question.

Where could I modify the connection interval? and is it possible?

Remy ISSALYS
ST Technical Moderator
June 8, 2022

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