BLE throughput from smartphone to ESP32

jhulbert
Posts: 7
Joined: Thu Jan 28, 2021 9:50 pm

BLE throughput from smartphone to ESP32

Postby jhulbert » Wed Mar 31, 2021 12:54 am

I am beginning to plan a project using an ESP32-WROVER-E and would like to measure the BLE throughput. I am looking to do OTA over BLE.

I have set up two ESP32's with the throughput client and server examples provided by Espressif. Both write and notify throughput report a data rate of ~91 kB/s which should be plenty for my application since the firmware file won't be more than a couple hundred kB.

To follow up on this, I am attempting to test the BLE throughput from a smartphone, acting as a client, to the ESP32, acting as a server (running example_ble_server_throughput.c). The problem I have is the phone app for this project doesn't exist and probably won't for a while. I have played around with some BLE client emulators such as nRF Connect for Mobile and LightBlue, but they only allow you to write characteristics by entering a value and pressing the write button. But to get the maximum throughput the server example needs the characteristic to be continuously written by the client (which is what example_ble_client_throughput.c does). I can only do one write at a time by physically pressing a button using these smartphone apps, so the data rate reported by example_ble_server_throughput.c is much smaller than what is possible.

Possible ways forward I have come up with are:

1. Use a different smartphone app to emulate the client.
- I have looked around a bit but haven't found something which does a continuous/looped write. I'm also not experienced in smartphone app writing and this is more of a viability test so its unlikely our app will be available anytime soon.

2. Just accept that the maximum throughput between a smartphone and ESP32 will be similar to the 91 kB/s reported between two ESP32s in the Espressif example code.
- I am not actually sure what may cause the phone-to-ESP32 throughput to be less than 91 kB/s. One possibility is the maximum MTU size is only 185 on iOS. I am interested in the throughput for iOS and Android though. If someone could provide insight or confirm this it would be the easiest way forward.

3. Modify example_ble_server_throughput.c to get a better reporting of throughput with nRF Connect for Mobile or LightBlue.
- Getting an accurate measure of throughput seems to require that data is continuously transmitted which doesn't appear possible with these two client emulators.

Any suggestions and insights are appreciated!

Who is online

Users browsing this forum: No registered users and 115 guests