|[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]|
On Feb 26, 2006, at 20:46, Pavan Chebbi wrote:
I assume you mean a virtual serial port (like COM1 on a PC). On Mac OS X (and Unix in general), these are implemented as /dev/tty (teletype) device nodes.
No; to present a TTY port on Mac OS X, you have to have to write a KEXT that causes the /dev nodes to come into existence.
The easiest way to do this is to write an IOKit driver that makes use of the IOSerialFamily to publish one or more virtual serial interfaces. You do this by subclassing an appropriate class (probably IOSerialStreamSync) and publishing it - the serial family takes care of publishing the /dev/tty nodes and managing all the Posix semantics of those nodes. If you do this right, the network control panel should properly display your serial port as an for PPP connections.
Another way to do this is to write a non-IOKit KEXT that directly publishes the /dev/tty nodes. This may be easier if you already have some Unix code you are porting to Darwin, but you'll have to manage all the Posix semantics yourself, and the network control panel won't find your serial port to present to the user (don't know if you care about that).
The Apple16X50Serial driver project from Darwin is a good example of the IOKit KEXT approach, though it is designed to support physical hardware. I'm not aware of an example of a virtual serial driver on Mac OS X.
_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
|>How to create virtual COM port (From: Pavan Chebbi <email@hidden>)|
Visit the Apple Store online or at retail locations.
Copyright © 2011 Apple Inc. All rights reserved.