Serial Driver: Sending with 7bits/character doesn't work

Hi
I’m using Digi Connect MEs (JTAG and -C devices) and I’d like to send serial data with 7bits (9600 baud).

Now I’ve written a simple “serial echo server” which sends out received data after receiving an ETX (ASCII 0x03) (the ETX is sent out too). This works well with 8 databits but with 7 databits I always receive incorrect data on PC.
The Connect ME receives the correct data but when sending them out something goes wrong…

Example:
Sent (with PC): a (0x61 0x03) (0110’0001 0000’0011)
Received (with PC): a~ (0x61 0x0D 0x7E) (0110’0001 0000’1101 0111’1110)

XON/XOFF are turned off because I alreay had problems with them (when I was receiving 0x11 or 0x13).

To set the parameters I used:
if ( tcgetattr (serialPort, &serParams) == SUCCESS)
{
serParams.c_cflag &= ~CSIZE;
serParams.c_cflag |= CS7;

serParams.c_iflag &= ~IXON;
serParams.c_iflag &= ~IXOFF;

if ( tcsetattr(serialPort, TCSANOW, &serParams) != SUCCESS )
{
  //errorhandling
}

}
else
{
//errorhandling
}

Anyone has an idea what I’m doing wrong?

Michael

Baudrate: 9600

Input Modes:
IGNBRK: 0:
BRKINT: 0:
IGNPAR: 0:
PARMRK: 0:
INPCK: 0:
ISTRIP: 0:
IXON: 0:
IXANY: 0:
IXOFF: 0:
DOSMODE: 0:

Output Modes:
ONLCR: 0:
OCRNL: 0:
ONOCR: 0:
ONLRET: 0:
TABDLY: 0:

Control Modes:
CS5: 1:
CS6: 0:
CS7: 1:
CS8: 0:
CSTOPB: 0:
CREAD: 0:
PARENB: 0:
PARODD: 0:
CMFLOW: 0:
CDTR: 0:
CRTS: 0:
CRTSTOGGLE: 0:
CCTS: 0:
CDSR: 0:
CRI : 0:
CDCD : 0:
CRTSCTS : 0:
CCTS_OFLOW : 0:
CRTS_IFLOW : 0:

Local Modes: 0x0

Xtra Modes:
XPAR: 0:
XEDATA: 0:
XTOSS: 0:
XIXON: 0:
XFORCEDCD: 0: