Long Data from UART

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

I have about 500 byte that is sent through UART and currently I am only gettin about 14 bytes through the BLE which is received by the iPhone. I understand the buffer size for UART is only 14 bytes and I tried buffering it but still no avail is there any other methods or functions that can be used to  get all the bytes?

0 Likes
1 Solution

No, there is no such callback because data received over the uart is asynchronous by nature. The driver would not know how long to wait. You have to implement a state machine that keeps track of how many bytes were received, how many were sent over the air and how many are still to be received over the uart yet. Consider using bleappevt_serialize() to post a message to your own thread or the periodic timers to check for state transitions, along with this uart interrupt callback.

View solution in original post

0 Likes
10 Replies