X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f Date: Mon, 21 Jan 2002 15:10:12 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: ROLAND cc: djgpp AT delorie DOT com Subject: Re: Serial Communication In-Reply-To: <20020121123528.32288.qmail@web9104.mail.yahoo.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Mon, 21 Jan 2002, ROLAND wrote: > The code is looking like this: > > if((f3=open("/dev/ttya",0))==-1){ /* open device for > read */ > error("error: ",-1,"/dev/ttya"); > error(" can not be opened for read",-1,"\n"); > finish(-1); > } > if((f4=open("/dev/ttya",1))==-1){ /* open device for > write */ > error("error: ",-1,"/dev/ttya"); > error(" can not be opened for write",-1,"\n"); > finish(-1); > } That's the code which opens the I/O. I wanted to see the code with settings for both handles. > I am not sure what the settings are that are used for > the read, but I found out that the settings used for > write are 7-E-1 (7 bits, Even parity, 1 stopbit) and > no flow control... > Can someone tell me how I can figure out what the > settings are and how to solve this problem?? You should see the settings being set in the code. If you cannot find that, then it uses the default. I think (but I am not sure) these settings are per device, so the input and output use the same values.