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 Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <3F1E9B4F.7060607@enea.se> Date: Wed, 23 Jul 2003 16:27:27 +0200 From: Mats Liljegren User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3) Gecko/20030312 X-Accept-Language: en-us, en, ko MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Problems setting baud rate Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi, I'm using Cygwin GCC 3.2, and have the following code: tty_fd = open(modem_device[Port-1], O_RDWR | O_NOCTTY ); tcgetattr(tty_fd,&oldtio); /* save current serial port settings */ newtio.c_cflag = bd | CS8 | CLOCAL | CREAD; tcsetattr(tty_fd,TCSANOW,&newtio); This doesn't change the baudrate, even though I thought I specified it in c_cflag. If the baudrate happens to be correct, everything works. If the baudrate happens to be incorrect, well, I get garbage or nothing. How do I do to change the baudrate? Would above suffice for Unix, but not when compiling for Win32? By the way, I got this email address from Mingw list. Is this a mailinglist? If so, how can I join? Regards Mats -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/