2024-11-27 06:42 AM
Hi,
I use the example BLE_p2pServer_ota and want to transfer 20 bytes of data to UART2 within a characteristic. But i only get the value 1 for sizeof(p_Notification->DataTransfered.Length).
case P2P_SERVER_UART_C_WRITE_NO_RESP_EVT:
/* USER CODE BEGIN Service1Char3_WRITE_NO_RESP_EVT */
sizeOfPayload = sizeof(p_Notification->DataTransfered.p_Payload);
if(HAL_UART_Transmit_DMA(&huart2, p_Notification->DataTransfered.p_Payload, sizeof(p_Notification->DataTransfered.Length)) != HAL_OK)
{
Error_Handler();
}