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

Configuration of GAP event length

Hi,

First i want to know what is the relationship between connection interval and GAP Event Length.

In one test condition I configured as:

connection interval = 7.5ms & GAP Event Length = 7.5ms

Data throughput I am getting around 250kbps. 

In other test condition I configured as:

connection interval = 7.5ms & GAP Event Length = 500ms

Data throughput I am getting around 1046kbps or 1Mbps.

In general is there any guide or manual which contains what are connection parameters & how connection parameters configured or finetuned according to requirement.

one more query How data sending(notification) works. Is it send real time or storing a data in internal tx queue is mandatory before connection event starts.

what is the default size of hvn_tx_queue_size or Handle Value Notification Queue length. 

  • Hi,

    connection interval = 7.5ms & GAP Event Length = 500ms

    It is not possible to have a event length that is longer than a connection interval, so I am not sure how you get that result. Perhaps the connection interval is not what you think?

    In general is there any guide or manual which contains what are connection parameters & how connection parameters configured or finetuned according to requirement.

    The connection interval is the interval at which a new connection event is started, i.e. how often devices communicate. The event length is the duration of this event. The longer teh event, the more data can be exchanged (mean larger and/or more data packets). This guide is quite good in explaining how it works.

    one more query How data sending(notification) works. Is it send real time or storing a data in internal tx queue is mandatory before connection event starts.

    Data is only exchanges in a connection event, so it has to be queued. That applies to all types of data that is exchanged in a connection, inclduding notifications.

    what is the default size of hvn_tx_queue_size or Handle Value Notification Queue length. 

    This depends on which Bluetooth stack you are using. If you are using a recent SoftDevice, then BLE_GAP_EVENT_LENGTH_DEFAULT specifies the default, which is 3*1.25 ms = 3.75 ms. If you use the nRF5 SDK, then the SoftDevice handler library sets this value, and you should look at the NRF_SDH_BLE_GAP_EVENT_LENGTH in sdk_config.h. Different examples use a different value by default. To optimize throughput you should have a fairly large NRF_SDH_BLE_GAP_EVENT_LENGTH and use long packets, meaning set NRF_SDH_BLE_GATT_MAX_MTU_SIZE to 247 (highest possible value).

  • Can you please tell me what is the relationship between hvn_tx_queue_size  & NRF_SDH_BLE_GAP_EVENT_LENGTH .

     

  • The SoftDevice will automatically scale the queue to the event length, so that you will be able to fit enough packets in the queue to transmit data during the entire event. See this post.

Related