In your presentation

BTW I only got a Mac (mini) a few weeks ago, so all my information was based on what other people contributed.

you say that serial devices on the Mac are in /dev with "no other information". That is totally not true, unless you say "no other information available from POSIX" ;) You can get at any metadata you want to know about any hardware device in the system (and plug/unplug notifications) from IOKit.

The specific information I need is USB vendor and product ids and interface
number on the USB device that correspond to a particular /dev entry. (These are all cell phones exposed by direct USB connections or USB to serial convertors). The actual devices will show up as serial ports or as modems depending on the interface protocol class. Depending on the phone model, the access may be via serial/modem port access or via libusb.


I can see what is present via libusb, and I can see what /dev nodes
let me open them, but I don't see a way of mapping in either direction.

I don't think anyone has wrapped IOKit, but it wouldn't be that hard to wrap the useful parts. Maybe I'll look into it, since I do use IOKit for FireWire and USB notifications in one of my apps. My current implementation does this with an Objective-C class compiled as a Python extension, so from PyObjC I can just objc.lookUpClass and talk to it without writing any additional ugly wrapper code.

I'd be happy to use whatever you can provide :-)

Roger
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to