How to determine Bluetooth end of transmission
Unsolved
Mobile and Embedded
-
I am trying to make a host socket for Bluetooth/rfcomm that will receive serialized .json packets. Problem is I do not know the size of these packets. Documentation mentions read and read line functionality. Additionally we can determine how many bytes are waiting to be read. However I don't understand how to parse data that are unknown size and have no specific end character.
Do I have to wait for some time that data is not received to read the complete .json packet? Does rfcomm or Bluetooth even provide any functionality to determine end of the transmission? What happens when these .json packets arrive back to back?