The behavier of oFSerial and comport object on Pd is different.
oFSerial::available returns the number of bytes, and readByte returns byte itself only when the received message contains \n (ascii 13), which is highly problematic for high speed raw byte sending.
Presumably this is caused by the flags of serial fucntions.
new->c_cflag |= (CREAD | CLOCAL);
/* always nocanonical, this means raw i/o no terminal */
new->c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG);
/* no post processing */
new->c_oflag &= ~OPOST;
oflag O_RDWR | O_NOCITY | O_NONBLOCK
cflag CLOCAL | CREAD | CS8
cflag &= ~(PARENB | CSTOPB | CSIZE)
The problem is ofSerial does not canonical mode by
so without sending \n or other special character, the front ends holds the data and not release them to the receiver app.