Hello,
I'm currently working on creating a custom characteristic so that my client can read a set of data from the server.
My intention is to have a server gather information and put this inside a buffer(200 ish bytes), the client initiates a read and reads the entire buffer from the server.
I've used an example and tutorial to create a custom characteristic (nRF52-Bluetooth-Course), which works except for the read part.
I've copied/pasted the add function and added an extra custom handles (ble_gatts_char_handles_t custom_array_handles;)
I can toggle an LED on the board if I enable or disable notifications for this characteristic in the on_write function but I do not know how to set up my data for reading.
If I use the app to read from this characteristic I get 200 bytes but I do not know where these bytes are located or how to link it to my buffer. Its just random data from somewhere in memory.
I do not intend to use the ble_nus services which are described in a lot of examples for reading from Bluetooth because (correct me if I'm wrong) it is limited to a small data payload and I need to send the 200 ish bytes in one packet.
I saw something about "BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST" but I do not know how to implement this properly.(https://devzone.nordicsemi.com/f/nordic-q-a/14215/nrrf2-gatt-attribute-read-callback)
I can post my current settings for this characteristic if that is necessary to help me out.
Kind regards,
T IJ