Hi,
I have used "write_handler(p_ble_evt->evt.gap_evt.conn_handle, p_rtc_service, p_evt_write->data[0]);" to send data to nrf52832 from mobile but iam able to send 1 byte data as it is meant to be predefined in the gatts structure i.e
/**@brief Event structure for @ref BLE_GATTS_EVT_WRITE. */ 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. */ uint32_t data1[1]; } ble_gatts_evt_write_t;
If i want to send 32 bit data can i try making change to uint8_t data[0] as uint32_t data[0]??If this is not the right way please let me know with what changes will i be able to send 32 bit data to nrf52832 from mobile?
Thank you.