daniel - 2008-05-15

I installed your (great) driver (thank you), and checked that with Zterm I can receive data from a GPS using a PL2303, so I know it works.  I am now trying to write a simple C program on Mac OS-X 10.4.11 to read/write to the GPS.  When I do an open() on /dev/tty.PL2303-4B14, the program blocks (an stty on /dev/tty.PL2303-4B14 also blocks).  The open() on /dev/cu.PL2303-4B14 works and I can set speed with tcsetattr(), but then subsequent read() calls to get data do not return anything.  Obviously I  am missing something.  What is the difference between the cu and tty versions of the device?  Why does the tty version block on open() or stty?  Can't I use open(), read(), write(), close() to get data in and out of this device on Mac OS-X?

For information, here what the ioreg gives me for this device:
+-o IOSerialBSDClient  <class IOSerialBSDClient, registered, matched, active, busy 0, retain count 7>
      "IOTTYSuffix" = "4B14"
      "CFBundleIdentifier" = "com.apple.iokit.IOSerialFamily"
      "IOClass" = "IOSerialBSDClient"
      "IOTTYBaseName" = "PL2303-"
      "IOSerialBSDClientType" = "IORS232SerialStream"
      "IOProbeScore" = 1000
      "IOResourceMatch" = "IOBSD"
      "IOMatchCategory" = "IODefaultMatchCategory"
      "IOTTYDevice" = "PL2303-4B14"
      "IOCalloutDevice" = "/dev/cu.PL2303-4B14"
      "IODialinDevice" = "/dev/tty.PL2303-4B14"
      "IOProviderClass" = "IOSerialStreamSync"

Thanks in advance for your help!