This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How can i increase throughput

Hi all !

I'm trying to evaluate the throughput i can have between a Motorola 4G and the nrf51. The nRF51 is the peripheral and the phone is acting as a central.

To do that, i've based my work on the nRFToolbox android source code and modified the uart example. It read a file and send it by chunk of 20 bytes to the BLE peripheral by writing to the characteristic with the functions "mRXCharacteristic.setValue(data);" and "writeCharacteristic(mRXCharacteristic);"

On the nRF51, i've modified the peripheral uart example as well. I use the SD130v2 with SDK11. It gather the 20 bytes messages and send them to the uart using the "nus_data_handler()"

So far, i've tested different files size and succeed on getting a data rate of 1.25kbps with packet ack and 2.5 kbps without it (setWriteType(WRITE_TYPE_NO_RESPONSE) on android) and by lowering the connexion interval to 7.5ms.

After reading

devzone.nordicsemi.com/.../ devzone.nordicsemi.com/.../ devzone.nordicsemi.com/.../how-can-i-improve-throughput-for-ble-link

, i think i understand that i can achieve better data rate by increasing the packets sent per connection event.

...But i can't find a way to do so on the android side. Can you please give me hints or guidance to send multiple packets per connection even ? Also, i don't want to use a large write :-)

Thank you !

  • your phone should have some specifications for the BLE, and maybe they can't be lowered to increase your throughput. You should search for the specification and see what can you change. Other thing is the SD you are using on the nrf51, you should use SD130 v2, because it enable more packets per connection.

    PS' and close or delete the other question, because it's a duplicate

  • I already use the SD130v2 with SDK11. I've tried the experiment with several phones (Motorola, nexus, samsung) but the change of rates was always linked with the connection interval. It just seems that there is only one 20 bytes packet send from the phone per connection interval and no queue. So my guess is i'm doing something wrong in the Android side but i can't find an example on how to send multiple packet/make them queue.

    Thanks for the quick answer !

    PS' that the first question i've ever asked here :-)

  • I don't know if this is what you already doing (sorry if it is), You can try to use the UART app on the nRFToolbox and send a message with more than 20 bytes. From what I searched your phone should be able to send/receive 4 packets per connection interval. So if you send something with 80 bytes it should be sent on the same connection interval. Can you achieve this?

    PS' a tip to you is when you edit some question or comment, if it's not a major edit you should check the box below the "save comment" which says "minor edit" that way we receive less emails ;)

  • The basic nRFToolbox does'nt allow message over 20 bytes throught uart.

    On the nrf51, the RX characteristic is define to have a 20 bytes length "attr_char_value.max_len = BLE_NUS_MAX_RX_CHAR_LEN;"

    So on the Android side, "mRXCharacteristic.setValue(data);" cannot really be filled with a 80 bytes array...or does it ?

    Changing the length to 80 bytes on both sides doesn't seems to do anything.

  • I tried mine now, On the UART app from the nRFToolbox i edited one command to right more than 20 chars, like 30, and I received 2 packets on the nRF side.

    The first packet with the first 20 bytes of the message and the second with the other 10 bytes. I'm using an Iphone, but the app should be working the same using an android.

Related