Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

Bluetooth SDK Forum Discussions

senfrost
Level 1
Level 1
First like received 10 sign-ins 5 questions asked

Hi,

I am new to BLE and if I am trying to send data with a MTU size of 67 but after i use wiced_bt_gatt_server_send_mtu_rsp with mtu of 67 in response to a mtu of 512.

I get a GATT_GET_RESPONSE_BUFFER_EVT and I do not know what functions to call to correctly handle this event as I can not find any functions in the wiced_bt_gatt.h  header file that I should be using to respond to this event

any help would be greatly appreciated and thanks in advance

Senfrost

1 Reply
NidhiH_76
Employee
Employee
10 sign-ins 5 sign-ins First solution authored

Hi senfrost,

GATT_GET_RESPONSE_BUFFER_EVT is an event where the stack asks the application for memory(buffer). It uses the memory sent by the app to send GATT responses and then returns it via the event ATT_APP_BUFFER_TRANSMITTED_EVT

The application needs to allocate the length of buffer asked by the stack and send it to the stack in the GATT_GET_RESPONSE_BUFFER_EVT. You may choose to use static or dynamic memory. Note that, the app should not alter the value at the memory that it has sent to the stack until it is returned via ATT_APP_BUFFER_TRANSMITTED_EVT. You can reuse or free the memory once it is returned via ATT_APP_BUFFER_TRANSMITTED_EVT.  

The CE - Bluetooth LE Findme, shows how an app can handle the mentioned events: https://github.com/Infineon/mtb-example-btstack-freertos-findme/blob/master/main.c#L396 

Hope this helps!

This widget could not be displayed.