Hi. I'm writing code for serial communication between an esp32-s3 and a pc.
I encounter a situation where two consecutive message packs may be sent in a row. If the client checks the serial port, finds available data, and starts to read it, with the node api, how should I determine the end of a message pack?
Let's say, I have message pack A and B. If in the serial buffer I have A and half B, when I reads the data from the buffer in the PC, is there any way to determine which part belongs to A, and which part belongs to B (needs to wait more bytes from the serial buffer)?
Hi. I'm writing code for serial communication between an esp32-s3 and a pc.
I encounter a situation where two consecutive message packs may be sent in a row. If the client checks the serial port, finds available data, and starts to read it, with the node api, how should I determine the end of a message pack?
Let's say, I have message pack A and B. If in the serial buffer I have A and half B, when I reads the data from the buffer in the PC, is there any way to determine which part belongs to A, and which part belongs to B (needs to wait more bytes from the serial buffer)?