Re: How to create virtual COM port
Re: How to create virtual COM port
- Subject: Re: How to create virtual COM port
- From: Mike Smith <email@hidden>
- Date: Tue, 28 Feb 2006 01:32:39 -0800
On Feb 28, 2006, at 1:02 AM, Pavan Chebbi wrote: I want to create and register a virtual serial COM port to communicate to ethernet. There is an application which will communicate thru the COM port. The data flows via ethernet to an external modem. The system doesnt have the physical RS232 port and hence I need to provide a virtual COM port and route the data thru ethernet.
Does your remote protocol include out-of-band controls to manipulate the modem (change baud rate, raise/lower DTR, etc.?). If so, then you will need to implement a kernel driver and Dean's suggestion of using the 16550 driver as a starting point is a good one.
If, however, you just want to pass plain serial data back and forth, you may be able to use a pty. The final deciding factor will be which client application(s) you expect to run on the system with the virtual interface. If they expect a serial device (e.g. you want to use the system PPP interface, or a terminal program), then you will need a driver as well.
= Mike On Feb 26, 2006, at 8:46 PM, Pavan Chebbi wrote:
> I wanted to know how do we create and register a virtual COM port. > (MAC OS X).
What aspects of a true serial device do you need to emulate? Is it necessary to e.g. support the setting of line speed, modem control bits and the like?
If not, you may find that the pseudo-tty (pty) interface is more than adequate for your needs.
> Is it possible at the user level or do we have to code in the > kernel. Kindly provide some inputs on this.
pty's can be manipulated entirely in user space. Typically, regular ttys are only backed by real hardware, and thus they need to be implemented in the kernel.
> Is there any open source that I can refer to which does the same job.
Without knowing what it is that you are actually trying to achieve, it is difficult to know. Perhaps you could describe your application and how you intend to use this interface so that we can offer some more suggestions?
= Mike
Yahoo! Mail Bring photos to life! New PhotoMail makes sharing a breeze.
|
_______________________________________________
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