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

elec_gd
Posts: 9
Joined: Mon Aug 31, 2020 10:57 am

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

Postby elec_gd » Thu Oct 15, 2020 1:51 pm

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.

chegewara
Posts: 2364
Joined: Wed Jun 14, 2017 9:00 pm

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

Postby chegewara » Fri Oct 16, 2020 2:52 am

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.

elec_gd
Posts: 9
Joined: Mon Aug 31, 2020 10:57 am

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

Postby elec_gd » Fri Oct 16, 2020 1:34 pm

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?

chegewara
Posts: 2364
Joined: Wed Jun 14, 2017 9:00 pm

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

Postby chegewara » Fri Oct 16, 2020 4:10 pm

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.

elec_gd
Posts: 9
Joined: Mon Aug 31, 2020 10:57 am

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

Postby elec_gd » Mon Oct 19, 2020 11:05 am

It's useful to know, thanks.
Can I ask what version of the ESP-IDF you are using?

chegewara
Posts: 2364
Joined: Wed Jun 14, 2017 9:00 pm

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

Postby chegewara » Mon Oct 19, 2020 5:00 pm

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

elec_gd
Posts: 9
Joined: Mon Aug 31, 2020 10:57 am

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

Postby elec_gd » Fri Oct 30, 2020 3:24 pm

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.

Who is online

Users browsing this forum: Gaston1980, Majestic-12 [Bot] and 85 guests