Using read() with Framing char

I’m interfacing with a device that uses character framing(0x7e) in it’s communication protocol. Is read() with FORWARD CHAR set in the struct termios what I should use?
So far:

// Set struct termios
ret = tcgetattr( fd, &termio );
termio.c_cc[VFWD] = 0x7e;
termio.c_cc[VTIME] = 5;
ret = tcsetattr( fd, TCSANOW, &termio );
// prepare and write the command to fd...
// flush
readcond(fd, buf1, 30, 0, 0, 0);
// read 1 byte
tmp = readcond(fd, buffer, 1, 1, 0, 2);
if(buffer[0] == 0x7e)
{
// keep on reading until next framing char
tmp = read(fd, &buffer[1], 29);
}
else
{
// Flush...
readcond(fd, buffer, 30, 0, 0, 0);
}

Is it the way of using it?
It works, but it misses ~ 20%…
TY!

in SDLC/HDLC like protocols (and derived from them as PPP, etc) flag character must be sent directly after data was sent. But behaviour depends on your physic line, if your physic line is synchronous then it requires a framing character immediately after data. But anyway I didn’t see why to not send framing char directly without using that tty weirdness ? :wink: