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 nrfconnect mobile app but iam able to send 1 byte data as it is meant to be predefined in the gatts structure .
/*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.
*/
} ble_gatts_evt_write_t;
In many nordic forum told that you have to split the 32 bit data into an array of uint8_t(s) and and set that array equal to ble_gatts_evt_write_t ->data. ble_gatts_evt_write_t ->len .
But my query is that when i putting the value in nrf connect app in unknown characteristics and write the value there as in uint32_t form for eg:653655 and the recieving the data in nrf52833 as
p_evt_write->data[0] which is uint8_t data[0] unable to receive the data properly.please give the example or what changes i have to do so that receive the data properly.
