Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

BLE Throughput and DFU

Our nRF52832 software detects the arrival of characteristics via writes from the Central and reformats the contents and sends them out in a UART message.
I've built an Android app to write characteristics (in this case, one 9-byte and twelve 8-byte characteristics) as fast as possible.  Following the model in the Nordic nRF Toolbox HTS project (available from Github), I have the Bluetooth stuff in an Android Service, and the specific transaction performed in an Android Activity:
Activity: Request a send of a characteristic.
Service: Wait until the Bluetooth subsystem says it was successful (callback from writeCharacteristic()).
Service: Send an Intent to the controlling activity.
Activity: Upon arrival of the Intent, request a send of the next characteristic.
I monitor the serial line with a scope.  I see the messages emerge at about 80 millisecond intervals.
This seems excessive.  I gather the Central device (Android BLE subsystem) controls the Connection Interval, but I see that the minimum for BLE is 7.5ms.  I was expecting the inter-message gap to be more in the 10-20ms range.
We note the DFU seems to ship a lot of data very fast over a BLE link.  Is DFU doing something different than above?
Parents
  • Could you post the preferred minimum and maximum connection interval configuration in the nRF52 application? Also are you using the default ATT MTU size, i.e. is NRF_SDH_BLE_GATT_MAX_MTU_SIZE set to 23? It would also be useful to know the Android version as well as what hardware you're using on the central side. 

    Lastly, please state which SDK version and SD version you're using.

     

  • The Central is a Nexus 7 tablet running Android 6.0.1.  The Android SDK project is targeting SDK version 27.

    The Peripheral is a nRF52 DK.

    I'm using SDK 15.0.0 with SoftDevice s132 ver 6.0.0

    I started with MIN_CONN_INTERVAL of 20ms and MAX_CONN_INTERVAL of 75ms, but the measurement made above was with both set to 6 (x 1.25 = 7.5ms).  It seems to have shrunk the time, but not by much.  The actual interval is different every time I perform a connect.  I just tried it again, and it's 98ms.

    From sdk_config.h:
    #define NRF_SDH_BLE_GATT_MAX_MTU_SIZE 23

Reply
  • The Central is a Nexus 7 tablet running Android 6.0.1.  The Android SDK project is targeting SDK version 27.

    The Peripheral is a nRF52 DK.

    I'm using SDK 15.0.0 with SoftDevice s132 ver 6.0.0

    I started with MIN_CONN_INTERVAL of 20ms and MAX_CONN_INTERVAL of 75ms, but the measurement made above was with both set to 6 (x 1.25 = 7.5ms).  It seems to have shrunk the time, but not by much.  The actual interval is different every time I perform a connect.  I just tried it again, and it's 98ms.

    From sdk_config.h:
    #define NRF_SDH_BLE_GATT_MAX_MTU_SIZE 23

Children
No Data
Related