cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with the length of GATT Charactersitic in BLE_p2pServer_ota example

ledi001
Associate III

Hello,

here in my code I want to send the received values of the payload directly to USART2. This works fine if I send less than 20 characters. If I send more, the program chrashed.

case P2P_SERVER_UART_C_WRITE_NO_RESP_EVT:
      /* USER CODE BEGIN Service1Char3_WRITE_NO_RESP_EVT */
    	uint16_t payload_Length = p_Notification->DataTransfered.Length;	// conversion uint8 Length to uint16 payload_Length
    	if(HAL_UART_Transmit_DMA(&huart2, p_Notification->DataTransfered.p_Payload, payload_Length) != HAL_OK)
		{
			Error_Handler();
		}

When I set a breakpoint and check the value of the length, a maximum value of 20 is displayed although the variable SizeUart_C = 50 (in file p2p_server.c).

Why is this the case?
What can I do to transfer more characters?

 

0 REPLIES 0