• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Listing serial ports
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Listing serial ports (From: AndrĂ©-John Mas <email@hidden>)

  • Prev by Date: Listing serial ports
  • Next by Date: streaming QT using RTSP
  • Previous by thread: Listing serial ports
  • Next by thread: streaming QT using RTSP
  • Index(es):
    • Date
    • Thread