[Pythonmac-SIG] Zope py2app, some progress
Bob Ippolito
bob at redivi.com
Thu Feb 10 08:00:12 CET 2005
On Feb 10, 2005, at 1:36 AM, Roger Binns wrote:
>> 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.
Obviously not people familiar with http://developer.apple.com/ :)
>> 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.
That's what IOKit does. It's a registry of everything you could ever
possibly want to know w.r.t. hardware. Open up
/Developer/Utilities/IORegistryExplorer and poke around (there are
other tools like USB Prober and some stuff in
/Developer/Examples/IOKit).
>> 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 :-)
Well, if you take a look at the example, it's really straight-forward
and you can come up with something specific to your app in just an hour
or two. It will be quite some time before I get around to making a
useful IOKit wrapper.
Unfortunately (or maybe fortunately) neither of my phones are
compatible with BitPim. I'd really like to see BlackBerry 7100
support, but it doesn't even show up as a serial device over USB and I
don't really know where to start with reverse engineering it to give a
useful bluetooth profile or to make it do something with USB.
PocketMac sells a product that I can use to sync contacts/calendar
stuff, but it doesn't do anything with bluebooth and it doesn't allow
me to use it as a GPRS modem.
-bob
More information about the Pythonmac-SIG
mailing list