bugAVR Downloader/UploaDEr - Bugs: bug #12622, avrdude hangs on macosx/darwin...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #12622: avrdude hangs on macosx/darwin with PL-2303 usb-to-serial and Butterfly

Submitted by:  Bengt Sjölén <bengtsjolen>
Submitted on:  Sat 09 Apr 2005 11:11:21 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: FixedPrivacy: Public
Assigned to: Joerg Wunsch <joerg_wunsch>Originator Name: Bengt Sjölén
Open/Closed: ClosedRelease: None
Programmer hardware: Device type: 

(Jump to the original submission Jump to the original submission)

Mon 21 Aug 2006 12:11:30 PM UTC, comment #8:

Oops, "analyzed" is not a good state: it prevents the bug
report from being displayed in the default search.

Joerg Wunsch <joerg_wunsch>
Project AdministratorIn charge of this item.
Mon 21 Aug 2006 12:09:33 PM UTC, comment #7:

Pilot error: use cuXXX rather than ttyXXX.

Only documentation update is needed.

Joerg Wunsch <joerg_wunsch>
Project AdministratorIn charge of this item.
Fri 10 Mar 2006 12:02:15 AM UTC, comment #6:

Osx has both TTY.XXXXX and cu.XXXX
I use avrdude with /dev/cu.usbserial/ and it works great.
Is it mentioned in the documentation to use these devices rather than the TTY versions?

Nick Lott <brokentoaster>
Thu 09 Mar 2006 08:02:15 PM UTC, comment #5:

Curious, does OSX offer dual /dev/ttyXXX vs. /dev/cuaXXX
devices? AVRDUDE is meant to use the latter ones (which
will ignore absense of DCD when opening).

Joerg Wunsch <joerg_wunsch>
Project AdministratorIn charge of this item.
Thu 09 Mar 2006 05:14:41 PM UTC, comment #4:

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));

Max Egger <mexx>
Tue 24 Jan 2006 12:53:12 AM UTC, comment #3:

I have tested on Mac OS X 10.4.4 with a PL2303 device and have no problems. This may be a driver issue??

Nick Lott <brokentoaster>
Sun 16 Oct 2005 04:16:07 AM UTC, comment #2:

I am having the exact same problem. I have tried 5.0BETA as well as 5.0 with no luck. In 5.0 I tried changing timeout.tv_usec as mentioned above but saw no difference after recompiling.

A few important differences, I am using Darwin 10.4.2 and a keyspan USB <-> Serial adapter.

After typing in a standard avrdude command such as:
avrdude -p m163 -P /dev/tty.USA19H1b1P1.1 -c stk500
the terminal simply hangs. One interesting note, when I unplug the usb cable for the adapter, instantly I recieve the following error:
avrdude: ser_open(): can't open device "/dev/tty.USA19H1b1P1.1": Device not configured

Anonymous
Sat 17 Sep 2005 07:47:19 PM UTC, comment #1:

Do you have a chance to test the latest CVS version?

The initialization has been modified for the butterfly/AVR109,
so your case might have been fixed as a side-effect.

Joerg Wunsch <joerg_wunsch>
Project AdministratorIn charge of this item.
Sat 09 Apr 2005 11:11:21 AM UTC, original submission:

Butterfly seems to send '?' often enough to keep serial_drain looping forever. I therefore just ad-hoc changed timeout.tv_usec from 250000 to 25000 and now it works for me anyway. But why does drain loop in the first place? Shouldn't the purpose just be to get rid of old waiting input?

Regards,
Bengt Sjölén, Stockholm, Sweden

      • ser_posix.c Sat Apr 9 12:42:00 2005

--- ser_posix.c~ Mon Jul 19 07:16:17 2004

                              • int serial_drain(int fd, int display)
      • 310,316 ****

unsigned char buf;

timeout.tv_sec = 0;
! timeout.tv_usec = 25000;

if (display) {
fprintf(stderr, "drain>");
--- 310,316 ----
unsigned char buf;

timeout.tv_sec = 0;
! timeout.tv_usec = 250000;

if (display) {
fprintf(stderr, "drain>");

Bengt Sjölén <bengtsjolen>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 7 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Mon 28 Aug 2006 09:17:17 PM UTCjoerg_wunschStatusIn Progress=>Fixed
  Open/ClosedOpen=>Closed
Mon 21 Aug 2006 12:11:30 PM UTCjoerg_wunschOpen/ClosedAnalyzed=>Open
Mon 21 Aug 2006 12:09:33 PM UTCjoerg_wunschStatusNeed Info=>In Progress
  Assigned toNone=>joerg_wunsch
  Open/ClosedOpen=>Analyzed
Sat 17 Sep 2005 07:47:18 PM UTCjoerg_wunschStatusNone=>Need Info

Back to the top


Powered by Savane 3.1-cleanup1