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

UARTE Driver Help

Good afternoon

i have built a small program for the uarte, using the example however im not managing to edit the event handler such that depending onthe text i recive i perform certain tasks.

Basically i would like to implement some function which include 3 chars and a termination bit ($) example ENA$ (enable bit ) .

may i please get some guidance or help

Parents Reply
  • This is not a nordic related "issue", or an "issue" at all, really. 

    If you know that the message will always end with "$", then you need to check the three bytes before that. I suggest you look at the ble_app_uart example for how to store the incoming data. You will get an event for each incoming byte, but this example checks if the last byte is a linefeed, or if the buffer is full. At that point, it will send the packet over BLE. Perhaps you can reuse some of the same logic to do what you want to do. 

    Best regards,

    Edvin

Children
Related