Re: Listing serial ports
Re: Listing serial ports
- Subject: Re: Listing serial ports
- From: Chris Ridd <email@hidden>
- Date: Thu, 15 Jun 2006 06:52:58 +0100
- Thread-topic: Listing serial ports
On 15/6/06 3:54, André-John Mas <email@hidden> wrote:
> Hi,
>
> What is the right way to list serial ports, as to get user-friendly
> display names. I am currently using this following implementation of
> the javax.comm API:
>
> http://www.rxtx.org/
>
> Though it returns very unix like /dev/cu.* and /dev/tty.* entries.
> If I can I would be tempted to update it so that something more
> suitable to displaying to a user is implemented.
Use the IOKit.
There's some code showing how to dynamically detect serial USB devices being
connected and disconnected at
<http://www.cocoadev.com/index.pl?StillCannotUnderstandIORegistry> (note not
the first code snippet, the second one which has DeviceAddedCallback and
DeviceRemovedCallback.) It works really nicely, and you hardly have to
understand IOKit to use it (which is the best part :-)
That page references an Apple document which may help (and references some
Apple sample code):
<http://developer.apple.com/documentation/DeviceDrivers/Conceptual/WorkingWS
erial/index.html>
Cheers,
Chris
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden