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

Maximum data sending through notification in peripheral

hello ,

I am using NRF52840 for my application, ESP32 as central and my nrf52840 as a peripheral . central always connected with peripheral. i can send data through central to peripheral in connected mode ..it is working fine..then i need to send back a 30 bytes of data through notification from peripheral to central.

for sending through notification ,

i tried with app_blink_example ...i can able to get notification as button pressed / released ..but my application needs to send 30 bytes ...is this example is preferable for sending a 30 bytes of data or need to change any services in this example ??

uint32_t ble_lbs_on_button_change(uint16_t conn_handle, ble_lbs_t * p_lbs, uint8_t button_state)
{
printf("inside butn res\n");
ble_gatts_hvx_params_t params;
uint16_t len = sizeof(button_state);

memset(&params, 0, sizeof(params));
params.type = BLE_GATT_HVX_NOTIFICATION;
params.handle = p_lbs->button_char_handles.value_handle;
params.p_data = &button_state;
params.p_len = &len;
printf("param data %d\n",params.p_data);
return sd_ble_gatts_hvx(conn_handle, &params);
}
or shall i use any other peripheral example like app_uart ?? is there any changes to do in this?

Thanks,

Parents Reply Children
No Data
Related