ESP32 arduino dev kit BLE max speed

oaktree042
Posts: 1
Joined: Thu Jan 12, 2023 10:34 am

ESP32 arduino dev kit BLE max speed

Postby oaktree042 » Thu Jan 12, 2023 1:33 pm

Hello! I'm doing my internship and I'm totally a novice in the themes of Arduino, ESP32 and C++. The main task is to send data from one ESP32 to another ESP32 on maximum possible speed (data throughput). During my research I have found that theoretically BLE can achieve speed up to 1 Mbit/s. But with my server and client programs can achieve only 4.6 kbit/s without MTU setup and 5.6 kbit/s with MTU = 517.

Main question: Is it possible to achieve more speed with my equipment setup? I know that the BLE standard is not suitable for high speed data transfer, but my main task is to find the actual max data transfer speed.

I’m using two ESP32_Devkit_V4 and Arduino IDE 2.0.3. External antennas and range between them less 0.15 - 0.2 m. Using some different examples from the internet I have built client and server programs. Server is sending data to the client.
I used libraries:
  1. #include <BLEDevice.h>
  2. #include <BLEServer.h>
  3. #include <BLEUtils.h>
  4. #include <BLE2902.h>
I set up the delay between messages = 90 ms
  1. delay(90)
Every message length is 512 bits, for example the first one is:
  1.  
  2. valuesend= "(111111)(beight)(beight)(beight)(beight)(beight)(beight)(beight)";
  3. customCharacteristic.setValue(valuesend.c_str());
  4.  
If I make the message length more than 512 bits I will lose some messages in the receiver part. If I set up a delay between messages less than 90 ms, I will lose some messages too.
I attached my client and server programs here in txt files.

Thank you for your replies, Gleb.
Attachments
server.txt
My server program
(3.79 KiB) Downloaded 142 times
client.txt
My client program
(1.72 KiB) Downloaded 142 times

Who is online

Users browsing this forum: No registered users and 62 guests