avrdude-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avrdude-dev] USB-to-serial-converter on OS X


From: Brian Dean
Subject: Re: [avrdude-dev] USB-to-serial-converter on OS X
Date: Sun, 13 Feb 2005 18:26:35 -0500
User-agent: Mutt/1.4.2.1i

On Sun, Feb 13, 2005 at 02:39:21PM +0100, Jan-Hinnerk Reichert wrote:

> a friend of mine had problems using avrdude with a 
> USB-to-serial-converter on his Mac.
> 
> We were able to track the problems to the open() call in 
> "ser_posix.c"! It simply doesn't return. Uncommenting the "O_NOBLOCK" 
> there solves his problems.
> 
> Has anyone else seen this (or a similar) problem?

I've been using one for almost a year on MacOS X with no problems at
all.  What is the device name that he is opening?  As Joerg mentioned,
be sure and use the /dev/cu* device instead of the /dev/tty* device.

> Is it safe to use "O_NONBLOCK" (on all systems)?

If NONBLOCK is set and you do a read and no data is available, the
read will return with an error.  The code might not expect this and it
could cause problems.

But in AVRDUDE, we use select() to first ensure that the serial device
is "readable" which ensures that at least one byte of data is
available so it _should_ be OK.  However, as Joerg mentioned, I think
the correct solution is to use the "callout" device /dev/cu* instead
of the /dev/tty* device to solve the problem, as opposed to using
non-blocking I/O.

-Brian




reply via email to

[Prev in Thread] Current Thread [Next in Thread]