Re: Serial port access from C / Objective C
Re: Serial port access from C / Objective C
- Subject: Re: Serial port access from C / Objective C
- From: "Vansickle, Greg" <email@hidden>
- Date: Tue, 16 Jun 2009 09:22:21 -0700
- Acceptlanguage: en-US
- Thread-topic: Serial port access from C / Objective C
I have to re-cant this. Write() doesn't set errno, errno is 2 before write() is called, so the "No such file or device" is not relevant.
Since write() returns the correct value, I'll persue Marco's suggestion to look at the canonical vrs non-canonical issue.
Greg
On 6/16/09 12:04 PM, "Greg VanSickle" <email@hidden> wrote:
Sorry,
Thanks for asking.
On the write, errno = 2 and strerrno(errno) returns "No such device or file".
On the read, errno = 35 and strerrno(errno) returns "Resource temporarily unavailable".
Clearly the write is the issue, but the errno isn't making sense to me.
On 6/16/09 12:19 AM, "Andrew Farmer" <email@hidden> wrote:
On 15 Jun 2009, at 15:10, Vansickle, Greg wrote:
> With the write / read in place, although the write appears to work
> (numbytes returns 5), the photometer does not respond (I get no
> "REMOTE" indication on the instrument panel. The subsequent read
> fails (returns -1).
This indicates that an error is occurring when you try to read from
the device. What shows up in errno when this occurs?
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden