Re: Reading CTS from a USB serial adaptor
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Mark, Cheers, - Dean On Feb 11, 2006, at 3:12 PM, Mark Gilbert wrote: Folks. Any suggestions would be welcomed. Thanks _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... [Please don't cross-post - I've followed up just to darwin-dev since this isn't really a USB issue.] What driver are you using for this device? The serial family will pass along this info if the driver is tracking it and presenting it. It is up to the driver (and device) to support the flow control lines, and I know several don't bother. 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. 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. Could anyone suggest anything else to try ? I am not having any luck with the TIOCMGET which should be working according to the Apple docs I have found ('WorkingwithSerial.pdf') Mark Gilbert -- mark@gallery.co.uk Tel: +44 208 340 5677 fax: +44 870 055 7790 http://www.gallery.co.uk New Product ! - MetaCorder Location Sound Field Recorder http://www.metacorder.info _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/dean.reece% 40apple.com This email sent to dean.reece@apple.com This email sent to site_archiver@lists.apple.com
participants (1)
-
Dean Reece