From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 11 12:13:58 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3494F16A4B3 for ; Sat, 11 Oct 2003 12:13:58 -0700 (PDT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8868443FD7 for ; Sat, 11 Oct 2003 12:13:54 -0700 (PDT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [IPv6:3ffe:400:8d0:301:200:92ff:fe9b:20e7]) (authenticated bits=0) h9BJDft2045925 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Sat, 11 Oct 2003 21:13:43 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [IPv6:3ffe:400:8d0:301::12]) by cicely5.cicely.de (8.12.10/8.12.10) with ESMTP id h9BJDdS8098684 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 11 Oct 2003 21:13:40 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.10/8.12.10) with ESMTP id h9BJDd2u053416; Sat, 11 Oct 2003 21:13:39 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.10/8.12.10/Submit) id h9BJDc3A053415; Sat, 11 Oct 2003 21:13:38 +0200 (CEST) (envelope-from ticso) Date: Sat, 11 Oct 2003 21:13:38 +0200 From: Bernd Walter To: Dan Nelson Message-ID: <20031011191337.GK13791@cicely12.cicely.de> References: <20031010181349.GG13791@cicely12.cicely.de> <20031010182633.GD77306@dan.emsphone.com> <20031010183346.GH13791@cicely12.cicely.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031010183346.GH13791@cicely12.cicely.de> X-Operating-System: FreeBSD cicely12.cicely.de 5.1-CURRENT alpha User-Agent: Mutt/1.5.4i cc: freebsd-hackers@freebsd.org cc: ticso@cicely.de Subject: Re: setting sio to even parity failed X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ticso@cicely.de List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Oct 2003 19:13:58 -0000 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@bwct.de info@bwct.de