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 !

Parents
  • Strange... because doing the same, i have the following log for 20 characters :

    V 11:38:31.544 Writing characteristic 6e400002-b5a3-f393-e0a9-e50e24dcca9e (WRITE REQUEST) D 11:38:31.553 gatt.writeCharacteristic(6e400002-b5a3-f393-e0a9-e50e24dcca9e) I 11:38:31.703 Data written to 6e400002-b5a3-f393-e0a9-e50e24dcca9e, value: (0x) 61-62-63-64-65-66-67-68-69-6A-6B-6C-6D-6E-6F-70-71-72-73-74 A 11:38:31.710 "abcdefghijklmnopqrst" sent

    And this for 21 bytes :

    V 11:38:37.281 Writing characteristic 6e400002-b5a3-f393-e0a9-e50e24dcca9e (WRITE REQUEST) D 11:38:37.299 gatt.writeCharacteristic(6e400002-b5a3-f393-e0a9-e50e24dcca9e) E 11:39:07.323 Error (0x85): GATT ERROR V 11:39:07.584 Disconnecting... D 11:39:07.592 gatt.disconnect() D 11:39:07.689 [Callback] Connection state changed with status: 22 and new state: 0 (DISCONNECTED) D 11:39:07.694 Activity disconnected from the service W 11:39:07.698 Error: (0x16): GATT CONN TERMINATE LOCAL HOST

    Also i should precise that i tried it with default binaries and with two phones! (ble_app_uart_s130_pca10028.hex and toolbox from playstore)

Reply
  • Strange... because doing the same, i have the following log for 20 characters :

    V 11:38:31.544 Writing characteristic 6e400002-b5a3-f393-e0a9-e50e24dcca9e (WRITE REQUEST) D 11:38:31.553 gatt.writeCharacteristic(6e400002-b5a3-f393-e0a9-e50e24dcca9e) I 11:38:31.703 Data written to 6e400002-b5a3-f393-e0a9-e50e24dcca9e, value: (0x) 61-62-63-64-65-66-67-68-69-6A-6B-6C-6D-6E-6F-70-71-72-73-74 A 11:38:31.710 "abcdefghijklmnopqrst" sent

    And this for 21 bytes :

    V 11:38:37.281 Writing characteristic 6e400002-b5a3-f393-e0a9-e50e24dcca9e (WRITE REQUEST) D 11:38:37.299 gatt.writeCharacteristic(6e400002-b5a3-f393-e0a9-e50e24dcca9e) E 11:39:07.323 Error (0x85): GATT ERROR V 11:39:07.584 Disconnecting... D 11:39:07.592 gatt.disconnect() D 11:39:07.689 [Callback] Connection state changed with status: 22 and new state: 0 (DISCONNECTED) D 11:39:07.694 Activity disconnected from the service W 11:39:07.698 Error: (0x16): GATT CONN TERMINATE LOCAL HOST

    Also i should precise that i tried it with default binaries and with two phones! (ble_app_uart_s130_pca10028.hex and toolbox from playstore)

Children
No Data
Related