How to set MTU for ESP32 Bluetooth

satouk
Posts: 1
Joined: Mon Dec 27, 2021 8:14 am

How to set MTU for ESP32 Bluetooth

Postby satouk » Mon Dec 27, 2021 10:24 am

Hello everyone!

I am developing a device for Bluetooth communication of ESP32.
The configuration is as follows.

PC or Andoroid (Bluetooth) <----> ESP32 (Bluetooth) ----In module---- ESP32 (UART) <----> MCU (UART)

This device operates in Bluetooth Clasicc mode.
The required throughput of this device is 115.2kbps.
The data sent and received by this device is ASCII.
The Bluetooth module used in this device is ESP32-WROOM-32E.

Now…
I seem to be able to do all the work.
We have confirmed that the Bluetooth communication distance is within 1m.
However, it seems that it cannot be operated with a throughput of 115.2kbps.
After checking, it seems that the throughput that is not a problem is 19.2kbps.

I understand that the way to improve throughput is to set the MTU.
It is estimated that the current MTU is 23.

Can you guide me how to set the MTU?
(I am a beginner)

The program was provided by others.
So I haven't programmed.
The current include files are:
#include "BluetoothSerial.h"
#include "esp_bt.h"

Thank you for reading to the end.
Thank you for your cooperation.

Who is online

Users browsing this forum: Baidu [Spider] and 54 guests