Skip to main content
Javier1
Principal
January 14, 2022
Solved

Real raw data troughput of BLE (STM32WB5M<-->android phone)

  • January 14, 2022
  • 3 replies
  • 2559 views

Hi i am developing a BLE-UART bridge with an STM32WB5M.

I am guetting around 1,85 KB/s data troughput, is this normal?

Did anyone pull this off with greater data troughput? (same uart thing or any streaming application)

0693W00000HrejAQAR.png

This topic has been closed for replies.
Best answer by Javier1

I found out the data trougput depends a LOT of the BLE chipset of the android phone/device.

My phone didnt have BLE5.0 2M high speed support.

Newer i-phones and Samsung phones/tablets would be able to archieve this data trougputs.

0693W00000KdMrtQAF.png

3 replies

Javier1
Javier1Author
Principal
January 14, 2022

Increasig baudrates:

  • 115200 total transmission time= 70seconds
  • 230400 total transmission time= 70seconds
  • 460800 total transmission time= 70seconds
  • 921600 clogs the STM32WB fifos, too fast, faster than the BLE is serviced?
hit me up in https://www.linkedin.com/in/javiermuñoz/
Remi QUINTIN
Technical Moderator
January 18, 2022

When increasing the baud rate, you need to manage the flow control of the UART port. is it the case?

You can have a look at the BLE_DataThroughput project to see the maximum achievable throughput.

Javier1
Javier1Author
Principal
January 18, 2022

thanks @Remi QUINTIN​ 

I had a couple of bugs going on regarding my DMA handling of the uart, i still need to get into that.

>>When increasing the baud rate, you need to manage the flow control of the UART port. is it the case?

I very didnt, thats maybe why my programm crashed.

>>You can have a look at the BLE_DataThroughput project to see the maximum achievable throughput.

Thanks!, just what i needed.(i find here people managing to get up to 90KBs data transfers with BLE_DataThroughput example, that would work for me)

I am about to drop the towel with BLE because i need a data troughput an order of magnitude higher than 2kB/s.

I seen in this ST OTA demo video they get around 180B/s speed (thats even worse)

hit me up in https://www.linkedin.com/in/javiermuñoz/
Javier1
Javier1Author
Principal
January 18, 2022

i ran the BLE_DataThroughput example with PHY=2MBs0693W00000JMMzkQAH.png 

The terminal says im transmitting in between 170KB/s and 75KB/s.

0693W00000JMMzuQAH.png 

Those are great news, but now i have more questions

  • Are this speeds going to be replicable with an Android deice instead of two ST modules?
  • Are we talking about "real" data? no transport layer nor GATT nor anything just the notification characteristic data?

Searching for what data is being accounted for:

inside dt_client_app.c:

static void DataThroughput_Calculation( void )
 {
 uint32_t MoyData;
 
 if (Nbr_packet < 600)
 {
 Nbr_packet++;
 TotalDataReceived += DataThroughputValue;
 }
 if (Nbr_packet == 600)
 {
 MoyData = TotalDataReceived / 600;
 APP_DBG_MSG("Moy = %ld bytes/s \n",MoyData);
 TotalDataReceived = 0;
 Nbr_packet = 0;
 }
 
 APP_DBG_MSG("DT = %ld bytes/s lost = %ld \n",DataThroughputValue, packet_lost_local);
 }
 
 static void DataThroughputTimer( void )
 {
 DataThroughputValue = (uint32_t)(DataTransfered / TIMEUNIT);
 packet_lost_local = (uint32_t)(packet_lost / TIMEUNIT);
 DataTransfered = 0;
 packet_lost = 0;
 
 UTIL_SEQ_SetTask(1 << CFG_TASK_APP_DATA_THROUGHPUT_ID, CFG_SCH_PRIO_0);
 return;
 }

 It looks indeed like its the real data troughput

DataTransfered += NotificationData.DataTransfered.Length;

hit me up in https://www.linkedin.com/in/javiermuñoz/
Remy ISSALYS
Technical Moderator
March 18, 2022

Hello,

The data throughput is smaller with an Android device than between two STM32WB because the smartphone choose the connection interval and the CE length. The peripheral can request a new connection interval (the smartphone can accept it or not) but it can't modify the CE length. You can use ST BLE Toolbox application, that allow to do data transfer measurement (uplink and downlink).

The data throughput computation is done at GATT level.

You can look AN5604 to have more informations.

Best Regards

Javier1
Javier1AuthorBest answer
Principal
March 21, 2022

I found out the data trougput depends a LOT of the BLE chipset of the android phone/device.

My phone didnt have BLE5.0 2M high speed support.

Newer i-phones and Samsung phones/tablets would be able to archieve this data trougputs.

0693W00000KdMrtQAF.png

hit me up in https://www.linkedin.com/in/javiermuñoz/