X-Spam-Check-By: sourceware.org MIME-Version: 1.0 From: andyburgess To: cygwin AT cygwin DOT com Date: Mon, 23 Jan 2006 13:28:24 +0000 (GMT) Subject: Serial port hangs unless I run Hyperterminal? Message-ID: <4dedbe8ed5AndyBurgess@argonet.co.uk> User-Agent: Pluto/3.03h (RISC-OS/4.02) POPstar/2.06-ds.3 Content-Type: text/plain X-orpheus-MailScanner: Found to be clean X-orpheus-MailScanner-SpamCheck: not spam, SpamAssassin (score=0.092, required 5, autolearn=disabled, AWL 0.09) X-IsSubscribed: yes 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 Cygwin1.dll - version 1005.18.0.0 (Build date 2005-07-02 20:30) Hi there, I've been using the superb Cygwin environment for a few months now and am very impressed with it! I'm getting an issue when I run my GNU C program. It's hanging on the write/read operation to a GSM modem attached to my COM1 *when* the PC has initially been switched on from cold. However the crazy thing is if I run Hyperterminal after boot-up, fire a couole of commands to the modem and close Hyperterminal down, my program subsequently runs perfectly! In the program, I've avoided setting anything on the modem (no tcsetattr) - except the O_RDWR and O_NOCTTY on opening the port. Can anyone tell me why it hangs? I saw that this was a problem previously,(read()) but I assume it's been fixed now - as it works later! My Hyperterminal settings are baud 19200, 8 data bits, no parity and hardware flow control. I've noticed the following: Prior to running Hyperterminal, my DOS port settings are: MODE COM1: BAUD=1200 PARITY=n DATA=7 STOP=1 to=off xon=off odsr=off octs=off dtr=on rts=on idsr=off After hyperterminal they are: MODE COM1: BAUD=19200 PARITY=n DATA=8 STOP=1 to=on xon=off odsr=off octs=on dtr=on rts=hs idsr=off I've tried setting the settings in a DOS batch program outside of Hyperterminal, but it's no good. My program won't respond, unless I've run Hyperterminal! What is the software setting that Hyperterminal uses that my C program needs? Also I've been having trouble with the tcsetattr and tcgetattr functions in C (my program's not using them currently). Each time I call them - I get a returned -1 - error status. Cheers Andy Burgess -- __ __ __ __ __ ___ _____________________________________________ |__||__)/ __/ \|\ ||_ | / | || \\__/\__/| \||__ | /...Internet access for all Acorn RISC machines ___________________________/ andyburgess AT argonet DOT co DOT uk -- 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/