site_archiver@lists.apple.com Delivered-To: Darwin-dev@lists.apple.com Thread-index: AcaQP/QkMtg/VPwzEdqcVgARJHlZbA== Thread-topic: Listing serial ports User-agent: Microsoft-Entourage/11.2.4.060510 On 15/6/06 3:54, André-John Mas <ajmas@sympatico.ca> 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:
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 (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com