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

Increasing the data packet without DLE as my central device uses BLE v4.1

Before I explain my issue I wanted to be sure on my basics, so here is my understanding after doing the research in nordic devzone

I'm using nrf52832 with sdk15

1) BLE v4.1 doesn't support DLE

2) Maximum number of packets that can be sent is 6, even for BLE v4.2 and this is by default set to 6 packets by the softdevice S132 v6

3) To increase the packet size, I have to increase the ATT_MAX_MTU from 23 to 247 (in my case), enable gap event length extension, increase the gap event length extension.

Now coming to my issue, I have increased the MTU size from 23 to 247, enabled the gap event length extension and set it to 12 (1.25*12 = 15ms. Because my connection interval is 15ms) and increased the size of the softdevice tx buffer to 20 

ble_cfg.conn_cfg.params.gatts_conn_cfg.hvn_tx_queue_size = 20;

My connection interval is set to 15ms. Now I'm trying to send 50 bytes of data every 15ms, but I get an NRF_ERROR_RESOURCE. I know that the error occurs because the softdevice buffer is full.

I'm counting the number of packets being sent from the nrf using "p_ble_evt->evt.gatts_evt.params.hvn_tx_complete.count;" in the BLE_GATTS_EVT_HVN_TX_COMPLETE event and it always shows as 1. So i'm assuming that my central device can handle only one packet per connection. My central device is HTC One m9 which has BLE v4.1. My doubt is, what is the packet size now ? the packet size in the gap layer is restricted to 27 bytes because I cant implement DLE so if im sending 50 bytes, then 50-27 = 23 bytes are always being queued in the tx buffer of the softdevice. Am I correct on this? Is this the reason why softdevice buffer gets full.

When I use a different central device Oppo mobile, this error seems to be resolved, but even the oppo mobile was receiving one packet.

The only difference is that HTC one m9 minimum connection interval is 11.25 ms and Oppo's is 7.5ms but this shouldn't matter as my connection interval is 15ms. I'm kind of lost right now so any kind of help would really help me understand nordic and ble better.

Parents Reply Children
No Data
Related