Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-MimeOLE: Produced By Microsoft Exchange V6.0.4712.0 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Subject: Problem in writing to the modem Date: Sun, 3 Feb 2002 16:32:33 +0530 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Problem in writing to the modem Thread-Index: AcGsokfoLoPcsIG8TdOJxqyPfoyChA== From: "Bhanu AN Kurpad" To: Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id g13B5NY19769 Hi, 1.Our application has a problem writing to the serial port connected to the modem. The same application works fine on Linux. 2.The following is the open call for the serial port connected to the modem: fd = open( device_name, O_RDWR | O_NONBLOCK ); 3.The serial port has the following settings: struct termios newtio; tcgetattr(fd,&newtio); memset(&newtio,0,sizeof(struct termios)); newtio.c_cflag = CS8 | B115200 | CREAD | CLOCAL | CRTSCTS; newtio.c_oflag = 0; newtio.c_iflag = IGNPAR | IXON | IXOFF ; newtio.c_lflag = 0; newtio.c_cc[VTIME] = 0; newtio.c_cc[VMIN] = 1; tcflush(fd,TCIFLUSH); /* Set Terminal settings for the Line Device */ newtio.c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON); newtio.c_oflag &= ~OPOST; newtio.c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN); newtio.c_cflag &= ~(CSIZE|PARENB); newtio.c_cflag |= CS8; tcsetattr(fd, TCSANOW, &newtio); 4.The write call to the serial port is failing. The error returned is EACESS or EAGAIN. Please let me know if there is any problem in the settings of the port. Thanking you in advance Bhanu Kurpad -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/