Mac OS X Reference Library Apple Developer Connection spyglass button

Version: 1.4

Posted: 2005-08-16

Build Requirements: Project Builder 2.1, CodeWarrior Pro 8.3, or Xcode 2.1

Runtime Requirements: Mac OS X 10.0 or later

View Source Code:

Download Sample Code (“SerialPortSample.zip”, 39.6K)



Description

This command-line tool demonstrates how to do serial I/O on Mac OS X. Techniques shown are: finding a serial port, opening and configuring the port, sending an "AT" command to a modem attached to the port, reading the "OK" response from the modem (if any), and closing the port.

This sample code has been updated to include a project that produces a universal binary. No code changes were required for it to run correctly on the Developer Transition Systems.

Document Revision History

Date Notes
2005-08-16Updated to produce a universal binary. No code changes were required. Added examples of setting arbitrary baud rates and the read timer latency. Use kIOMasterPortDefault instead of older IOMasterPort function.
2003-01-14Demonstrates how to do serial I/O on Mac OS X.
Did this document help you? Yes It's good, but... Not helpful...