Page 1 of 1

Espressif is unable to exchange Bluetooth data with Android 10 device if MTU size is increased

Posted: Thu Oct 15, 2020 1:51 pm
by elec_gd
Hi,

I am using an Espressif esp32 wroom-32d running the ESP-IDF in a product that connects to mobile phones over Bluetooth. I am using the Bluedroid stack.
Android has a default MTU size when transferring data over Bluetooth. In some cases I need to send large amounts of data so I set the MTU size greater than the default.

I am seeing on my Samsung device running Android 10, the Espressif device is not able to exchange data if the MTU size is set greater than the default. If I set the MTU size and attempt to send data to the Espressif, it will disconnect from the mobile. However, I am not having this problem if I negotiate the MTU size between another Bluetooth module (not Espressif ) and a mobile running Android 10.

Also MTU negotiation between the Espressif and a mobile running Android 9 works, so it seems to be a problem with Android 10.

Does anyone have any insight into the possible cause of this? Is there any known issue with the Espressif negotiating MTU with Android 10 devices?

Thanks in advance.

Re: Espressif is unable to exchange Bluetooth data with Android 10 device if MTU size is increased

Posted: Fri Oct 16, 2020 2:52 am
by chegewara
Hi,
in past few months ive been doing few projects that are using esp32 and ionic app to OTA update over BLE.
All my developments are done with samsung S9+, android 10, and bludroid stack.
I dont have any issues with increasing MTU, but i have heard about some problem with android 10, it was also few months ago, but i dont know if it was related to MTU.

Re: Espressif is unable to exchange Bluetooth data with Android 10 device if MTU size is increased

Posted: Fri Oct 16, 2020 1:34 pm
by elec_gd
Hi,

I am aware of this discussion on the Samsung forum of others complaining about issues with setting large MTU sizes on Android 10 Samsung phones: https://forum.developer.samsung.com/t/s ... ion/509/63

But in my case, it works for another Bluetooth module but not on the Espressif. But perhaps this is still linked to an issue on Samsung's side?.. If so any advice on how I may pinpoint if the issue is on the mobile side or Espressif side?

Re: Espressif is unable to exchange Bluetooth data with Android 10 device if MTU size is increased

Posted: Fri Oct 16, 2020 4:10 pm
by chegewara
Actually im not talking about samsung forum. It was discussion on arduino-esp32 gitter channel about issues using esp32 ble with android 10 and not older version.
Maybe its not very helpful, because im not giving any solution, but i just wanted let you know that i am actively using esp32 ble with samsung and android 10, always with MTU 500+ without any issues.

Re: Espressif is unable to exchange Bluetooth data with Android 10 device if MTU size is increased

Posted: Mon Oct 19, 2020 11:05 am
by elec_gd
It's useful to know, thanks.
Can I ask what version of the ESP-IDF you are using?

Re: Espressif is unable to exchange Bluetooth data with Android 10 device if MTU size is increased

Posted: Mon Oct 19, 2020 5:00 pm
by chegewara
I am using arduino, which is based on IDF v3.3 and esp-idf master branch (not always updated to most recent commit, but usually).

Re: Espressif is unable to exchange Bluetooth data with Android 10 device if MTU size is increased

Posted: Fri Oct 30, 2020 3:24 pm
by elec_gd
Just wanted to update with a solution. I came across this thread on the ESP-IDF Github which showed it was a known issue:
https://github.com/espressif/esp-idf/issues/4689

Once I updated my ESP-IDF SDK this was resolved. I updated to v3.3.4 if anyone is curious about a branch that contains the fix.