setting sio to even parity failed

Bernd Walter ticso at cicely12.cicely.de
Sat Oct 11 12:13:58 PDT 2003


On Fri, Oct 10, 2003 at 08:33:46PM +0200, Bernd Walter wrote:
> On Fri, Oct 10, 2003 at 01:26:33PM -0500, Dan Nelson wrote:
> > In the last episode (Oct 10), Bernd Walter said:
> > >         buf.c_iflag |= IGNBRK;
> > >         buf.c_cflag &= ~(CSIZE | PARODD);
> > >         buf.c_cflag |= CS8 | CLOCAL | PARENB;
> > 
> > Do you maybe want CS7 here?
> 
> No I need 8e1, but the output still looks like 8n1.

It was a programming fault on the receiver side.
Receive errors were not handled so the result was identicaly to 8n1.
Now things work fine for me.

With the same constellation I noticed that sending bytes have an
unreliable timing.
It's a modbus RTU case were packet end is signaled with 1.5 data words
idle time.
Because of a programming error on the other site I only checked for 0.5
data words idle and this triggered about 50% within transmission of 8
bytes at 19200bps - it always happened after the 5th byte.
Now with correct 1.5 handling everything seems to be OK, but that only
says that I'm not far away from the edge.

-- 
B.Walter                   BWCT                http://www.bwct.de
ticso at bwct.de                                  info at bwct.de



More information about the freebsd-hackers mailing list