Follow-up Comment #4, bug #12622 (project avrdude):

I had the same problem with a Keyspan USA-19HS connected to the SP Duo 2.1,
and also with the STK500 board (old protocol), using AVRDUDE 5.1 and Darwin
8.5.0 (OS X 10.4.5). After calling AVRDUDE, the terminal hung until I
unplugged the serial adapter, returning the error mentioned above.
I solved it by adding the O_NDELAY flag to the open() call in ser_open(), so
it ignores the state of the DCD line. Now it works just fine.

Here's the diff of ser_posix.c:
--- ser_posix_orig.c    2006-03-07 18:17:53.000000000 +0100
+++ ser_posix.c 2006-03-07 18:17:26.000000000 +0100
@@ -137,7 +137,7 @@
   /*
    * open the serial port
    */
-  fd = open(port, O_RDWR | O_NOCTTY /*| O_NONBLOCK*/);
+  fd = open(port, O_RDWR | O_NOCTTY | O_NDELAY /*| O_NONBLOCK*/);
   if (fd < 0) {
     fprintf(stderr, "%s: ser_open(): can't open device \"%s\": %s\n",
             progname, port, strerror(errno));


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?func=detailitem&item_id=12622>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/



_______________________________________________
avrdude-dev mailing list
avrdude-dev@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avrdude-dev

Reply via email to