This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

UART Application Problem

Hello,

For my experience, I am using two nRF52 DK. The first is programmed with the "ble_peripheral/ble_app_uart" application and the second is programmed with the "ble_central/ble_app_uart_c" application.

I am sending 32 bytes each second on the UART of peripheral and my problem is than I receive (on the UART of central) 64 bytes each 2 second. Why?

Thank you

Parents
  • Hello,

    I am terribly sorry for the late reply.

    So you are sending 32 bytes on the physical (!) uart every second, is that correct? 

    First, what SDK are you using? 

    What is your m_ble_nus_max_data_len value?

     

    If you look inside the function: uart_event_handle() in main.c (may be called something else, depending on your SDK version), you will see that the uart handler checks if either the last byte was a '\n', or if the number of elements in the buffer is larger or equal to m_ble_nus_max_data_len. Have you tried to add '\n' to the end of the string that you send over uart every second?

     

    Best regards,

    Edvin

Reply
  • Hello,

    I am terribly sorry for the late reply.

    So you are sending 32 bytes on the physical (!) uart every second, is that correct? 

    First, what SDK are you using? 

    What is your m_ble_nus_max_data_len value?

     

    If you look inside the function: uart_event_handle() in main.c (may be called something else, depending on your SDK version), you will see that the uart handler checks if either the last byte was a '\n', or if the number of elements in the buffer is larger or equal to m_ble_nus_max_data_len. Have you tried to add '\n' to the end of the string that you send over uart every second?

     

    Best regards,

    Edvin

Children
No Data
Related