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

ble_app_uart TX Characteristic doesn´t work

Hi,

I flashed and run "ble_app_uart" example on nrf52833 DK. With an UART tool, I can recieve data from smartphone (rx characteristic) but I can´t send data from UART tool to smartphone. I pushed the "download arrow" in tx characteristic on smartphone. I sent just a character from UART tool. I didn´t do any modifications to the example.

Do I have to do something other?

Thanks in advance

Simon

Parents Reply
  • You have to enable notifications yes. However data is not sent from the peripheral until buffer is full (20bytes) or there is a new line character. It should be fairly easy to type >20 characters, can you try it?

    Edit: Looking at the code I can see that the buffer size if dynamically updated (m_ble_nus_max_data_len) in gatt_evt_handler(). So it may be more than 20bytes. If you want you can change implementation in gatt_evt_handler() so that you can set it fixed to for instance 20bytes or less for testing.

    In any case you can check in uart_event_handle() that data will be sent either when received UART data equal m_ble_nus_max_data_len or that a new line character have been received (typically by pressing Enter on keyboard).

    Best regards,
    Kenneth

Children
Related