Hello, I have a question that I can't find an answer to in the documentation. The answer may be somewhere and I am just unable to find it.
My application utilizes sd_ble_gattc_write to send data to peripheral devices. This uses a (pointer to) a ble_gattc_write_params_t struct, which includes a pointer to the value data to be written. Does the internals of the softdevice copy the payload data from this pointer somewhere? Or is the data read from the pointer directly when the write actually occurs? I ask because I need to know if I am using malloc'ed storage, when I can free this pointer, or in the case where I use static allocation, when the contents can be updated with the next payload.
Basically my question is does the call to sd_ble_gattc_write copy the data to the Softdevice memory and then send, or does it read from the application memory during send? I will be doing both writes with response and without response if that changes anything.
I have the same question for sd_ble_gatts_hvx Will there be any problems if the pointer is freed or the data modified while writes are queued?