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

No BLE_GATTS_EVT_HVC event generating when using S140 for bluetooth 5

Hi,

I'm using s140_nrf52840_5.0.0-2 and there are two characteristic for the peripheral, notification and indication. When I use notification to send data, I will get the BLE_GATTS_EVT_HVN_TX_COMPLETE event. But when I use indication to send data, I couldn't get the BLE_GATTS_EVT_HVC event, so I couldn't confirm the data have been sent to the master.

uint32_t Send_Indicate(uint8_t *send_data, uint16_t data_len){	
uint32_t err_code;
ble_gatts_hvx_params_t hvx_params;
memset(&hvx_params, 0, sizeof(hvx_params));			
hvx_params.handle = m_clife.rx_handles_indic.value_handle;
hvx_params.type   = BLE_GATT_HVX_INDICATION;
hvx_params.p_data = send_data;	
hvx_params.p_len  = &data_len;		
err_code = sd_ble_gatts_hvx(m_clife.conn_handle, &hvx_params);}
Parents Reply Children
No Data
Related