Reading CTS from a USB serial adaptor
Reading CTS from a USB serial adaptor
- Subject: Reading CTS from a USB serial adaptor
- From: Mark Gilbert <email@hidden>
- Date: Sat, 11 Feb 2006 23:12:31 +0000
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.
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')
Any suggestions would be welcomed.
Thanks
Mark Gilbert
--
email@hidden
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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden