Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reading CTS from a USB serial adaptor



Hi Mark,

Responding on email@hidden. (Cross-posting is a netiquette faux-pas.)

On Feb 11, 2006, at 3:12 PM, Mark Gilbert wrote:

Folks.

I have a special USB serial adaptor using the FTDI RS232 chip.  The device has a sensor attached to the CTS line of the chip, and I need to be able to sense the status of the CTS line from my app.  Ideally I would be able to setup a blocking call to only return when the status changes.

I use Posix to open and configure the port,  then I have tried ioctl using TIOCMGET to read the CTS status, but TIOCMGET always returns the same thing (102 decimal) regardless of the value on the CTS line. This denotes CTS is high.  Another developer using the same box on Windows is able to read the CTS no problem, so I know the device is OK.

If the device truly supports reading its CTS state, the next thing to check is if the driver for the adapter properly passes that state back to the caller. It's up to the driver to support TIOCMGET appropriately for the devices it controls. You'd need to contact the driver provider for this information.

Also, I see that in Linux there is a call TIOCMIWAIT  which appears to do the blocking sense, but I can't find this in any Mac headers. This would be desirable but not essential.

You can file an enhancement request at <http://developer.apple.com/bugreporter>.

Regards,

--gc


__________________________________________________________________

Garth Cummings                

Apple Developer Technical Support     email@hidden


http://developer.apple.com/technicalsupport



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Usb mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/usb/email@hidden

This email sent to email@hidden

References: 
 >Reading CTS from a USB serial adaptor (From: Mark Gilbert <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.