Hi
I am running this example from SDK 15.2.0.
I am trying to figure out how the server knows at the end of the session how many bytes of data the Peer received.
Anyone can point me to the place where the client sends this information to the server?
Hi
I am running this example from SDK 15.2.0.
I am trying to figure out how the server knows at the end of the session how many bytes of data the Peer received.
Anyone can point me to the place where the client sends this information to the server?
For the peripheral you call sd_ble_gatts_hvx() with a pointer to a buffer and a length each time you want send data. You will receive an BLE_GATTS_EVT_HVN_TX_COMPLETE event with the number of notifications that were sent:
https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v7.0.1/group___b_l_e___g_a_t_t_s___h_v_n___m_s_c.html
For the central you will get an BLE_GATTC_EVT_HVX event for each received notification with a pointer to a buffer and length for each data received:
https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v7.0.1/group___b_l_e___g_a_t_t_c___h_v_n___m_s_c.html
For the peripheral you call sd_ble_gatts_hvx() with a pointer to a buffer and a length each time you want send data. You will receive an BLE_GATTS_EVT_HVN_TX_COMPLETE event with the number of notifications that were sent:
https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v7.0.1/group___b_l_e___g_a_t_t_s___h_v_n___m_s_c.html
For the central you will get an BLE_GATTC_EVT_HVX event for each received notification with a pointer to a buffer and length for each data received:
https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v7.0.1/group___b_l_e___g_a_t_t_c___h_v_n___m_s_c.html
Hi Kenneth, thanks for the answer.
I am searching for the place where the central let's the peripheral know how many bytes it had recieved.