hello,
I'm trying to send long (73B) data on a given characteristic using Android client as the central.
I well received:
- USER_MEM_REQUEST OK
> #define BLE_TDS_MAX_LONG_WRITE 256
> case BLE_EVT_USER_MEM_REQUEST:
> > NRF_LOG_DEBUG("BLE_EVT_USER_MEM_REQUEST\r\n");
> >
> > mem_buffer.len = BLE_TDS_MAX_LONG_WRITE;
> > mem_buffer.p_mem = (uint8_t *) malloc(BLE_TDS_MAX_LONG_WRITE);
> >
> > uint32_t err_code = sd_ble_user_mem_reply(p_tds->conn_handle, &mem_buffer);
-
BLE_GATTS_OP_EXEC_WRITE_REQ_NOW
case BLE_GATTS_OP_EXEC_WRITE_REQ_NOW: NRF_LOG_DEBUG("BLE_GATTS_OP_EXEC_WRITE_REQ_NOW\r\n"); handle = *(uint16_t*) mem_buffer.p_mem; // offset = *(uint16_t*) (mem_buffer.p_mem+2); len = *(uint16_t*) (mem_buffer.p_mem+4); buffer = (uint8_t *) (mem_buffer.p_mem+6);
when reading mem_buffer, the handle is correct but the len is only 18 bytes.
NB: the first 18B in the buffer are correct.
And I dont understand why I dont see the intermediate BLE_GATTS_OP_WRITE_REQ