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

Data corruption in app side

Hi all, 

In my project am sending ecg values over ble to android app. During first connection, the values are received and seems to be no problem, but when i disconnect and connect again i got corrupted values in the app. In order to get the correct values, i need to close the app and start again. How to solve this issue?

Parents Reply
  • If you happen to be using something like the NUS service to transmit the data, be aware of this:

    "If there are untransmitted packets in the TX buffer where there is a disconnect, those packets will be lost. So, those packets will not be transmitted automatically upon a re-connect. Upon a re-connect, if needed, the packets will have to be put manually into the TX buffer."

    Not a problem if you are using discrete packets with some form of CRCC, but a big problem if you happen to be just streaming raw data and are not handling unexpectedly missing "chunks" in the raw data. More info ble-disconnect-packet-loss

Children
No Data
Related