Reading CTS from a USB serial adaptor
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Folks. Any suggestions would be welcomed. Thanks 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/site_archiver%40lists.appl... 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') This email sent to site_archiver@lists.apple.com
participants (1)
-
Mark Gilbert