Serial Parity changing within stream.

Hi.

I have a project where I need an Arduino to interface with a device that sends out messages in the form of:

header-body-checksum, of which:

Header is three bytes long and 8E1 (8 bit, Even Parity, 1 Stop Bit) Body is variable length and 8O1 (8 bit, Odd Parity, 1 Stop Bit) Checksum is 1 byte long and also 8O1.

Is there any way to cater for the changing of parity checking in the same serial stream? Possibly using the Mega and 2 x hardware serial ports set to different parity?

Many Thanks

Biffa

I have a project where I need an Arduino to interface with a device that sends out messages in the form of:

Are you reading the serial data or trying to send it? Your description says read. I'm not sure what happens with the serial library if you specify parity in begin and it does not match. If it ignores parity then you may still receive the 8 data bits okay.