Hello All,
I have used BLE peripheral example as reference where i have addded one characteristics in which i want to exchange data of around 180 bytes.
I am able to send 180 bytes of data to mobile application (tested on BLE Scanner for iOS and nrf Connect for Andriod) ,
However, when i want to notify the same data using app i am not able to get correct data in one shot,
That is in firmware i made a provision that when i receive a certain command from BLE application the firmware should reply with these 180 bytes of data,
but when i check this in application i get only half data and then when i renotify the data comes correctly.
So please help me soo that i can get this data correct and full in one shot,
I have attached images for reference below
Please Help at the earliest.
Thanks and Regards
Utkarash

Hi Utkarash,
If you check the page 2 from your attached file (“Half data receive”), you will see that you get 20 bytes which is expected. Regarding the notifications, the number of bytes that a device can send over notification of a characteristic is limited by the MTU (Maximum Transfer Unit), the MTU by default is limited in 23 bytes including the ATT layer overhead, so the payload of a notification is 20 bytes. By increasing the MTU size that means that you can send more bytes over one notification, so in your case the maximum transfer unit should be the amount of bytes you would like to send + 3 extra bytes. You should change the .max_mtu of the user_gapm_conf structure of the user_config.h header file. After doing that in order to perform the exchange with the central you should send the GATTC_EXC_MTU_CMD when you have a connection (in the user_on_connection) and the 580 will perform the exchange. There is no API implemented that does this but you can use the snippet below:
static void user_gattc_exc_mtu_cmd(uint8_t conidx)
{
struct gattc_exc_mtu_cmd *厘米d = KE_MSG_ALLOC(GATTC_EXC_MTU_CMD,
KE_BUILD_ID(TASK_GATTC, conidx), TASK_APP,
gattc_exc_mtu_cmd);
cmd->req_type = GATTC_MTU_EXCH;
ke_msg_send(cmd);
}
Thanks, PM_Dialog
感谢你的回复,
I will try out changes as per your suggestion.
Thanks and Regards
Utkarash