2021-02-04 01:20 AM
Hi,
I am running the BLE_DataThroughput example for the STM32WB55 with two boards as described in the documentation- one set as a client, one as a server. I have connected the client board to a desktop PC via UART, and I am monitoring the output with PuTTy. With this setup, the highest data throughput rate I get is ~ 98 600 bytes/s as reported at the UART by the board. This is with PHY = 2M. When I press the SW2 button on the baord it switches to PHY = 1M, and the data throughput rate falls to ~2 500 bytes/s. My question is whether this is normal and how can I get the advertised 2 Mbit/s datarates for this chip, or at least something closer? The current data rate corresponds to ~ 0.8 Mbit/s.
I referred to AN5289 Building wireless applications withSTM32WB Series microcontrollers, section 7.6.5- How to maximize data throughput where it is advised that I set the connection interval and connection event length at 50 ms, which I did correctly as far as I can tell. The effect this produced was to increase the PHY=1M data rate from ~ 2 500 bytes/s to ~ 30 000 bytes/s, however the PHY=2M data rate was reduced from ~ 98 600 bytes/s to ~ 85 000 bytes/s. What am I doing wrong? How can I get the advertised 2 Mbit/s (or at least close to that)? These data rates are for the two boards almost on top of each other so loss due to range is not a problem.
2021-04-05 08:26 AM
Hi!
I have the same issue.
I used the tips from AN5289, but it didn't solve a problem. Throughput remains low for about 20 kbit/s.
If you got a result, could you please let me know what did you do?
Best Regards
Den
2021-04-05 08:58 AM
Hi,
No, unfortunately, I do not have an answer yet. I will post here if I find a working solution. Please do the same if you come up with one first. Meanwhile I am looking at Nordic Semiconductors' forums as it seems they offer better support and more discussion. The microcontroller they offer is quite similar. I think they use the same Bluetooth stack so my thinking is that if it is some parameter configuration that would allow fast data rate, it would work both on the STM32WB55 and the nRF.
Best,
Svet
2021-04-12 06:25 AM
Hi,
When I tried the example back in February I managed to get a throughput of 171 kBytes/s (close to theoretical maximum). I have since tried to recreate the performance with a custom service, though without any luck as my throughput is limited to 47 kBytes/s. So I tried to go back to the data throughput example to see what I did differently.
Going back to the data throughput example I can now reach a maximum of 153 kBytes/s with the following settings.
In app_conf.h
#define CFG_TX_PHY 2
#define CFG_RX_PHY 2
In app_ble.c -> Connection_Update(void)
I changed the CONN_P1_400 and CONN_P2_400 to CONN_P2_50 and CONN_P2_50. I know data throughput should be best at 400 ms but I got better results this way.
And most importantly I build the project with release setting instead of debug, in CubeIDE. This increased both the throughput and stability of the connection.
Does these settings help you, @DHunt.1 and @SStoy.1 ?
(I still haven't managed to increase throughput on my custom service above the 47 kBytes/s)
Best,
Robert
2021-04-13 05:35 AM
Hi,
First, thank you for replying! I have tried these configurations of
#define CFG_TX_PHY 2
#define CFG_RX_PHY 2
and changing the CONN_P1_400 and CONN_P2_400 to CONN_P2_50 and CONN_P2_50 but unfortunately, I was unable to get such a good result. I also tried building with release instead of debug settings. This refers to the little drop-down menu that pops up from the little hammer 'build' button in STM32CubeIDE, correct? Unfortunately, this did not improve throughput for me either. I am still stuck at ~96000 bytes/s.
Is it possible for you to upload the project where you manage 150-170 kBytes/s so that I can test my boards with it?
Best,
Svet
2021-04-14 12:22 AM
2021-04-14 08:20 AM
Hi!
Thank you for feedback.
How did you test the throughput? I adapted your example for my application and was transmitting data via notify with aci_gatt_update_char_value_ext API ( 1 packet = 243 bytes) and achieved only 20 kbytes/s (both devices are 5.0 BLE). I called this function in systick interrupts every 5ms and got BLE_STATUS_INSUFFICIENT_RESOURCES periodically. Then I decided retransmit packets while API didn't return BLE_STATUS_SUCCESS. That was I were doing. Would you please tell me what's wrong in my coding?
Best,
Den
2021-04-14 10:19 AM
Hi Robert,
Thanks for your persistent help. I imported your project as is and I am still getting the same throughput~ 90 kBytes/s. I am wondering whether it might have to do something with the fact that I am using 2 separate nucleo boards to run this. You mentioned a dongle. Does that mean you are using the little dongle that arrives with the nucleo board? As far as I remember these were to be used as some sort of an RF testing tool and they do not have a debugger so you have to connect them to one to program them. Is that what you did?
Best,
Svet
2021-04-14 11:55 PM
Hi,
I don't think there is anything wrong with using 2 separate Nucleo boards, but I haven't tested that.
Soldering pins on the dongle makes it much easier to program and work with.
This is my setup:
Hope this helps,
/Robert
2021-04-18 07:39 AM
Hi Robert,
This is an interesting setup, thanks for showing it. I could not make the 2 nucleos to transmit at more than 90 kBytes/s unfortunately. For the record, I made sure to have the latest FUS and the full BLE stack flashed on them as per the instructions in the readme.txt file in the folder of the example. I do not see why I am not getting the transfer rates that you are.
I am now trying to set up a dongle to act as the receiver as you have done. May I ask how you transmit to your PC over UART from the dongle? is that what the 3 wires on the bottom you have connected to the dongle are for?
Can you also please tell me whether
#define CFG_BLE_CENTRAL
#define CFG_SERVER_ONLY
are the only parameters you change when uploading the BLE_DataThroughput example to your boards? I tried with the following:
#define CFG_BLE_CENTRAL 0
#define CFG_SERVER_ONLY 1
on one board, and then
#define CFG_BLE_CENTRAL 1
#define CFG_SERVER_ONLY 0
on the other, as instructed in the readme.txt of the example.
Best,
Svet