Accessing serial port

Jonathon Kuo <[email protected]>
Newsgroups gmane.comp.macosx.devel
Message-ID <[email protected]>
I'm using a USB-to-serial adapter which sets up a device like:

crw-rw-rw-  1 root  wheel    9,   4 Nov 16 14:36 /dev/tty.usbserial

...but I can't open it. The following line hangs:

     fd = open( "/dev/tty.usbserial", O_RDWR | O_EXCL );

Tried running as sudo but it still hangs. What could I be doing wrong?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.