cancel
Showing results for 
Search instead for 
Did you mean: 

wrong transmission through BLE data writing in STM32WB55

KKIM.6
Senior

 

I programmed a microcontroller to return received text data from BLE using UART.

However, I can get only 4 alphabet clearly and the next alphabet becomes broken.

For example, If I send the text "aaaaaa", then the microcontroller return "aaaa0(9)??" or "aaaa,(<)??"

The broken text is quite random.

I'm sending a text using my custom program after transforming it to UTF8.

I programmed the microcontroller below to return text in the event handler code in custom_stm.c.

====================================================

char* text = (char*)(attribute_modified->Attr_Data); 
char output_text[strlen(text) + sizeof("received data: ") + 1]; 
sprintf(output_text, "received data: %s", text); 
APP_DBG_MSG(output_text);
APP_DBG_MSG("\n"); 

=====================================================

I think it may be problem of number of packet.

Is there any suggestions?

 

 

 

 

0 REPLIES 0