pyftdi icon indicating copy to clipboard operation
pyftdi copied to clipboard

Sample code to strip out the 2-byte modem markers every 512 bytes

Open Tunneller opened this issue 3 years ago • 0 comments

My reading of the docs is that the "raw" UART string contains some internal information, then a 2-byte modem marker then payload, but that every 512 bytes there is inserted additional modem markers. Moreover, read_data will strip out not just the internal information but also the very first modem marker so that bytearray starts with good data. So if

b = read_data ()

then is the good data b[0],....b[511], b[514],b[515],.... or is it b[0],....b[510], b[513],b[514], etc.

And the above is independent of chunk size, correct?

Thanks, T.

Tunneller avatar Aug 04 '21 21:08 Tunneller