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

How to write mutiple bytes to a GATT server in nrf52840?

I have created one characteristic in which i am trying to write multiple bytes at the same time i want to use that for further processing, how to access that whole data which i am sending through client. As per current SDK 15.3, we are reading the data through below SDK structure

typedef struct
{
uint16_t handle; /**< Attribute Handle. */
ble_uuid_t uuid; /**< Attribute UUID. */
uint8_t op; /**< Type of write operation, see @ref BLE_GATTS_OPS. */
uint8_t auth_required; /**< Writing operation deferred due to authorization requirement. Application may use @ref sd_ble_gatts_value_set to finalize the writing operation. */
uint16_t offset; /**< Offset for the write operation. */
uint16_t len; /**< Length of the received data. */
uint8_t data[1]; /**< Received data. @note This is a variable length array. The size of 1 indicated is only a placeholder for compilation.
See @ref sd_ble_evt_get for more information on how to use event structures with variable length array members. */
} ble_gatts_evt_write_t; 

But here Data size is restricted to one byte, how to increase this size, if this size is there any impact on the BLE layers including stack. Is there any other way to increase the size of this structure without impacting the other layers in my application.

Related