Something has been bothering me for years. I work with a lot of bluetooth and recently wifi streams (spp). These streams always connect to specific devices, and communication is done using simple byte commands.
I program some of the devices (their microcontrollers) myself and there, I should always check if there is a signal on the wire, what I expect, send and check on crcs.
Somehow I want to do the same on my smartphone, because I access my streams using readByte and read bytes by bytes, and I always wonder if it is possible that a) one byte from the message may be missing b) messages arrive mixed or "out of sequence"
I do not know how this works. Does it check every message with crc and request the message again if it was damaged? Or does he blindly pass every byte to my readByte method?
If the device sends a message a and then b, is it possible that the recipient receives b before a and sends my code b to or even mixes bytes such as lightning and gives me [0], then b [0], then [1 ] etc.
How much trust do you have in these flows? Some clarifications will be appreciated.
source share