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

s140 - GATTS Handle Value Notification

Hi everyone,

I am trying to understand the GATTS Handle Value Notification diagram.

From what I have understand so far is tha the soft device keeps a buffer (ATT table) where packets are placed before transmission. So each time calling sd_ble_gatts_hvx function the payload is stored in ATT table right?

With nRF52840 and s140 it is possible to transmit up to 6 packets in the same connection interval using notifications (with indications I think is just one packet?). The packets that have been stored in ATT table are transmitted in the next connection interval? If for example there are 6 packets in ATT table they will be transmitted in the same next connection interval?

BLE_GATTS_EVT_HVN_TX_COMPLETE event occurs when a packet has been sent over the link layer (notification transmission), meaning that the sd buffer has free space right?

If there is no acknowledgment from the Link Layer (BLE_GATTS_EVT_HVN_TX_COMPLETE event) the packet remains in sd buffer and re-transmitted?

Using notifications, you are allowing to queue a certain number of packets before sending them. If the tx buffer is full the sd_ble_gatts_hvx() will return the NRF_ERROR_RESOURCES error. In that case, you have to wait for the BLE_GATTS_EVT_HVN_TX_COMPLETE event meaning that the tx buffer has some free space right?

What is the reason that will cause sd buffers to get full and hence to return the NRF_ERROR_RESOURCES error?

Finally looking at the GATTS Handle Value Notification diagram I cannot understand in Variant#2 why only app_value_1 is transmitted.. I would expect both app_value_1 & 2 to be transmitted.

Also in Variant#1 of  GATTS Handle Value Notification diagram, when trying to add app_value_3 in ATT table, NRF_ERROR_RESOURCES returns, while after adding  app_value_4 it returns NRF_SUCCESS. I cannot understand this.. Could you please explain?

Thanks in advnace

Nick

Parents Reply Children
No Data
Related