I've been experimenting with the throughput_app BLE example and have found that changing the PHY from 1M to 2M does nothing to increase the reported throughput value. Is this expected?
I had expected there to be a significant increase in throughput at the application level when using the 2M PHY after everything I've read about it being faster. I have verified that the PHY is changed to 2M using a Bluetooth sniffer.
Is it the case that while 2M may allow the radio to transmit data in less time, other restrictions such as the maximum number of packets per connection event, etc. prevent additional write-without response packets from being sent and thus the throughput remains the same? Or is there something I'm missing here?
Additionally, the README for the demo shows that 500 Kbps is possible (63 KB/s). However, I have only been able to achieve 46 KB/s with no changes to the demo, on ESP32-S3 boards, with IDF v5.0.2. How can I achieve the 500 Kbps number?
Thanks.
NimBLE throughput example results don't improve when using 2M PHY
-
- Posts: 10
- Joined: Thu Jun 22, 2023 10:30 am
Re: NimBLE throughput example results don't improve when using 2M PHY
Hi.
You didnt say about counterpart device/system you are using to test.
The fact you setup esp32 to use 2M PHY doesnt mean the communication is actually using 2M link, so it would be good add some logs. (i see you are using sniffer to confirm it)
What MTU, data size etc are you using during test? What do you do with data transferred?
I am assuming you are not using wifi at the same time.
You didnt say about counterpart device/system you are using to test.
The fact you setup esp32 to use 2M PHY doesnt mean the communication is actually using 2M link, so it would be good add some logs. (i see you are using sniffer to confirm it)
What MTU, data size etc are you using during test? What do you do with data transferred?
I am assuming you are not using wifi at the same time.
-
- Posts: 167
- Joined: Sun May 22, 2022 2:42 pm
Re: NimBLE throughput example results don't improve when using 2M PHY
BLE throughput is a factor of
* the selected PHY
* data length extension (DLE)
* connection parameters
* payload abstraction level
If you want to optimize everything, chose the 2M PHY, enable DLE, set connection params to optimised values, and use L2CAP instead of GATT. Then you will get over 60KB/sec.
There are two very helpful issues at the ESP-IDF GitHub, which contains more details:
- https://github.com/espressif/esp-idf/issues/13637
- https://github.com/espressif/esp-idf/issues/12789
* the selected PHY
* data length extension (DLE)
* connection parameters
* payload abstraction level
If you want to optimize everything, chose the 2M PHY, enable DLE, set connection params to optimised values, and use L2CAP instead of GATT. Then you will get over 60KB/sec.
There are two very helpful issues at the ESP-IDF GitHub, which contains more details:
- https://github.com/espressif/esp-idf/issues/13637
- https://github.com/espressif/esp-idf/issues/12789
-
- Posts: 10
- Joined: Thu Jun 22, 2023 10:30 am
Re: NimBLE throughput example results don't improve when using 2M PHY
Problem solved. I have achieved 102.5 KB/s with 2M PHY after disabling all logging output.
With 1M PHY this drops to 68.6 KB/s (a bit above the 500 Kbps (63 KB/s) given in the README).
With 1M PHY this drops to 68.6 KB/s (a bit above the 500 Kbps (63 KB/s) given in the README).
Who is online
Users browsing this forum: jsmith56x and 148 guests