Serial communication, detecting parity bits



Hello!

I'm in the process of writing some code that will use RS-232 and a somewhat old protocol to speak to some external hardware. The protocol specifies that the first byte of each protocol packet will have its wakeup bit or parity bit set. I need to find these marked bytes in order to determine where each packet starts.

This confuses me a bit. All serial communication programming I have done so far have beem blissfully unaware of parity bits, stop bits and so forth. As I understand it these are abstracted away by read(), open(), tcsetattr(), etc.

My question is this: Is there some way that I can figure out if the wakeup or parity bit was set on a specific byte in the stream that I have read from the serial port?

Regards,
Mattias
.



Relevant Pages

  • Re: Serial communication, detecting parity bits
    ... >a somewhat old protocol to speak to some external hardware. ... >will have its wakeup bit or parity bit set. ... >stream that I have read from the serial port? ... For the program to detect it, the serial port needs to be set for ...
    (comp.os.linux.development.system)
  • Re: Hash refs of hashs

    (perl.beginners)
  • Re: OT: How read data from a Sartorious BP34000P
    ... data from the serial port... ... and I'm complete lost about how do this. ... Use Hyperterminal to connect to the device if you must determine the protocol on your own. ... Try No Parity, 1 stop but and 9600BAUD -- then move only the speed up and down. ...
    (borland.public.delphi.non-technical)
  • Re: checking for parity bit in serial frame
    ... but the parity bit indicates the start of an individual message. ... This sort of protocol was once quite common in micro controller world ... Communication between the master and slave are through a serial ... data link operating at 19.2 kbaud in a "wakeup" mode. ...
    (microsoft.public.win32.programmer.kernel)
  • Re: error detection
    ... ~ One protocol uses ASCII code, odd parity with 1s. ... 8-bit-wide storage and transmission systems, the leftover bit had to be set to some value. ...
    (comp.dcom.modems)