From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15294 invoked by alias); 2 May 2007 14:38:42 -0000 Received: (qmail 15286 invoked by uid 22791); 2 May 2007 14:38:41 -0000 X-Spam-Check-By: sourceware.org Received: from mx2.lvl7.com (HELO lvl7-trend01.lvl7.com) (66.192.95.83) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 02 May 2007 14:38:39 +0000 Received: from lvl7in-mail01.lvl7.com ([10.240.1.18]) by lvl7-trend01.lvl7.com with InterScan VirusWall; Wed, 02 May 2007 10:38:35 -0400 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Wed, 02 May 2007 14:38:00 -0000 Message-ID: From: "Venkateswara Rao L." To: X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: [ECOS] ttydiag read and write to console X-SW-Source: 2007-05/txt/msg00011.txt.bz2 Hi all, I want to work on ttydiag,=20 I am able to write to the terminal using "cyg_io_write" But unable to read from the terminal with echo using "cyg_io_read" =20=20=20=20 Please find the code sample --------------------------------------------------------- Char buff[] =3D "\nPlease enter some data: "; retval =3D cyg_io_lookup("/dev/ttydiag", &handle); if (retval !=3D NOERR) { printf("io lookup error: %d\n", retval); return; } len =3D strlen(buff); cyg_io_write(handle, buff, &len); retval =3D cyg_io_read(handle,bufRead,&in_msglen); if (retval !=3D NOERR)=20 { printf("Can't read data - DEVIO error: %d\n", retval); while(1);/*Hang*/ return; } printf("Read %d bytes\n", in_msglen); --------------------------------------------------------- I am able to see the output as shown=20 --------------------------------------------------------- Please enter some data: --------------------------------------------------------- After that what ever I entering it is not echoing and hanged. Please help me. Warm Regards L. Venkateswara Rao. -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss