Skip to content

BLE transfer speed on STM32WB5 and corrupted data #30

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Kasper-Gjoedesen-Mikkelsen opened this issue May 19, 2021 · 6 comments
Closed
Assignees

Comments

@Kasper-Gjoedesen-Mikkelsen

I am limited to 150-180 bytes/s on the transfer speed when I write data from the STM32WB55 to a RPI with read and notify.
I have tested different timings for when the device poll and the advertising interval. Furthermore, I have tested with different buffer sizes between 8 and 22, and the data is corrupted if try to send more data than 22 bytes.

Result from a 30 byte uint8_t buffer of zeros: 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01.

Is this a config error? and can the speed be increased?

Best regards Kasper G. Mikkelsen

@fpistm
Copy link
Member

fpistm commented May 26, 2021

Hi @Kamik18
Please, could you share you test sketch?

What is your config? Arduino IDE version? Core version? Library version? Selected options?...
all relevant information are welcome to help.

@fpistm
Copy link
Member

fpistm commented May 26, 2021

I guess it have a link to:

#define BLE_DEFAULT_ATT_MTU 23

and arduino-libraries#70

@Kasper-Gjoedesen-Mikkelsen
Copy link
Author

I am using PlatformIo as my Arduino IDE, and I have tried changing BLE_DEFAULT_ATT_MTU but without any influence on the data.

I tried modifying one of your examples (CallbackLED.ino, examples/Peripheral/CallbackLED/CallbackLED.ino), and kept every variable to their default values, where I used “BLENotify” to write a data buffer in a while loop. I did not use delay or anything else doing that test.
I furthermore tried creating a callback function to send data when requested by a RPI, and again without any delay on either the STM32 or the RPI.

Versions:
PlatformIo Core 5.1.1 and Home 3.3.4
Arduino_Core_STM32 2.0.0
STM32duinoBLE 1.2.0

@KMeldgaard
Copy link

I've tried using GrumpyOldPizza's ArduinoCore-stm32wb implementation on the Arduino IDE (following the README guide) and achieved impressive bandwidth. I can transfer ~120 bytes per package - speed is yet to be determined, but it is definitely faster.
However I still have issues migrating the project to PlatformIO.

@fpistm
Copy link
Member

fpistm commented Jan 9, 2023

Hi @KMeldgaard
Could you test if it works better with latest STM32 Core version (2.4.0), library version (1.2.2) and with an updated Wireless copro binary (HCI layer.bin)

@fpistm
Copy link
Member

fpistm commented Jan 19, 2023

I've tested and read and write up to 256 and have met no issue with latest core 2.4.0, latest library version 1.2.2 and latest wireless copro binary.

@fpistm fpistm closed this as completed Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants