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

nRF52832 v11 SDK and UART Service Transfer Size

I'm using an old version of the nRF5 SDK (v11.0.0, SoftDevice v2) as supported by the SparkFun nRF52832 breakout board and the Arduino BLEPeripheral library.

Having set up a UART service to transfer sensor data between my custom board and my custom app, I'm hitting a bottleneck when it comes to connection interval vs data throughput. 

My understanding is that presently, a maximum of 20 bytes can be transferred per connection interval and if this is so, how can I change this so that I can send more data per connection interval? Is it even possible to do so using such an old version of the SDK and SoftDevice?

Also, is anyone able to advise how I can verify connection intervals? For example, I set a connection interval of, say, 7ms but how do I know that 7ms is actually being adhered to or applied? 

Thanks in advance.

  • Hi,

     

    My understanding is that presently, a maximum of 20 bytes can be transferred per connection interval and if this is so, how can I change this so that I can send more data per connection interval? Is it even possible to do so using such an old version of the SDK and SoftDevice?

    For a longer MTU size with the nRF52832, you have to upgrade to atleast SDK v12 (or newer).

    What you could do is to try to send packets until you get an err_code != NRF_SUCCESS, where the peripheral will try to send several packets per connection interval. Note that this number will vary, as different centrals have different buffer sizes depending on the chipset used and operating system they're running.

    Also, is anyone able to advise how I can verify connection intervals? For example, I set a connection interval of, say, 7ms but how do I know that 7ms is actually being adhered to or applied? 

    You can get the current connection interval in the BLE_GAP_EVT_CONNECTED event (.max_conn_interval and .min_conn_interval is equal when the initial connection is made):

    initial_conn_interval = p_ble_evt->evt.connected.conn_params.max_conn_interval;
     
    Note that in most cases, this initial interval will change, as you are initially given a interval from the central device.
    You can negotiate the connection parameters using the ble_conn_params library, where the defines "MIN_CONN_INTERVAL" and "MAX_CONN_INTERVAL" shall be requested.
    Kind regards,
    Håkon
Related